* demiplane crates fix #589 * change component to MapGridComponent * simplification * Update CP14DemiplanSystem.Generation.cs --------- Co-authored-by: Ed <edwardxperia2000@gmail.com>
This commit is contained in:
@@ -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<CP14DemiplaneComponent>(Transform(generator).MapUid))
|
||||
//We cant open demiplan in another demiplan or if parent is not Map
|
||||
if (HasComp<CP14DemiplaneComponent>(Transform(generator).MapUid) || !HasComp<MapGridComponent>(_transform.GetParentUid(args.User)))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("cp14-demiplan-cannot-open", ("name", MetaData(generator).EntityName)), generator, args.User);
|
||||
return;
|
||||
|
||||
@@ -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.
|
||||
cp14-demiplan-cannot-open = You can't use {$name} here.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cp14-demiplan-active-rift-warning = {$name} начинает затягивать окружающих существ в демиплан!
|
||||
|
||||
cp14-demiplan-cannot-open = Вы не можете использовать {$name} здесь.
|
||||
cp14-demiplan-cannot-open = Вы не можете использовать {$name} здесь.
|
||||
|
||||
Reference in New Issue
Block a user