2023-06-25 13:50:41 -04:00
|
|
|
using System.Linq;
|
2023-07-08 14:08:32 +10:00
|
|
|
using System.Numerics;
|
2023-07-10 05:20:55 +10:00
|
|
|
using Content.Server.Cargo.Systems;
|
2023-06-13 06:37:53 +00:00
|
|
|
using Content.Server.Construction;
|
2021-12-23 04:14:01 -08:00
|
|
|
using Content.Server.GameTicking;
|
2022-11-15 17:09:27 +13:00
|
|
|
using Content.Server.Radio.EntitySystems;
|
2021-12-23 04:14:01 -08:00
|
|
|
using Content.Shared.Examine;
|
|
|
|
|
using Content.Shared.Interaction;
|
|
|
|
|
using Content.Shared.Popups;
|
2022-11-15 17:09:27 +13:00
|
|
|
using Content.Shared.Radio;
|
2022-11-14 01:45:45 -06:00
|
|
|
using Content.Shared.Salvage;
|
2022-11-15 17:09:27 +13:00
|
|
|
using Robust.Server.GameObjects;
|
2021-12-23 04:14:01 -08:00
|
|
|
using Robust.Shared.Configuration;
|
|
|
|
|
using Robust.Shared.Map;
|
|
|
|
|
using Robust.Shared.Player;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Random;
|
|
|
|
|
using Robust.Shared.Utility;
|
2023-04-20 10:43:13 +10:00
|
|
|
using Content.Server.Chat.Managers;
|
2024-01-04 14:25:32 +11:00
|
|
|
using Content.Server.Gravity;
|
2023-03-10 16:41:22 +11:00
|
|
|
using Content.Server.Parallax;
|
|
|
|
|
using Content.Server.Procedural;
|
2023-04-20 10:43:13 +10:00
|
|
|
using Content.Server.Shuttles.Systems;
|
2023-03-10 16:41:22 +11:00
|
|
|
using Content.Server.Station.Systems;
|
2023-06-25 13:50:41 -04:00
|
|
|
using Content.Shared.CCVar;
|
2023-07-10 05:20:55 +10:00
|
|
|
using Content.Shared.Construction.EntitySystems;
|
2023-06-25 13:50:41 -04:00
|
|
|
using Content.Shared.Random;
|
|
|
|
|
using Content.Shared.Random.Helpers;
|
2023-09-05 17:20:54 +01:00
|
|
|
using Content.Shared.Tools.Components;
|
2023-06-25 13:50:41 -04:00
|
|
|
using Robust.Server.Maps;
|
2023-11-27 22:12:34 +11:00
|
|
|
using Robust.Shared.Audio;
|
|
|
|
|
using Robust.Shared.Audio.Systems;
|
2023-06-25 13:50:41 -04:00
|
|
|
using Robust.Shared.Map.Components;
|
2023-03-10 16:41:22 +11:00
|
|
|
using Robust.Shared.Timing;
|
2024-04-01 06:50:00 +02:00
|
|
|
using Content.Server.Labels;
|
2021-12-23 04:14:01 -08:00
|
|
|
|
|
|
|
|
namespace Content.Server.Salvage
|
|
|
|
|
{
|
2023-03-10 16:41:22 +11:00
|
|
|
public sealed partial class SalvageSystem : SharedSalvageSystem
|
2021-12-23 04:14:01 -08:00
|
|
|
{
|
2023-04-20 10:43:13 +10:00
|
|
|
[Dependency] private readonly IChatManager _chat = default!;
|
2023-03-10 16:41:22 +11:00
|
|
|
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
|
|
|
|
[Dependency] private readonly IGameTiming _timing = default!;
|
2023-09-19 22:52:01 +10:00
|
|
|
[Dependency] private readonly ILogManager _logManager = default!;
|
2021-12-23 04:14:01 -08:00
|
|
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
|
|
|
|
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
|
|
|
|
[Dependency] private readonly IRobustRandom _random = default!;
|
2023-07-10 05:20:55 +10:00
|
|
|
[Dependency] private readonly AnchorableSystem _anchorable = default!;
|
2023-03-10 16:41:22 +11:00
|
|
|
[Dependency] private readonly BiomeSystem _biome = default!;
|
|
|
|
|
[Dependency] private readonly DungeonSystem _dungeon = default!;
|
2024-01-04 14:25:32 +11:00
|
|
|
[Dependency] private readonly GravitySystem _gravity = default!;
|
2024-04-01 06:50:00 +02:00
|
|
|
[Dependency] private readonly LabelSystem _labelSystem = default!;
|
2022-11-13 17:47:48 +11:00
|
|
|
[Dependency] private readonly MapLoaderSystem _map = default!;
|
2024-01-04 14:25:32 +11:00
|
|
|
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
2022-07-04 16:19:40 +10:00
|
|
|
[Dependency] private readonly RadioSystem _radioSystem = default!;
|
2023-04-21 15:06:35 +10:00
|
|
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
2023-04-20 10:43:13 +10:00
|
|
|
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
2024-04-20 17:01:15 -04:00
|
|
|
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
2023-04-20 10:43:13 +10:00
|
|
|
[Dependency] private readonly ShuttleSystem _shuttle = default!;
|
|
|
|
|
[Dependency] private readonly ShuttleConsoleSystem _shuttleConsoles = default!;
|
2023-03-10 16:41:22 +11:00
|
|
|
[Dependency] private readonly StationSystem _station = default!;
|
|
|
|
|
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
2021-12-23 04:14:01 -08:00
|
|
|
|
2024-01-04 14:25:32 +11:00
|
|
|
private EntityQuery<MapGridComponent> _gridQuery;
|
|
|
|
|
private EntityQuery<TransformComponent> _xformQuery;
|
2021-12-23 04:14:01 -08:00
|
|
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
2024-01-04 14:25:32 +11:00
|
|
|
_gridQuery = GetEntityQuery<MapGridComponent>();
|
|
|
|
|
_xformQuery = GetEntityQuery<TransformComponent>();
|
2023-04-20 10:43:13 +10:00
|
|
|
|
|
|
|
|
InitializeExpeditions();
|
2024-01-04 14:25:32 +11:00
|
|
|
InitializeMagnet();
|
2023-04-20 10:43:13 +10:00
|
|
|
InitializeRunner();
|
2021-12-23 04:14:01 -08:00
|
|
|
}
|
|
|
|
|
|
2022-07-11 18:06:56 -04:00
|
|
|
private void Report(EntityUid source, string channelName, string messageKey, params (string, object)[] args)
|
2022-07-04 16:19:40 +10:00
|
|
|
{
|
|
|
|
|
var message = args.Length == 0 ? Loc.GetString(messageKey) : Loc.GetString(messageKey, args);
|
2022-07-11 18:06:56 -04:00
|
|
|
var channel = _prototypeManager.Index<RadioChannelPrototype>(channelName);
|
2023-03-24 03:02:41 +03:00
|
|
|
_radioSystem.SendRadioMessage(source, message, channel, source);
|
2022-07-04 16:19:40 +10:00
|
|
|
}
|
2021-12-23 04:14:01 -08:00
|
|
|
|
|
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
{
|
2023-04-20 10:43:13 +10:00
|
|
|
UpdateExpeditions();
|
2024-01-04 14:25:32 +11:00
|
|
|
UpdateMagnet();
|
2023-04-20 10:43:13 +10:00
|
|
|
UpdateRunner();
|
2021-12-23 04:14:01 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|