Adds logging to stripping and construction starting (#11952)
This commit is contained in:
@@ -15,6 +15,8 @@ using Content.Shared.Verbs;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Player;
|
||||
using System.Threading;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Shared.Database;
|
||||
|
||||
namespace Content.Server.Strip
|
||||
{
|
||||
@@ -26,6 +28,7 @@ namespace Content.Server.Strip
|
||||
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly EnsnareableSystem _ensnaring = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
|
||||
// TODO: ECS popups. Not all of these have ECS equivalents yet.
|
||||
|
||||
@@ -203,7 +206,11 @@ namespace Content.Server.Strip
|
||||
&& _handsSystem.TryDrop(user, userHands.ActiveHand, handsComp: userHands))
|
||||
{
|
||||
_inventorySystem.TryEquip(user, component.Owner, held, slot);
|
||||
|
||||
_adminLogger.Add(LogType.Stripping, LogImpact.Medium, $"{ToPrettyString(user):user} has placed the item {ToPrettyString(held):item} in {ToPrettyString(component.Owner):target}'s {slot} slot");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -265,6 +272,7 @@ namespace Content.Server.Strip
|
||||
|
||||
_handsSystem.TryDrop(user, checkActionBlocker: false, handsComp: userHands);
|
||||
_handsSystem.TryPickup(component.Owner, held, handName, checkActionBlocker: false, animateUser: true, handsComp: hands);
|
||||
_adminLogger.Add(LogType.Stripping, LogImpact.Medium, $"{ToPrettyString(user):user} has placed the item {ToPrettyString(held):item} in {ToPrettyString(component.Owner):target}'s hands");
|
||||
// hand update will trigger strippable update
|
||||
}
|
||||
|
||||
@@ -336,6 +344,7 @@ namespace Content.Server.Strip
|
||||
RaiseLocalEvent(item.Value, new DroppedEvent(user), true);
|
||||
|
||||
_handsSystem.PickupOrDrop(user, item.Value);
|
||||
_adminLogger.Add(LogType.Stripping, LogImpact.Medium, $"{ToPrettyString(user):user} has stripped the item {ToPrettyString(item.Value):item} from {ToPrettyString(component.Owner):target}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +408,7 @@ namespace Content.Server.Strip
|
||||
_handsSystem.TryDrop(component.Owner, hand, checkActionBlocker: false, handsComp: hands);
|
||||
_handsSystem.PickupOrDrop(user, held, handsComp: userHands);
|
||||
// hand update will trigger strippable update
|
||||
_adminLogger.Add(LogType.Stripping, LogImpact.Medium, $"{ToPrettyString(user):user} has stripped the item {ToPrettyString(held):item} from {ToPrettyString(component.Owner):target}");
|
||||
}
|
||||
|
||||
private sealed class OpenStrippingCompleteEvent
|
||||
|
||||
Reference in New Issue
Block a user