conveyor & recycler ecs (#4537)

* conveyor done, recycler still todo

* done, just need to suss out the physics part. pinged sloth about it

* ship it
This commit is contained in:
Paul Ritter
2021-09-10 09:26:05 +02:00
committed by GitHub
parent 32d25431c0
commit 4c7670fe82
9 changed files with 208 additions and 300 deletions

View File

@@ -26,17 +26,18 @@ namespace Content.Client.Conveyor.Visualizers
return; return;
} }
appearance.TryGetData(ConveyorVisuals.State, out ConveyorState state); if (appearance.TryGetData(ConveyorVisuals.State, out ConveyorState state))
var texture = state switch
{ {
ConveyorState.Off => _stateStopped, var texture = state switch
ConveyorState.Forward => _stateRunning, {
ConveyorState.Reversed => _stateReversed, ConveyorState.Off => _stateStopped,
_ => throw new ArgumentOutOfRangeException() ConveyorState.Forward => _stateRunning,
}; ConveyorState.Reversed => _stateReversed,
_ => throw new ArgumentOutOfRangeException()
};
sprite.LayerSetState(0, texture); sprite.LayerSetState(0, texture);
}
} }
public override void InitializeEntity(IEntity entity) public override void InitializeEntity(IEntity entity)

View File

@@ -1,4 +1,5 @@
using Content.Shared.Recycling; using Content.Shared.Conveyor;
using Content.Shared.Recycling;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
@@ -9,11 +10,11 @@ namespace Content.Client.Recycling
[UsedImplicitly] [UsedImplicitly]
public class RecyclerVisualizer : AppearanceVisualizer public class RecyclerVisualizer : AppearanceVisualizer
{ {
[DataField("state_clean")] [DataField("state_on")]
private string? _stateClean; private string _stateOn = "grinder-o1";
[DataField("state_bloody")] [DataField("state_off")]
private string? _stateBloody; private string _stateOff = "grinder-o0";
public override void InitializeEntity(IEntity entity) public override void InitializeEntity(IEntity entity)
{ {
@@ -25,10 +26,7 @@ namespace Content.Client.Recycling
return; return;
} }
appearance.TryGetData(RecyclerVisuals.Bloody, out bool bloody); UpdateAppearance(appearance, sprite);
sprite.LayerSetState(RecyclerVisualLayers.Bloody, bloody
? _stateBloody
: _stateClean);
} }
public override void OnChangeData(AppearanceComponent component) public override void OnChangeData(AppearanceComponent component)
@@ -40,15 +38,28 @@ namespace Content.Client.Recycling
return; return;
} }
component.TryGetData(RecyclerVisuals.Bloody, out bool bloody); UpdateAppearance(component, sprite);
sprite.LayerSetState(RecyclerVisualLayers.Bloody, bloody }
? _stateBloody
: _stateClean); private void UpdateAppearance(AppearanceComponent component, ISpriteComponent sprite)
{
var state = _stateOff;
if (component.TryGetData(ConveyorVisuals.State, out ConveyorState conveyorState) && conveyorState != ConveyorState.Off)
{
state = _stateOn;
}
if (component.TryGetData(RecyclerVisuals.Bloody, out bool bloody) && bloody)
{
state += "bld";
}
sprite.LayerSetState(RecyclerVisualLayers.Main, state);
} }
} }
public enum RecyclerVisualLayers : byte public enum RecyclerVisualLayers : byte
{ {
Bloody Main
} }
} }

View File

