Add DoPopup data field to OnUseTimerTrigger (#28691)
This commit is contained in:
@@ -171,6 +171,7 @@ public sealed partial class TriggerSystem
|
|||||||
if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
|
if (args.Handled || HasComp<AutomatedTimerComponent>(uid) || component.UseVerbInstead)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (component.DoPopup)
|
||||||
_popupSystem.PopupEntity(Loc.GetString("trigger-activated", ("device", uid)), args.User, args.User);
|
_popupSystem.PopupEntity(Loc.GetString("trigger-activated", ("device", uid)), args.User, args.User);
|
||||||
|
|
||||||
HandleTimerTrigger(
|
HandleTimerTrigger(
|
||||||
|
|||||||
@@ -45,5 +45,10 @@ namespace Content.Shared.Explosion.Components
|
|||||||
/// Whether you can examine the item to see its timer or not.
|
/// Whether you can examine the item to see its timer or not.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField] public bool Examinable = true;
|
[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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user