From 85f4b43db1c0256e6d4c48a01558e8cc0a883ada Mon Sep 17 00:00:00 2001 From: keronshb <54602815+keronshb@users.noreply.github.com> Date: Tue, 19 Mar 2024 22:46:03 -0400 Subject: [PATCH] Adds logging for refunds (#26274) LGTM --- Content.Server/Store/Systems/StoreSystem.Ui.cs | 3 +++ Content.Shared.Database/LogType.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/Content.Server/Store/Systems/StoreSystem.Ui.cs b/Content.Server/Store/Systems/StoreSystem.Ui.cs index 281d8f5726..7cdbc4e41c 100644 --- a/Content.Server/Store/Systems/StoreSystem.Ui.cs +++ b/Content.Server/Store/Systems/StoreSystem.Ui.cs @@ -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]; diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index ece6607954..f486a7416c 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -96,4 +96,5 @@ public enum LogType ChatRateLimited = 87, AtmosTemperatureChanged = 88, DeviceNetwork = 89, + StoreRefund = 90 }