88 lines
3.5 KiB
C#
88 lines
3.5 KiB
C#
using Content.Server._NF.Bank;
|
|
using Content.Server._NF.SectorServices;
|
|
using Content.Server.Cargo.Components;
|
|
using Content.Server.Cargo.Systems;
|
|
using Content.Server.DeviceLinking.Systems;
|
|
using Content.Server.Hands.Systems;
|
|
using Content.Server.Popups;
|
|
using Content.Server.Stack;
|
|
using Content.Server.Station.Systems;
|
|
using Content.Shared._NF.Cargo;
|
|
using Content.Shared.Access.Systems;
|
|
using Content.Shared.Administration.Logs;
|
|
using Content.Shared.Containers.ItemSlots;
|
|
using Content.Shared.GameTicking;
|
|
using Content.Shared.Mobs.Components;
|
|
using Content.Shared.Paper;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Server.Containers;
|
|
using Robust.Server.GameObjects;
|
|
using Robust.Shared.Audio.Systems;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Timing;
|
|
using Robust.Shared.Random;
|
|
|
|
namespace Content.Server._NF.Cargo.Systems;
|
|
|
|
public sealed partial class NFCargoSystem : SharedNFCargoSystem
|
|
{
|
|
[Dependency] private readonly IGameTiming _timing = default!;
|
|
[Dependency] private readonly IPrototypeManager _proto = default!;
|
|
[Dependency] private readonly IRobustRandom _random = default!;
|
|
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
|
[Dependency] private readonly AccessReaderSystem _accessReader = default!;
|
|
[Dependency] private readonly BankSystem _bank = default!;
|
|
[Dependency] private readonly ContainerSystem _container = default!;
|
|
[Dependency] private readonly DeviceLinkSystem _linker = default!;
|
|
[Dependency] private readonly EntityLookupSystem _lookup = default!;
|
|
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
|
|
[Dependency] private readonly ItemSlotsSystem _slots = default!;
|
|
[Dependency] private readonly PaperSystem _paper = default!;
|
|
[Dependency] private readonly PopupSystem _popup = default!;
|
|
[Dependency] private readonly PricingSystem _pricing = default!;
|
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
|
[Dependency] private readonly StackSystem _stack = default!;
|
|
[Dependency] private readonly StationSystem _station = default!;
|
|
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
|
[Dependency] private readonly MetaDataSystem _meta = default!;
|
|
[Dependency] private readonly SectorServiceSystem _sectorService = default!;
|
|
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
|
[Dependency] private readonly HandsSystem _hands = default!;
|
|
|
|
private EntityQuery<TransformComponent> _xformQuery;
|
|
private EntityQuery<CargoSellBlacklistComponent> _blacklistQuery;
|
|
private EntityQuery<MobStateComponent> _mobQuery;
|
|
|
|
private HashSet<EntityUid> _setEnts = new();
|
|
private List<(EntityUid, CargoPalletComponent, TransformComponent)> _pads = new();
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
_xformQuery = GetEntityQuery<TransformComponent>();
|
|
_blacklistQuery = GetEntityQuery<CargoSellBlacklistComponent>();
|
|
_mobQuery = GetEntityQuery<MobStateComponent>();
|
|
|
|
InitializeConsole();
|
|
InitializeShuttle();
|
|
InitializeTelepad();
|
|
InitializePirateBounty();
|
|
InitializeTradeCrates();
|
|
}
|
|
|
|
public override void Update(float frameTime)
|
|
{
|
|
base.Update(frameTime);
|
|
UpdateConsole(frameTime);
|
|
UpdateTelepad(frameTime);
|
|
}
|
|
|
|
private void OnRoundRestart(RoundRestartCleanupEvent ev)
|
|
{
|
|
ResetOrders();
|
|
CleanupTradeCrateDestinations();
|
|
}
|
|
}
|