if (xform.ParentUid != xform.GridUid) // Still, don't portal.
return;
- if (xform.ParentUid != Transform(component.FirstPortal!.Value).ParentUid)
+ if (!component.AllowPortalsOnDifferentGrids && xform.ParentUid != Transform(component.FirstPortal!.Value).ParentUid)
{
// Whoops. Fizzle time. Crime time too because yippee I'm not refactoring this logic right now (I started to, I'm not going to.)
FizzlePortals(uid, component, user, true);
-using Content.Shared.DoAfter;
+using Content.Shared.DoAfter;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
[ViewVariables, DataField("secondPortal")]
public EntityUid? SecondPortal = null;
+ /// <summary>
+ /// Portals can't be placed on different grids?
+ /// </summary>
+ [DataField]
+ public bool AllowPortalsOnDifferentGrids;
+
[DataField("firstPortalPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string FirstPortalPrototype = "PortalRed";