Files
OldThink/Content.Server/Cargo/Systems/CargoSystem.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2022-06-23 14:36:47 +10:00
using Content.Server.Cargo.Components;
using Content.Server.Station.Systems;
using Content.Shared.Cargo;
2022-06-23 14:36:47 +10:00
using Content.Shared.Cargo.Components;
using Content.Shared.Containers.ItemSlots;
using Robust.Shared.Prototypes;
namespace Content.Server.Cargo.Systems;
public sealed partial class CargoSystem : SharedCargoSystem
{
[Dependency] private readonly IPrototypeManager _protoMan = default!;
[Dependency] private readonly ItemSlotsSystem _slots = default!;
2022-06-23 14:36:47 +10:00
private ISawmill _sawmill = default!;
public override void Initialize()
{
base.Initialize();
2022-06-23 14:36:47 +10:00
_sawmill = Logger.GetSawmill("cargo");
InitializeConsole();
2022-06-23 14:36:47 +10:00
InitializeShuttle();
InitializeTelepad();
2022-06-23 14:36:47 +10:00
SubscribeLocalEvent<StationInitializedEvent>(OnStationInit);
}
public override void Shutdown()
{
base.Shutdown();
ShutdownShuttle();
CleanupShuttle();
2022-06-23 14:36:47 +10:00
}
private void OnStationInit(StationInitializedEvent ev)
{
EnsureComp<StationBankAccountComponent>(ev.Station);
EnsureComp<StationCargoOrderDatabaseComponent>(ev.Station);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
UpdateConsole(frameTime);
UpdateTelepad(frameTime);
}
}