@@ -1,9 +1,11 @@
using System.Collections.Generic;
using Content.Server.Items; using Content.Server.Items;
using Content.Server.MachineLinking.Components; using Content.Server.MachineLinking.Components;
using Content.Server.Power.Components; using Content.Server.Power.Components;
using Content.Shared.Conveyor; using Content.Shared.Conveyor;
using Content.Shared.MachineLinking; using Content.Shared.MachineLinking;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Analyzers;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Maths; using Robust.Shared.Maths;
@@ -14,151 +16,29 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.Conveyor namespace Content.Server.Conveyor
{ {
[RegisterComponent] [RegisterComponent]
[Friend(typeof(ConveyorSystem))]
public class ConveyorComponent : Component public class ConveyorComponent : Component
{ {
public override string Name => "Conveyor"; public override string Name => "Conveyor";
[ViewVariables] private bool Powered => !Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) || receiver.Powered;
/// <summary> /// <summary>
/// The angle to move entities by in relation to the owner's rotation. /// The angle to move entities by in relation to the owner's rotation.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("angle")] [DataField("angle")]
private Angle _angle = Angle.Zero; public Angle Angle = Angle.Zero;
public float Speed => _speed;
/// <summary> /// <summary>
/// The amount of units to move the entity by per second. /// The amount of units to move the entity by per second.
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
[DataField("speed")] [DataField("speed")]
private float _speed = 2f; public float Speed = 2f;
private ConveyorState _state;
/// <summary> /// <summary>
/// The current state of this conveyor /// The current state of this conveyor
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
private ConveyorState State public ConveyorState State;
{
get => _state;
set
{
_state = value;
UpdateAppearance();
}
}
public override void HandleMessage(ComponentMessage message, IComponent? component)
{
base.HandleMessage(message, component);
switch (message)
{
case PowerChangedMessage powerChanged:
OnPowerChanged(powerChanged);
break;
}
}
private void OnPowerChanged(PowerChangedMessage e)
{
UpdateAppearance();
}
private void UpdateAppearance()
{
if (Owner.TryGetComponent<AppearanceComponent>(out var appearance))
{
if (Powered)
{
appearance.SetData(ConveyorVisuals.State, _state);
}
else
{
appearance.SetData(ConveyorVisuals.State, ConveyorState.Off);
}
}
}
/// <summary>
/// Calculates the angle in which entities on top of this conveyor
/// belt are pushed in
/// </summary>
/// <returns>
/// The angle when taking into account if the conveyor is reversed
/// </returns>
public Angle GetAngle()
{
var adjustment = _state == ConveyorState.Reversed ? MathHelper.Pi : 0;
var radians = MathHelper.DegreesToRadians(_angle);
return new Angle(Owner.Transform.LocalRotation.Theta + radians + adjustment);
}
public bool CanRun()
{
if (State == ConveyorState.Off)
{
return false;
}
if (Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) &&
!receiver.Powered)
{
return false;
}
if (Owner.HasComponent<ItemComponent>())
{
return false;
}
return true;
}
public bool CanMove(IEntity entity)
{
// TODO We should only check status InAir or Static or MapGrid or /mayber/ container
if (entity == Owner)
{
return false;
}
if (!entity.TryGetComponent(out IPhysBody? physics) ||
physics.BodyType == BodyType.Static)
{
return false;
}
if (entity.HasComponent<ConveyorComponent>())
{
return false;
}
if (entity.HasComponent<IMapGridComponent>())
{
return false;
}
if (entity.IsInContainer())
{
return false;
}
return true;
}
public void SetState(TwoWayLeverSignal signal)
{
State = signal switch
{
TwoWayLeverSignal.Left => ConveyorState.Reversed,
TwoWayLeverSignal.Middle => ConveyorState.Off,
TwoWayLeverSignal.Right => ConveyorState.Forward,
_ => ConveyorState.Off
};
}
} }
} }

View File

