diff --git a/Content.Server/Defusable/Systems/DefusableSystem.cs b/Content.Server/Defusable/Systems/DefusableSystem.cs index 6f9873e7b9..ca5c6f5a09 100644 --- a/Content.Server/Defusable/Systems/DefusableSystem.cs +++ b/Content.Server/Defusable/Systems/DefusableSystem.cs @@ -136,7 +136,7 @@ public sealed class DefusableSystem : SharedDefusableSystem { _trigger.HandleTimerTrigger( uid, - null, + user, timerTrigger.Delay, timerTrigger.BeepInterval, timerTrigger.InitialBeepDelay, @@ -147,14 +147,12 @@ public sealed class DefusableSystem : SharedDefusableSystem RaiseLocalEvent(uid, new BombArmedEvent(uid)); _appearance.SetData(uid, DefusableVisuals.Active, comp.Activated); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):entity} begun a countdown on {ToPrettyString(uid):entity}"); if (TryComp(uid, out var wiresPanelComponent)) _wiresSystem.TogglePanel(uid, wiresPanelComponent, false); } - public void TryDetonateBomb(EntityUid uid, DefusableComponent comp) + public void TryDetonateBomb(EntityUid uid, EntityUid detonator, DefusableComponent comp) { if (!comp.Activated) return; @@ -163,13 +161,10 @@ public sealed class DefusableSystem : SharedDefusableSystem RaiseLocalEvent(uid, new BombDetonatedEvent(uid)); - _explosion.TriggerExplosive(uid); + _explosion.TriggerExplosive(uid, user:detonator); QueueDel(uid); _appearance.SetData(uid, DefusableVisuals.Active, comp.Activated); - - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(uid):entity} has been detonated."); } public void TryDefuseBomb(EntityUid uid, DefusableComponent comp) @@ -204,8 +199,6 @@ public sealed class DefusableSystem : SharedDefusableSystem _transform.Unanchor(uid, xform); _appearance.SetData(uid, DefusableVisuals.Active, comp.Activated); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(uid):entity} has been defused!"); } // jesus christ @@ -249,9 +242,6 @@ public sealed class DefusableSystem : SharedDefusableSystem _trigger.TryDelay(wire.Owner, 30f); _popup.PopupEntity(Loc.GetString("defusable-popup-wire-chirp", ("name", wire.Owner)), wire.Owner); comp.DelayWireUsed = true; - - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} pulsed the DeLAY wire of {ToPrettyString(wire.Owner):entity}."); } public bool ProceedWireCut(EntityUid user, Wire wire, DefusableComponent comp) @@ -262,9 +252,6 @@ public sealed class DefusableSystem : SharedDefusableSystem _popup.PopupEntity(Loc.GetString("defusable-popup-wire-proceed-pulse", ("name", wire.Owner)), wire.Owner); SetDisplayTime(comp, false); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} cut the PRoCeeD wire of {ToPrettyString(wire.Owner):entity}."); - comp.ProceedWireCut = true; return true; } @@ -277,9 +264,6 @@ public sealed class DefusableSystem : SharedDefusableSystem _trigger.TryDelay(wire.Owner, -15f); } - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} pulsed the PRoCeeD wire of {ToPrettyString(wire.Owner):entity}."); - _popup.PopupEntity(Loc.GetString("defusable-popup-wire-proceed-pulse", ("name", wire.Owner)), wire.Owner); } @@ -295,9 +279,6 @@ public sealed class DefusableSystem : SharedDefusableSystem $"{ToPrettyString(user):user} has defused {ToPrettyString(wire.Owner):entity}!"); } - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} cut the LIVE wire of {ToPrettyString(wire.Owner):entity}."); - return true; } @@ -313,15 +294,11 @@ public sealed class DefusableSystem : SharedDefusableSystem _trigger.TryDelay(wire.Owner, 30f); _popup.PopupEntity(Loc.GetString("defusable-popup-wire-chirp", ("name", wire.Owner)), wire.Owner); comp.ActivatedWireUsed = true; - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} pulsed the LIVE wire of {ToPrettyString(wire.Owner):entity}."); } } else { TryStartCountdown(wire.Owner, user, comp); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} pulsed the LIVE wire of {ToPrettyString(wire.Owner):entity} and begun the countdown."); } } @@ -329,15 +306,11 @@ public sealed class DefusableSystem : SharedDefusableSystem { if (comp.Activated) { - EntityManager.System().TryDetonateBomb(wire.Owner, comp); - _adminLogger.Add(LogType.Explosion, LogImpact.Extreme, - $"{ToPrettyString(user):user} cut the BOOM wire of {ToPrettyString(wire.Owner):entity} and caused it to detonate!"); + TryDetonateBomb(wire.Owner, user, comp); } else { - EntityManager.System().SetUsable(comp, false); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} cut the BOOM wire of {ToPrettyString(wire.Owner):entity}."); + SetUsable(comp, false); } return true; } @@ -347,9 +320,6 @@ public sealed class DefusableSystem : SharedDefusableSystem if (comp is { Activated: false, Usable: false }) { SetUsable(comp, true); - - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} mended the BOOM wire of {ToPrettyString(wire.Owner):entity}."); } // you're already dead lol return true; @@ -359,10 +329,8 @@ public sealed class DefusableSystem : SharedDefusableSystem { if (comp.Activated) { - TryDetonateBomb(wire.Owner, comp); + TryDetonateBomb(wire.Owner, user, comp); } - _adminLogger.Add(LogType.Explosion, LogImpact.Extreme, - $"{ToPrettyString(user):user} pulsed the BOOM wire of {ToPrettyString(wire.Owner):entity} and caused it to detonate!"); } public bool BoltWireMend(EntityUid user, Wire wire, DefusableComponent comp) @@ -374,9 +342,6 @@ public sealed class DefusableSystem : SharedDefusableSystem _audio.PlayPvs(comp.BoltSound, wire.Owner); _popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} mended the BOLT wire of {ToPrettyString(wire.Owner):entity}!"); - return true; } @@ -389,18 +354,12 @@ public sealed class DefusableSystem : SharedDefusableSystem _audio.PlayPvs(comp.BoltSound, wire.Owner); _popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner); - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} cut the BOLT wire of {ToPrettyString(wire.Owner):entity}!"); - return true; } public void BoltWirePulse(EntityUid user, Wire wire, DefusableComponent comp) { _popup.PopupEntity(Loc.GetString("defusable-popup-wire-bolt-pulse", ("name", wire.Owner)), wire.Owner); - - _adminLogger.Add(LogType.Explosion, LogImpact.High, - $"{ToPrettyString(user):user} pulsed the BOLT wire of {ToPrettyString(wire.Owner):entity}!"); } #endregion