Add pull logs (#12922)

* add pull logs

* fix logs for stopping pulling

* rm missed line
This commit is contained in:
Chief-Engineer
2022-12-18 19:15:55 -06:00
committed by GitHub
parent b689e9a91a
commit 081982735c
2 changed files with 10 additions and 0 deletions

View File

@@ -1,4 +1,6 @@
using Content.Shared.Administration.Logs;
using Content.Shared.Alert;
using Content.Shared.Database;
using Content.Shared.Hands;
using Content.Shared.Movement.Systems;
using Content.Shared.Physics.Pull;
@@ -13,6 +15,7 @@ namespace Content.Shared.Pulling.Systems
[Dependency] private readonly SharedPullingSystem _pullSystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
public override void Initialize()
{
@@ -60,6 +63,8 @@ namespace Content.Shared.Pulling.Systems
return;
var euid = component.Owner;
if (_alertsSystem.IsShowingAlert(euid, AlertType.Pulling))
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(euid):user} stopped pulling {ToPrettyString(args.Pulled.Owner):target}");
_alertsSystem.ClearAlert(euid, AlertType.Pulling);
RefreshMovementSpeed(component);