]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
prevent using holo inside containers (#32068)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sun, 15 Sep 2024 19:04:31 +0000 (19:04 +0000)
committerGitHub <noreply@github.com>
Sun, 15 Sep 2024 19:04:31 +0000 (21:04 +0200)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/Guardian/GuardianSystem.cs
Resources/Locale/en-US/guardian/guardian.ftl

index ae4d0ca2b8cad330c3ca3c90bc1dd290f280bc04..7a1b875756e7365434a8fe5c776a1feaa0dae8da 100644 (file)
@@ -80,6 +80,12 @@ namespace Content.Server.Guardian
             if (args.Handled)
                 return;
 
+            if (_container.IsEntityInContainer(uid))
+            {
+                _popupSystem.PopupEntity(Loc.GetString("guardian-inside-container"), uid, uid);
+                return;
+            }
+
             if (component.HostedGuardian != null)
                 ToggleGuardian(uid, component);
 
index 9e0966630dd686ea509ecdae2a284584ee3948e5..141646087d381d5207ce4e7c8f43fdd89b68e585 100644 (file)
@@ -10,6 +10,7 @@ guardian-activator-empty-examine = [color=#ba1919]The injector is spent.[/color]
 guardian-activator-invalid-target = Only humans can be injected!
 guardian-no-soul = Your guardian has no soul.
 guardian-available = Your guardian now has a soul.
+guardian-inside-container = There's no room to release your guardian!
 
 ## Guardian entity specific