]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fixes Syndicate Bomb logs (#20240)
authorLankLTE <135308300+LankLTE@users.noreply.github.com>
Tue, 19 Sep 2023 01:51:13 +0000 (18:51 -0700)
committerGitHub <noreply@github.com>
Tue, 19 Sep 2023 01:51:13 +0000 (21:51 -0400)
* Fixed logs

* fix dumb entity stuff

Content.Server/Defusable/Systems/DefusableSystem.cs

index 6f9873e7b9085240a3ab5b6b2353bbf3336b433e..ca5c6f5a09759e97cef99b52c607d30f288641d8 100644 (file)
@@ -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<WiresPanelComponent>(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<DefusableSystem>().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<DefusableSystem>().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