]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add DoPopup data field to OnUseTimerTrigger (#28691)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Sat, 8 Jun 2024 05:36:29 +0000 (22:36 -0700)
committerGitHub <noreply@github.com>
Sat, 8 Jun 2024 05:36:29 +0000 (22:36 -0700)
Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs
Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs

index 786d29d94a96f7d0805a5abdef9a83897792565d..8725dd1ae738ed7ed921cd5f2d9fdaa8da58e577 100644 (file)
@@ -171,7 +171,8 @@ public sealed partial class TriggerSystem
         if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
             return;
 
-        _popupSystem.PopupEntity(Loc.GetString("trigger-activated", ("device", uid)), args.User, args.User);
+        if (component.DoPopup)
+            _popupSystem.PopupEntity(Loc.GetString("trigger-activated", ("device", uid)), args.User, args.User);
 
         HandleTimerTrigger(
             uid,
index 5e509cb10bbaeac9d85a49c68e6eb42bc3c90db8..c4e6e787a4aff96eb9450439a5a3cca99505c2dc 100644 (file)
@@ -45,5 +45,10 @@ namespace Content.Shared.Explosion.Components
         ///     Whether you can examine the item to see its timer or not.
         /// </summary>
         [DataField] public bool Examinable = true;
+
+        /// <summary>
+        ///     Whether or not to show the user a popup when starting the timer.
+        /// </summary>
+        [DataField] public bool DoPopup = true;
     }
 }