Adds logging for refunds (#26274)

LGTM

(cherry picked from commit 85f4b43db1c0256e6d4c48a01558e8cc0a883ada)
This commit is contained in:
keronshb 2024-03-19 22:46:03 -04:00 committed by NullWanderer
parent d3a54f710f
commit 6b5daf9de7
No known key found for this signature in database
GPG Key ID: 65CF92BD1D26F4AC
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

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