From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Sat, 8 Jun 2024 05:36:29 +0000 (-0700) Subject: Add DoPopup data field to OnUseTimerTrigger (#28691) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=7f1933169eca9309953ffa0fb424763efd850e7a;p=space-station-14.git Add DoPopup data field to OnUseTimerTrigger (#28691) --- diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs index 786d29d94a..8725dd1ae7 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs @@ -171,7 +171,8 @@ public sealed partial class TriggerSystem if (args.Handled || HasComp(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, diff --git a/Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs b/Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs index 5e509cb10b..c4e6e787a4 100644 --- a/Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs +++ b/Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs @@ -45,5 +45,10 @@ namespace Content.Shared.Explosion.Components /// Whether you can examine the item to see its timer or not. /// [DataField] public bool Examinable = true; + + /// + /// Whether or not to show the user a popup when starting the timer. + /// + [DataField] public bool DoPopup = true; } }