]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevent entities who do not have hands from setting off bombs. (#22250)
authorKP <13428215+nok-ko@users.noreply.github.com>
Sun, 10 Dec 2023 03:12:59 +0000 (19:12 -0800)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2023 03:12:59 +0000 (14:12 +1100)
Content.Server/Defusable/Systems/DefusableSystem.cs
Content.Server/Explosion/EntitySystems/TriggerSystem.OnUse.cs

index e9b074268f103d01c36e3f2d461b97118eb42694..c450fd04fb1d673ecc701723d383a1792a068749 100644 (file)
@@ -46,7 +46,7 @@ public sealed class DefusableSystem : SharedDefusableSystem
     /// </summary>
     private void OnGetAltVerbs(EntityUid uid, DefusableComponent comp, GetVerbsEvent<AlternativeVerb> args)
     {
-        if (!args.CanInteract || !args.CanAccess)
+        if (!args.CanInteract || !args.CanAccess || args.Hands == null)
             return;
 
         args.Verbs.Add(new AlternativeVerb
index c4b0d9c9ba1b87f42df45f02a30e74fb3ae236aa..7edca9b803a6ec77c4ebb0af30d4bd9f81e24f63 100644 (file)
@@ -45,7 +45,7 @@ public sealed partial class TriggerSystem
     /// </summary>
     private void OnGetAltVerbs(EntityUid uid, OnUseTimerTriggerComponent component, GetVerbsEvent<AlternativeVerb> args)
     {
-        if (!args.CanInteract || !args.CanAccess)
+        if (!args.CanInteract || !args.CanAccess || args.Hands == null)
             return;
 
         if (component.UseVerbInstead)