Remove inaccurate admin log when moving a held item (#32525)

Remove inaccurate admin log when switching held item
This commit is contained in:
Leon Friedrich
2024-10-14 17:05:40 +13:00
committed by GitHub
parent dd6433c44b
commit 30ada26315
5 changed files with 14 additions and 11 deletions

View File

@@ -220,7 +220,7 @@ public abstract partial class SharedHandsSystem : EntitySystem
/// <summary>
/// Puts an entity into the player's hand, assumes that the insertion is allowed. In general, you should not be calling this function directly.
/// </summary>
public virtual void DoPickup(EntityUid uid, Hand hand, EntityUid entity, HandsComponent? hands = null)
public virtual void DoPickup(EntityUid uid, Hand hand, EntityUid entity, HandsComponent? hands = null, bool log = true)
{
if (!Resolve(uid, ref hands))
return;
@@ -235,7 +235,8 @@ public abstract partial class SharedHandsSystem : EntitySystem
return;
}
_adminLogger.Add(LogType.Pickup, LogImpact.Low, $"{ToPrettyString(uid):user} picked up {ToPrettyString(entity):entity}");
if (log)
_adminLogger.Add(LogType.Pickup, LogImpact.Low, $"{ToPrettyString(uid):user} picked up {ToPrettyString(entity):entity}");
Dirty(uid, hands);