@@ -1,15 +1,29 @@
using Content.Server.MachineLinking.Events; using System.Collections.Generic;
using Content.Server.Items;
using Content.Server.MachineLinking.Events;
using Content.Server.MachineLinking.Models; using Content.Server.MachineLinking.Models;
using Content.Server.Power.Components;
using Content.Server.Recycling.Components;
using Content.Server.Stunnable.Components; using Content.Server.Stunnable.Components;
using Content.Shared.Conveyor;
using Content.Shared.MachineLinking; using Content.Shared.MachineLinking;
using Content.Shared.Movement.Components;
using Content.Shared.Notification.Managers; using Content.Shared.Notification.Managers;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Dynamics;
namespace Content.Server.Conveyor namespace Content.Server.Conveyor
{ {
public class ConveyorSystem : EntitySystem public class ConveyorSystem : EntitySystem
{ {
[Dependency] private IEntityLookup _entityLookup = default!;
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
@@ -17,6 +31,27 @@ namespace Content.Server.Conveyor
SubscribeLocalEvent<ConveyorComponent, SignalReceivedEvent>(OnSignalReceived); SubscribeLocalEvent<ConveyorComponent, SignalReceivedEvent>(OnSignalReceived);
SubscribeLocalEvent<ConveyorComponent, PortDisconnectedEvent>(OnPortDisconnected); SubscribeLocalEvent<ConveyorComponent, PortDisconnectedEvent>(OnPortDisconnected);
SubscribeLocalEvent<ConveyorComponent, LinkAttemptEvent>(OnLinkAttempt); SubscribeLocalEvent<ConveyorComponent, LinkAttemptEvent>(OnLinkAttempt);
SubscribeLocalEvent<ConveyorComponent, PowerChangedEvent>(OnPowerChanged);
}
private void OnPowerChanged(EntityUid uid, ConveyorComponent component, PowerChangedEvent args)
{
UpdateAppearance(component);
}
private void UpdateAppearance(ConveyorComponent component)
{
if (component.Owner.TryGetComponent<AppearanceComponent>(out var appearance))
{
if (component.Owner.TryGetComponent<ApcPowerReceiverComponent>(out var receiver) && receiver.Powered)
{
appearance.SetData(ConveyorVisuals.State, component.State);
}
else
{
appearance.SetData(ConveyorVisuals.State, ConveyorState.Off);
}
}
} }
private void OnLinkAttempt(EntityUid uid, ConveyorComponent component, LinkAttemptEvent args) private void OnLinkAttempt(EntityUid uid, ConveyorComponent component, LinkAttemptEvent args)
@@ -35,7 +70,7 @@ namespace Content.Server.Conveyor
private void OnPortDisconnected(EntityUid uid, ConveyorComponent component, PortDisconnectedEvent args) private void OnPortDisconnected(EntityUid uid, ConveyorComponent component, PortDisconnectedEvent args)
{ {
component.SetState(TwoWayLeverSignal.Middle); SetState(component, TwoWayLeverSignal.Middle);
} }
private void OnSignalReceived(EntityUid uid, ConveyorComponent component, SignalReceivedEvent args) private void OnSignalReceived(EntityUid uid, ConveyorComponent component, SignalReceivedEvent args)
@@ -43,9 +78,92 @@ namespace Content.Server.Conveyor
switch (args.Port) switch (args.Port)
{ {
case "state": case "state":
component.SetState((TwoWayLeverSignal) args.Value!); SetState(component, (TwoWayLeverSignal) args.Value!);
break; break;
} }
} }
private void SetState(ConveyorComponent component, TwoWayLeverSignal signal)
{
component.State = signal switch
{
TwoWayLeverSignal.Left => ConveyorState.Reversed,
TwoWayLeverSignal.Middle => ConveyorState.Off,
TwoWayLeverSignal.Right => ConveyorState.Forward,
_ => ConveyorState.Off
};
UpdateAppearance(component);
}
public bool CanRun(ConveyorComponent component)
{
if (component.State == ConveyorState.Off)
{
return false;
}
if (component.Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) &&
!receiver.Powered)
{
return false;
}
if (component.Owner.HasComponent<ItemComponent>())
{
return false;
}
return true;
}
/// <summary>
/// Calculates the angle in which entities on top of this conveyor
/// belt are pushed in
/// </summary>
/// <returns>
/// The angle when taking into account if the conveyor is reversed
/// </returns>
public Angle GetAngle(ConveyorComponent component)
{
var adjustment = component.State == ConveyorState.Reversed ? MathHelper.Pi/2 : -MathHelper.Pi/2;
var radians = MathHelper.DegreesToRadians(component.Angle);
return new Angle(component.Owner.Transform.LocalRotation.Theta + radians + adjustment);
}
public IEnumerable<(IEntity, IPhysBody)> GetEntitiesToMove(ConveyorComponent comp)
{
//todo uuuhhh cache this
foreach (var entity in _entityLookup.GetEntitiesIntersecting(comp.Owner, LookupFlags.Approximate))
{
if (entity.Deleted)
{
continue;
}
if (entity == comp.Owner)
{
continue;
}
if (!entity.TryGetComponent(out IPhysBody? physics) ||
physics.BodyType == BodyType.Static || physics.BodyStatus == BodyStatus.InAir || entity.IsWeightless())
{
continue;
}
if (entity.HasComponent<IMapGridComponent>())
{
continue;
}
if (entity.IsInContainer())
{
continue;
}
yield return (entity, physics);
}
}
} }
} }

