Remove disposal tubes component references and ECS some of it (#15188)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Server.Disposal.Unit.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
@@ -10,12 +9,9 @@ using static Content.Shared.Disposal.Components.SharedDisposalRouterComponent;
|
||||
namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
[Access(typeof(DisposalTubeSystem))]
|
||||
public sealed class DisposalRouterComponent : DisposalJunctionComponent
|
||||
{
|
||||
public override string ContainerId => "DisposalRouter";
|
||||
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
[DataField("tags")]
|
||||
@@ -30,18 +26,6 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
|
||||
[DataField("clickSound")] private SoundSpecifier _clickSound = new SoundPathSpecifier("/Audio/Machines/machine_switch.ogg");
|
||||
|
||||
public override Direction NextDirection(DisposalHolderComponent holder)
|
||||
{
|
||||
var directions = ConnectableDirections();
|
||||
|
||||
if (holder.Tags.Overlaps(Tags))
|
||||
{
|
||||
return directions[1];
|
||||
}
|
||||
|
||||
return _entMan.GetComponent<TransformComponent>(Owner).LocalRotation.GetDir();
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Reference in New Issue
Block a user