From 02c766261763bd74294ee876969f0f958060fab6 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Sun, 15 Sep 2024 19:04:31 +0000 Subject: [PATCH] prevent using holo inside containers (#32068) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Guardian/GuardianSystem.cs | 6 ++++++ Resources/Locale/en-US/guardian/guardian.ftl | 1 + 2 files changed, 7 insertions(+) diff --git a/Content.Server/Guardian/GuardianSystem.cs b/Content.Server/Guardian/GuardianSystem.cs index ae4d0ca2b8..7a1b875756 100644 --- a/Content.Server/Guardian/GuardianSystem.cs +++ b/Content.Server/Guardian/GuardianSystem.cs @@ -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); diff --git a/Resources/Locale/en-US/guardian/guardian.ftl b/Resources/Locale/en-US/guardian/guardian.ftl index 9e0966630d..141646087d 100644 --- a/Resources/Locale/en-US/guardian/guardian.ftl +++ b/Resources/Locale/en-US/guardian/guardian.ftl @@ -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 -- 2.52.0