]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Adds logging for refunds (#26274)
authorkeronshb <54602815+keronshb@users.noreply.github.com>
Wed, 20 Mar 2024 02:46:03 +0000 (22:46 -0400)
committerGitHub <noreply@github.com>
Wed, 20 Mar 2024 02:46:03 +0000 (19:46 -0700)
LGTM

Content.Server/Store/Systems/StoreSystem.Ui.cs
Content.Shared.Database/LogType.cs

index 281d8f57267ee35fc5822d687c9db6e4b89936da..7cdbc4e41c3d3b8b6fa84ac354ea9c842c1f839f 100644 (file)
@@ -5,6 +5,7 @@ using Content.Server.PDA.Ringer;
 using Content.Server.Stack;
 using Content.Server.Store.Components;
 using Content.Shared.Actions;
+using Content.Shared.Administration.Logs;
 using Content.Shared.Database;
 using Content.Shared.FixedPoint;
 using Content.Shared.Hands.EntitySystems;
@@ -321,6 +322,8 @@ public sealed partial class StoreSystem
         if (!component.RefundAllowed || component.BoughtEntities.Count == 0)
             return;
 
+        _admin.Add(LogType.StoreRefund, LogImpact.Low, $"{ToPrettyString(buyer):player} has refunded their purchases from {ToPrettyString(uid):store}");
+
         for (var i = component.BoughtEntities.Count - 1; i >= 0; i--)
         {
             var purchase = component.BoughtEntities[i];
index ece6607954e377cd00d9b1e7a06e78c7386b0ecf..f486a7416c789f87a0b7f4869a91d1854ac80676 100644 (file)
@@ -96,4 +96,5 @@ public enum LogType
     ChatRateLimited = 87,
     AtmosTemperatureChanged = 88,
     DeviceNetwork = 89,
+    StoreRefund = 90
 }