ECS cargo telepad and cleanup (#6450)

Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2022-02-15 15:01:45 +11:00
committed by GitHub
parent baa16c96b4
commit 334568dad2
16 changed files with 368 additions and 160 deletions

View File

@@ -60,7 +60,7 @@ namespace Content.Server.Cargo.Components
private SoundSpecifier _errorSound = new SoundPathSpecifier("/Audio/Effects/error.ogg");
private bool Powered => !_entMan.TryGetComponent(Owner, out ApcPowerReceiverComponent? receiver) || receiver.Powered;
private CargoConsoleSystem _cargoConsoleSystem = default!;
private CargoSystem _cargoConsoleSystem = default!;
[ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(CargoConsoleUiKey.Key);
@@ -76,7 +76,7 @@ namespace Content.Server.Cargo.Components
UserInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage;
}
_cargoConsoleSystem = EntitySystem.Get<CargoConsoleSystem>();
_cargoConsoleSystem = EntitySystem.Get<CargoSystem>();
BankAccount = _cargoConsoleSystem.StationAccount;
}
@@ -188,7 +188,7 @@ namespace Content.Server.Cargo.Components
orders.Database.ClearOrderCapacity();
foreach (var order in approvedOrders)
{
telepadComponent.QueueTeleport(order);
_cargoConsoleSystem.QueueTeleport(telepadComponent, order);
}
}
}