Make disposal pipes use generic visualizer (#9672)

This commit is contained in:
Leon Friedrich
2022-07-15 04:04:23 +12:00
committed by GitHub
parent a480b2e2fd
commit 9541eeb189
3 changed files with 79 additions and 119 deletions

View File

@@ -26,11 +26,6 @@ namespace Content.Server.Disposal.Tube.Components
[ViewVariables]
public Container Contents { get; private set; } = default!;
[ViewVariables]
private bool Anchored =>
!_entMan.TryGetComponent(Owner, out PhysicsComponent? physics) ||
physics.BodyType == BodyType.Static;
/// <summary>
/// The directions that this tube can connect to others from
/// </summary>
@@ -99,7 +94,8 @@ namespace Content.Server.Disposal.Tube.Components
return;
}
var state = Anchored
// TODO this should just generalized into some anchored-visuals system/comp, this has nothing to do with disposal tubes.
var state = _entMan.GetComponent<TransformComponent>(Owner).Anchored
? DisposalTubeVisualState.Anchored
: DisposalTubeVisualState.Free;