]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
AI whitelist fix (#31542)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 28 Aug 2024 02:47:12 +0000 (12:47 +1000)
committerGitHub <noreply@github.com>
Wed, 28 Aug 2024 02:47:12 +0000 (12:47 +1000)
Content.Shared/Silicons/StationAi/SharedStationAiSystem.cs

index 348b0b04657d17f58f673e6ccde06dd8dda9a99d..17c592879c8f99f99d105730fdb5fb3b2cd7e675 100644 (file)
@@ -135,6 +135,9 @@ public abstract partial class SharedStationAiSystem : EntitySystem
 
     private void OnAiBuiCheck(Entity<StationAiWhitelistComponent> ent, ref BoundUserInterfaceCheckRangeEvent args)
     {
+        if (!HasComp<StationAiHeldComponent>(args.Actor))
+            return;
+
         args.Result = BoundUserInterfaceRangeResult.Fail;
 
         // Similar to the inrange check but more optimised so server doesn't die.