Refactors the CargoOrderDataManager into the CargoConsoleSystem (#2858)
* Update submodule * Refactor CargoOrderDataManager into CargoConsoleSystem * Fix OnRemove event Co-authored-by: Radrark <null>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.Cargo;
|
||||
using Content.Server.Cargo;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.Components.Cargo;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Cargo
|
||||
@@ -8,8 +10,6 @@ namespace Content.Server.GameObjects.Components.Cargo
|
||||
[RegisterComponent]
|
||||
public class CargoOrderDatabaseComponent : SharedCargoOrderDatabaseComponent
|
||||
{
|
||||
[Dependency] private readonly ICargoOrderDataManager _cargoOrderDataManager = default!;
|
||||
|
||||
public CargoOrderDatabase Database { get; set; }
|
||||
public bool ConnectedToDatabase => Database != null;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_cargoOrderDataManager.AddComponent(this);
|
||||
Database = EntitySystem.Get<CargoConsoleSystem>().StationOrderDatabase;
|
||||
}
|
||||
|
||||
public override ComponentState GetComponentState()
|
||||
|
||||
Reference in New Issue
Block a user