View File

@@ -18,102 +18,43 @@ namespace Content.Server.Physics.Controllers
public override void UpdateBeforeSolve(bool prediction, float frameTime) public override void UpdateBeforeSolve(bool prediction, float frameTime)
{ {
base.UpdateBeforeSolve(prediction, frameTime); base.UpdateBeforeSolve(prediction, frameTime);
var system = EntitySystem.Get<ConveyorSystem>();
foreach (var comp in ComponentManager.EntityQuery<ConveyorComponent>()) foreach (var comp in ComponentManager.EntityQuery<ConveyorComponent>())
{ {
Convey(comp, frameTime); Convey(system, comp, frameTime);
}
// TODO: Uhh you can probably wrap the recycler's conveying properties into... conveyor
foreach (var comp in ComponentManager.EntityQuery<RecyclerComponent>())
{
ConveyRecycler(comp, frameTime);
} }
} }
private void Convey(ConveyorComponent comp, float frameTime) private void Convey(ConveyorSystem system, ConveyorComponent comp, float frameTime)
{ {
// TODO: Use ICollideBehavior and cache intersecting
// Use an event for conveyors to know what needs to run // Use an event for conveyors to know what needs to run
if (!comp.CanRun()) if (!system.CanRun(comp))
{ {
return; return;
} }
var intersecting = IoCManager.Resolve<IEntityLookup>().GetEntitiesIntersecting(comp.Owner, LookupFlags.Approximate | LookupFlags.IncludeAnchored); var direction = system.GetAngle(comp).ToVec();
var direction = comp.GetAngle().ToVec(); var ownerPos = comp.Owner.Transform.WorldPosition;
Vector2? ownerPos = null;
foreach (var entity in intersecting) foreach (var (entity, physics) in EntitySystem.Get<ConveyorSystem>().GetEntitiesToMove(comp))
{ {
if (!comp.CanMove(entity)) continue; var itemRelativeToConveyor = entity.Transform.WorldPosition - ownerPos;
physics.LinearVelocity += Convey(direction, comp.Speed, frameTime, itemRelativeToConveyor);
if (!entity.TryGetComponent(out IPhysBody? physics) || physics.BodyStatus == BodyStatus.InAir ||
entity.IsWeightless()) continue;
ownerPos ??= comp.Owner.Transform.WorldPosition;
var itemRelativeToConveyor = entity.Transform.WorldPosition - ownerPos.Value;
physics.LinearVelocity += Convey(direction * comp.Speed, frameTime, itemRelativeToConveyor);
} }
} }
// TODO Uhhh I did a shit job plz fix smug private Vector2 Convey(Vector2 direction, float speed, float frameTime, Vector2 itemRelativeToConveyor)
private Vector2 Convey(Vector2 velocityDirection, float frameTime, Vector2 itemRelativeToConveyor)
{ {
//gravitating item towards center if(speed == 0 || direction.Length == 0) return Vector2.Zero;
//http://csharphelper.com/blog/2016/09/find-the-shortest-distance-between-a-point-and-a-line-segment-in-c/ direction = direction.Normalized;
Vector2 centerPoint;
var t = 0f; var dirNormal = new Vector2(direction.Y, direction.X);
if (velocityDirection.Length > 0) // if velocitydirection is 0, this calculation will divide by 0 var dot = Vector2.Dot(itemRelativeToConveyor, dirNormal);
{
t = Vector2.Dot(itemRelativeToConveyor, velocityDirection) /
Vector2.Dot(velocityDirection, velocityDirection);
}
if (t < 0) var velocity = direction * speed * 5;
{ velocity += dirNormal * speed * -dot;
centerPoint = new Vector2();
}
else if (t > 1)
{
centerPoint = velocityDirection;
}
else
{
centerPoint = velocityDirection * t;
}
var delta = centerPoint - itemRelativeToConveyor; return velocity * frameTime;
return delta * (400 * delta.Length) * frameTime;
}
private void ConveyRecycler(RecyclerComponent comp, float frameTime)
{
if (!comp.CanRun())
{
comp.Intersecting.Clear();
return;
}
var direction = Vector2.UnitX;
Vector2? ownerPos = null;
// TODO: I know it sucks but conveyors need a refactor
for (var i = comp.Intersecting.Count - 1; i >= 0; i--)
{
var entity = comp.Intersecting[i];
if (entity.Deleted || !comp.CanMove(entity) || !IoCManager.Resolve<IEntityLookup>().IsIntersecting(comp.Owner, entity))
{
comp.Intersecting.RemoveAt(i);
continue;
}
if (!entity.TryGetComponent(out IPhysBody? physics)) continue;
ownerPos ??= comp.Owner.Transform.WorldPosition;
physics.LinearVelocity += Convey(direction, frameTime, entity.Transform.WorldPosition - ownerPos.Value);
}
} }
} }
} }

