Disposals fixed under station rotation (#5067)
* Some sanity checks on disposals movement, fix the interpolator * Technically fix disposal routing, but I'm not done here yet * Remove disposals reliance on implicit direction sensing entirely.
This commit is contained in:
@@ -23,16 +23,16 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
public override Direction NextDirection(DisposalHolderComponent holder)
|
||||
{
|
||||
var directions = ConnectableDirections();
|
||||
var previousTube = holder.PreviousTube;
|
||||
var previousDF = holder.PreviousDirectionFrom;
|
||||
var forward = directions[0];
|
||||
|
||||
if (previousTube == null)
|
||||
if (previousDF == Direction.Invalid)
|
||||
{
|
||||
return forward;
|
||||
}
|
||||
|
||||
var backward = directions[1];
|
||||
return DirectionTo(previousTube) == forward ? backward : forward;
|
||||
return previousDF == forward ? backward : forward;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user