diff --git a/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs b/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs index 45cf43d549..b8172af7d3 100644 --- a/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs +++ b/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs @@ -14,6 +14,8 @@ using Robust.Shared.Map; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; +using Robust.Shared.Map.Components; + namespace Content.Server._CP14.Demiplane; @@ -139,8 +141,8 @@ public sealed partial class CP14DemiplaneSystem if (generator.Comp.Location is null) return; - //We cant open demiplan in another demiplan - if (HasComp(Transform(generator).MapUid)) + //We cant open demiplan in another demiplan or if parent is not Map + if (HasComp(Transform(generator).MapUid) || !HasComp(_transform.GetParentUid(args.User))) { _popup.PopupEntity(Loc.GetString("cp14-demiplan-cannot-open", ("name", MetaData(generator).EntityName)), generator, args.User); return; diff --git a/Resources/Locale/en-US/_CP14/demiplan/demiplan.ftl b/Resources/Locale/en-US/_CP14/demiplan/demiplan.ftl index 89f1c4f5c0..e77939efae 100644 --- a/Resources/Locale/en-US/_CP14/demiplan/demiplan.ftl +++ b/Resources/Locale/en-US/_CP14/demiplan/demiplan.ftl @@ -1,3 +1,3 @@ cp14-demiplan-active-rift-warning = {$name} begins dragging surrounding creatures into the demiplane! -cp14-demiplan-cannot-open = You can't use {$name} here. \ No newline at end of file +cp14-demiplan-cannot-open = You can't use {$name} here. diff --git a/Resources/Locale/ru-RU/_CP14/demiplan/demiplan.ftl b/Resources/Locale/ru-RU/_CP14/demiplan/demiplan.ftl index 3663f4d16c..fc0cea1a52 100644 --- a/Resources/Locale/ru-RU/_CP14/demiplan/demiplan.ftl +++ b/Resources/Locale/ru-RU/_CP14/demiplan/demiplan.ftl @@ -1,3 +1,3 @@ cp14-demiplan-active-rift-warning = {$name} начинает затягивать окружающих существ в демиплан! -cp14-demiplan-cannot-open = Вы не можете использовать {$name} здесь. \ No newline at end of file +cp14-demiplan-cannot-open = Вы не можете использовать {$name} здесь.