Adds logging for refunds (#26274)

LGTM
This commit is contained in:
keronshb
2024-03-19 22:46:03 -04:00
committed by GitHub
parent 395024a652
commit 85f4b43db1
2 changed files with 4 additions and 0 deletions

View 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];

View File

@@ -96,4 +96,5 @@ public enum LogType
ChatRateLimited = 87,
AtmosTemperatureChanged = 88,
DeviceNetwork = 89,
StoreRefund = 90
}