Remove disposal tubes component references and ECS some of it (#15188)
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
using System.Linq;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Disposal.Tube.Components;
|
||||
using Content.Server.Disposal.Tube;
|
||||
using Content.Server.Disposal.Tube.Components;
|
||||
using Content.Server.Disposal.Unit.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
|
||||
namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
{
|
||||
@@ -90,7 +88,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
}
|
||||
|
||||
// Note: This function will cause an ExitDisposals on any failure that does not make an ExitDisposals impossible.
|
||||
public bool EnterTube(EntityUid holderUid, EntityUid toUid, DisposalHolderComponent? holder = null, TransformComponent? holderTransform = null, IDisposalTubeComponent? to = null, TransformComponent? toTransform = null)
|
||||
public bool EnterTube(EntityUid holderUid, EntityUid toUid, DisposalHolderComponent? holder = null, TransformComponent? holderTransform = null, DisposalTubeComponent? to = null, TransformComponent? toTransform = null)
|
||||
{
|
||||
if (!Resolve(holderUid, ref holder, ref holderTransform))
|
||||
return false;
|
||||
@@ -124,7 +122,9 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
holder.PreviousDirection = holder.CurrentDirection;
|
||||
}
|
||||
holder.CurrentTube = to;
|
||||
holder.CurrentDirection = to.NextDirection(holder);
|
||||
var ev = new GetDisposalsNextDirectionEvent(holder);
|
||||
RaiseLocalEvent(toUid, ref ev);
|
||||
holder.CurrentDirection = ev.Next;
|
||||
holder.StartingTime = 0.1f;
|
||||
holder.TimeLeft = 0.1f;
|
||||
// Logger.InfoS("c.s.disposal.holder", $"Disposals dir {holder.CurrentDirection}");
|
||||
@@ -192,7 +192,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
}
|
||||
|
||||
// Perform remainder of entry process
|
||||
if (!EnterTube((holder).Owner, nextTube.Owner, holder, null, nextTube, null))
|
||||
if (!EnterTube((holder).Owner, nextTube.Owner, holder))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user