Add present logs (#13144)
* add logs for SpawnItemsOnUse * add logs for RandomGift * add and use EntitySpawn log type
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Storage;
|
||||
@@ -11,6 +13,7 @@ namespace Content.Server.Storage.EntitySystems
|
||||
public sealed class SpawnItemsOnUseSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -32,6 +35,7 @@ namespace Content.Server.Storage.EntitySystems
|
||||
foreach (var proto in spawnEntities)
|
||||
{
|
||||
entityToPlaceInHands = Spawn(proto, coords);
|
||||
_adminLogger.Add(LogType.EntitySpawn, LogImpact.Low, $"{ToPrettyString(args.User)} used {ToPrettyString(component.Owner)} which spawned {ToPrettyString(entityToPlaceInHands.Value)}");
|
||||
}
|
||||
|
||||
if (component.Sound != null)
|
||||
|
||||
Reference in New Issue
Block a user