]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
AI context menu fix (#37224)
authorB_Kirill <153602297+B-Kirill@users.noreply.github.com>
Wed, 7 May 2025 23:48:39 +0000 (09:48 +1000)
committerGitHub <noreply@github.com>
Wed, 7 May 2025 23:48:39 +0000 (19:48 -0400)
* AI context menu fix

* Revert "AI context menu fix"

This reverts commit 86a0476fcb0aa952c0dcadb1bc4246532abd62b7.

* Better implementation

* Retry

Content.Shared/Silicons/StationAi/SharedStationAiSystem.Held.cs

index 4b0fbdcf4b5b5b34e05ed47922b7b3fb3409febd..1c9c57dccf789cd6e3e2c1986d2b115846a44684 100644 (file)
@@ -157,6 +157,9 @@ public abstract partial class SharedStationAiSystem
 
     private void OnTargetVerbs(Entity<StationAiWhitelistComponent> ent, ref GetVerbsEvent<AlternativeVerb> args)
     {
+        if (!_uiSystem.HasUi(args.Target, AiUi.Key))
+            return;
+
         if (!args.CanComplexInteract
             || !HasComp<StationAiHeldComponent>(args.User)
             || !args.CanInteract)