View File

@@ -13,6 +13,7 @@ using Content.Shared.Notification.Managers;
using Content.Shared.Recycling; using Content.Shared.Recycling;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Server.Player; using Robust.Server.Player;
using Robust.Shared.Analyzers;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC; using Robust.Shared.IoC;
@@ -27,28 +28,25 @@ namespace Content.Server.Recycling.Components
{ {
// TODO: Add sound and safe beep // TODO: Add sound and safe beep
[RegisterComponent] [RegisterComponent]
[Friend(typeof(RecyclerSystem))]
public class RecyclerComponent : Component, ISuicideAct public class RecyclerComponent : Component, ISuicideAct
{ {
public override string Name => "Recycler"; public override string Name => "Recycler";
public List<IEntity> Intersecting { get; set; } = new();
/// <summary> /// <summary>
/// Whether or not sentient beings will be recycled /// Whether or not sentient beings will be recycled
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [DataField("safe")] [ViewVariables(VVAccess.ReadWrite)]
[DataField("safe")]
internal bool Safe = true; internal bool Safe = true;
/// <summary> /// <summary>
/// The percentage of material that will be recovered /// The percentage of material that will be recovered
/// </summary> /// </summary>
[ViewVariables(VVAccess.ReadWrite)] [DataField("efficiency")] [ViewVariables(VVAccess.ReadWrite)]
[DataField("efficiency")]
internal float Efficiency = 0.25f; internal float Efficiency = 0.25f;
internal bool Powered =>
!Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) ||
receiver.Powered;
private void Clean() private void Clean()
{ {
if (Owner.TryGetComponent(out AppearanceComponent? appearance)) if (Owner.TryGetComponent(out AppearanceComponent? appearance))
@@ -57,53 +55,6 @@ namespace Content.Server.Recycling.Components
} }
} }
public bool CanRun()
{
if (Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) &&
!receiver.Powered)
{
return false;
}
if (Owner.HasComponent<ItemComponent>())
{
return false;
}
return true;
}
public bool CanMove(IEntity entity)
{
if (entity == Owner)
{
return false;
}
if (!entity.TryGetComponent(out IPhysBody? physics) ||
physics.BodyType == BodyType.Static)
{
return false;
}
if (entity.HasComponent<ConveyorComponent>())
{
return false;
}
if (entity.HasComponent<IMapGridComponent>())
{
return false;
}
if (entity.IsInContainer())
{
return false;
}
return true;
}
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat) SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
{ {
var mind = victim.PlayerSession()?.ContentData()?.Mind; var mind = victim.PlayerSession()?.ContentData()?.Mind;

View File

@@ -1,12 +1,17 @@
using System.Collections.Generic;
using Content.Server.Power.Components;
using Content.Server.Recycling.Components; using Content.Server.Recycling.Components;
using Content.Shared.Body.Components; using Content.Shared.Body.Components;
using Content.Shared.Recycling; using Content.Shared.Recycling;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Dynamics; using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Utility;
namespace Content.Server.Recycling namespace Content.Server.Recycling
{ {
internal sealed class RecyclerSystem: EntitySystem internal sealed class RecyclerSystem : EntitySystem
{ {
public override void Initialize() public override void Initialize()
{ {
@@ -21,11 +26,6 @@ namespace Content.Server.Recycling
private void Recycle(RecyclerComponent component, IEntity entity) private void Recycle(RecyclerComponent component, IEntity entity)
{ {
if (!component.Intersecting.Contains(entity))
{
component.Intersecting.Add(entity);
}
// TODO: Prevent collision with recycled items // TODO: Prevent collision with recycled items
// Can only recycle things that are recyclable... And also check the safety of the thing to recycle. // Can only recycle things that are recyclable... And also check the safety of the thing to recycle.
@@ -45,7 +45,8 @@ namespace Content.Server.Recycling
private bool CanGib(RecyclerComponent component, IEntity entity) private bool CanGib(RecyclerComponent component, IEntity entity)
{ {
// We suppose this entity has a Recyclable component. // We suppose this entity has a Recyclable component.
return entity.HasComponent<SharedBodyComponent>() && !component.Safe && component.Powered; return entity.HasComponent<SharedBodyComponent>() && !component.Safe &&
component.Owner.TryGetComponent(out ApcPowerReceiverComponent? receiver) && receiver.Powered;
} }
public void Bloodstain(RecyclerComponent component) public void Bloodstain(RecyclerComponent component)

View File

@@ -20,11 +20,17 @@
netsync: false netsync: false
sprite: Structures/Machines/recycling.rsi sprite: Structures/Machines/recycling.rsi
layers: layers:
- state: grinder-o1 - state: grinder-o0
map: ["enum.RecyclerVisualLayers.Bloody"] map: ["enum.RecyclerVisualLayers.Main"]
- type: Appearance - type: Appearance
visuals: visuals:
- type: RecyclerVisualizer - type: RecyclerVisualizer
state_clean: grinder-o1 state_on: grinder-o1
state_bloody: grinder-o1bld state_off: grinder-o0
- type: Recycler - type: Recycler
- type: Conveyor
- type: SignalReceiver
inputs:
- name: state
type: Content.Shared.MachineLinking.TwoWayLeverSignal
maxConnections: 1

View File

@@ -13,12 +13,11 @@
!type:PhysShapeAabb !type:PhysShapeAabb
bounds: "-0.49,-0.49,0.49,0.49" bounds: "-0.49,-0.49,0.49,0.49"
hard: false hard: false
layer: [Passable] layer:
mask: - Opaque
- Impassable - Impassable
- MobImpassable - MobImpassable
- VaultImpassable - VaultImpassable
- SmallImpassable
- type: SnapGrid - type: SnapGrid
- type: Sprite - type: Sprite
netsync: false netsync: false