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;
}
appearance.TryGetData(ConveyorVisuals.State, out ConveyorState state);
var texture = state switch
if (appearance.TryGetData(ConveyorVisuals.State, out ConveyorState state))
{
ConveyorState.Off => _stateStopped,
ConveyorState.Forward => _stateRunning,
ConveyorState.Reversed => _stateReversed,
_ => throw new ArgumentOutOfRangeException()
};
var texture = state switch
{
ConveyorState.Off => _stateStopped,
ConveyorState.Forward => _stateRunning,
ConveyorState.Reversed => _stateReversed,
_ => throw new ArgumentOutOfRangeException()
};
sprite.LayerSetState(0, texture);
sprite.LayerSetState(0, texture);
}
}
public override void InitializeEntity(IEntity entity)