]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix RA0032 (#32514)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Sun, 29 Sep 2024 00:25:21 +0000 (03:25 +0300)
committerGitHub <noreply@github.com>
Sun, 29 Sep 2024 00:25:21 +0000 (02:25 +0200)
27 files changed:
Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
Content.Client/Entry/EntryPoint.cs
Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs
Content.Server/Administration/Systems/AdminVerbSystem.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs
Content.Server/Body/Systems/LungSystem.cs
Content.Server/Connection/ConnectionManager.cs
Content.Server/GameTicking/GameTicker.CVars.cs
Content.Server/GameTicking/GameTicker.GamePreset.cs
Content.Server/GameTicking/GameTicker.Player.cs
Content.Server/GameTicking/GameTicker.Replays.cs
Content.Server/GameTicking/GameTicker.RoundFlow.cs
Content.Server/GameTicking/GameTicker.cs
Content.Server/Ghost/GhostSystem.cs
Content.Server/MassMedia/Systems/NewsSystem.cs
Content.Server/Medical/CryoPodSystem.cs
Content.Server/Nutrition/EntitySystems/SmokingSystem.Vape.cs
Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.ControlBox.cs
Content.Server/Physics/Controllers/ChaoticJumpSystem.cs
Content.Server/Power/EntitySystems/CableSystem.cs
Content.Server/Store/Systems/StoreSystem.Ui.cs
Content.Shared/Anomaly/SharedAnomalySystem.cs
Content.Shared/Roles/Jobs/SharedJobSystem.cs
Content.Shared/Tools/Systems/SharedToolSystem.Welder.cs
Content.Shared/Tools/Systems/SharedToolSystem.cs

index 9864dbcb2a91bfe28aac584a15a955e3156aecc6..7d7d77f51a3fd250702cc32953082c165a90a351 100644 (file)
@@ -20,7 +20,6 @@ public sealed partial class ContentAudioSystem
 {
     [Dependency] private readonly IBaseClient _client = default!;
     [Dependency] private readonly ClientGameTicker _gameTicker = default!;
-    [Dependency] private readonly IStateManager _stateManager = default!;
     [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     private readonly AudioParams _lobbySoundtrackParams = new(-5f, 1, 0, 0, 0, false, 0f);
@@ -71,7 +70,7 @@ public sealed partial class ContentAudioSystem
         Subs.CVar(_configManager, CCVars.LobbyMusicEnabled, LobbyMusicCVarChanged);
         Subs.CVar(_configManager, CCVars.LobbyMusicVolume, LobbyMusicVolumeCVarChanged);
 
-        _stateManager.OnStateChanged += StateManagerOnStateChanged;
+        _state.OnStateChanged += StateManagerOnStateChanged;
 
         _client.PlayerLeaveServer += OnLeave;
 
@@ -115,7 +114,7 @@ public sealed partial class ContentAudioSystem
 
     private void LobbyMusicCVarChanged(bool musicEnabled)
     {
-        if (musicEnabled && _stateManager.CurrentState is LobbyState)
+        if (musicEnabled && _state.CurrentState is LobbyState)
         {
             StartLobbyMusic();
         }
@@ -234,7 +233,7 @@ public sealed partial class ContentAudioSystem
 
     private void ShutdownLobbyMusic()
     {
-        _stateManager.OnStateChanged -= StateManagerOnStateChanged;
+        _state.OnStateChanged -= StateManagerOnStateChanged;
 
         _client.PlayerLeaveServer -= OnLeave;
 
index c4c18f154a3d93e05282c6bc26c65a47d4a44740..cd73d3397dfe4b1f1be22115d61e0626998d9b05 100644 (file)
@@ -69,7 +69,6 @@ namespace Content.Client.Entry
         [Dependency] private readonly IResourceManager _resourceManager = default!;
         [Dependency] private readonly IReplayLoadManager _replayLoad = default!;
         [Dependency] private readonly ILogManager _logManager = default!;
-        [Dependency] private readonly ContentReplayPlaybackManager _replayMan = default!;
         [Dependency] private readonly DebugMonitorManager _debugMonitorManager = default!;
 
         public override void Init()
@@ -191,7 +190,7 @@ namespace Content.Client.Entry
                     _resourceManager,
                     ReplayConstants.ReplayZipFolder.ToRootedPath());
 
-                _replayMan.LastLoad = (null, ReplayConstants.ReplayZipFolder.ToRootedPath());
+                _playbackMan.LastLoad = (null, ReplayConstants.ReplayZipFolder.ToRootedPath());
                 _replayLoad.LoadAndStartReplay(reader);
             }
             else if (_gameController.LaunchState.FromLauncher)
index 56cf2878506060fa2f0f6589dcbf7804134c8890..70fcfccc4eb9f161e82131264d4fcae803d4685b 100644 (file)
@@ -52,7 +52,6 @@ public sealed partial class AdminVerbSystem
     [Dependency] private readonly StationJobsSystem _stationJobsSystem = default!;
     [Dependency] private readonly JointSystem _jointSystem = default!;
     [Dependency] private readonly BatterySystem _batterySystem = default!;
-    [Dependency] private readonly SharedTransformSystem _xformSystem = default!;
     [Dependency] private readonly MetaDataSystem _metaSystem = default!;
     [Dependency] private readonly GunSystem _gun = default!;
 
@@ -327,7 +326,7 @@ public sealed partial class AdminVerbSystem
                 Act = () =>
                 {
                     var (mapUid, gridUid) = _adminTestArenaSystem.AssertArenaLoaded(player);
-                    _xformSystem.SetCoordinates(args.Target, new EntityCoordinates(gridUid ?? mapUid, Vector2.One));
+                    _transformSystem.SetCoordinates(args.Target, new EntityCoordinates(gridUid ?? mapUid, Vector2.One));
                 },
                 Impact = LogImpact.Medium,
                 Message = Loc.GetString("admin-trick-send-to-test-arena-description"),
@@ -533,7 +532,7 @@ public sealed partial class AdminVerbSystem
                     if (shuttle is null)
                         return;
 
-                    _xformSystem.SetCoordinates(args.User, new EntityCoordinates(shuttle.Value, Vector2.Zero));
+                    _transformSystem.SetCoordinates(args.User, new EntityCoordinates(shuttle.Value, Vector2.Zero));
                 },
                 Impact = LogImpact.Low,
                 Message = Loc.GetString("admin-trick-locate-cargo-shuttle-description"),
index 5aa05ce28b701428d507dec3bb69f0b9d7bb72ff..2ab27e4388e719817da8995f8b52f272d2fc95e0 100644 (file)
@@ -35,10 +35,8 @@ using Robust.Shared.Toolshed;
 using Robust.Shared.Utility;
 using System.Linq;
 using Content.Server.Silicons.Laws;
-using Content.Shared.Silicons.Laws;
 using Content.Shared.Silicons.Laws.Components;
 using Robust.Server.Player;
-using Content.Shared.Mind;
 using Robust.Shared.Physics.Components;
 using static Content.Shared.Configurable.ConfigurationComponent;
 
@@ -63,7 +61,6 @@ namespace Content.Server.Administration.Systems
         [Dependency] private readonly ArtifactSystem _artifactSystem = default!;
         [Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
         [Dependency] private readonly PrayerSystem _prayerSystem = default!;
-        [Dependency] private readonly EuiManager _eui = default!;
         [Dependency] private readonly MindSystem _mindSystem = default!;
         [Dependency] private readonly ToolshedManager _toolshed = default!;
         [Dependency] private readonly RejuvenateSystem _rejuvenate = default!;
@@ -294,7 +291,7 @@ namespace Content.Server.Administration.Systems
                         Act = () =>
                         {
                             var ui = new AdminLogsEui();
-                            _eui.OpenEui(ui, player);
+                            _euiManager.OpenEui(ui, player);
                             ui.SetLogFilter(search:args.Target.Id.ToString());
                         },
                         Impact = LogImpact.Low
index b96dd0ac48d05ce146d127a0b673e1baca280879..0b43c92414942f0c3f8ef3005ded8c06bf2c0f4b 100644 (file)
@@ -210,7 +210,7 @@ namespace Content.Server.Atmos.EntitySystems
                                      MovedByPressureComponent.ProbabilityOffset);
 
             // Can we yeet the thing (due to probability, strength, etc.)
-            if (moveProb > MovedByPressureComponent.ProbabilityOffset && _robustRandom.Prob(MathF.Min(moveProb / 100f, 1f))
+            if (moveProb > MovedByPressureComponent.ProbabilityOffset && _random.Prob(MathF.Min(moveProb / 100f, 1f))
                                                                       && !float.IsPositiveInfinity(component.MoveResist)
                                                                       && (physics.BodyType != BodyType.Static
                                                                           && (maxForce >= (component.MoveResist * MovedByPressureComponent.MoveForcePushRatio)))
index 08193027d67bf2ec41ee2756ada35e5f99913cc3..d703a9815425b7d1bbce8a39cadebe828fe3563d 100644 (file)
@@ -689,7 +689,7 @@ namespace Content.Server.Atmos.EntitySystems
 
             var chance = MathHelper.Clamp(0.01f + (sum / SpacingMaxWind) * 0.3f, 0.003f, 0.3f);
 
-            if (sum > 20 && _robustRandom.Prob(chance))
+            if (sum > 20 && _random.Prob(chance))
                 PryTile(mapGrid, tile.GridIndices);
         }
 
index 13d8f73dc56bd8893c6cf66facf3efae2875daa2..f27f7411bf443937a295054152104eb797e062cd 100644 (file)
@@ -14,7 +14,6 @@ using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Prototypes;
-using Robust.Shared.Random;
 using System.Linq;
 
 namespace Content.Server.Atmos.EntitySystems;
@@ -27,7 +26,6 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem
 {
     [Dependency] private readonly IMapManager _mapManager = default!;
     [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
-    [Dependency] private readonly IRobustRandom _robustRandom = default!;
     [Dependency] private readonly IAdminLogManager _adminLog = default!;
     [Dependency] private readonly EntityLookupSystem _lookup = default!;
     [Dependency] private readonly InternalsSystem _internals = default!;
@@ -39,7 +37,6 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem
     [Dependency] private readonly SharedTransformSystem _transformSystem = default!;
     [Dependency] private readonly TileSystem _tile = default!;
     [Dependency] private readonly MapSystem _map = default!;
-    [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
     [Dependency] public readonly PuddleSystem Puddle = default!;
 
     private const float ExposedUpdateDelay = 1f;
@@ -124,6 +121,6 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem
 
     private void CacheDecals()
     {
-        _burntDecals = _prototypeManager.EnumeratePrototypes<DecalPrototype>().Where(x => x.Tags.Contains("burnt")).Select(x => x.ID).ToArray();
+        _burntDecals = _protoMan.EnumeratePrototypes<DecalPrototype>().Where(x => x.Tags.Contains("burnt")).Select(x => x.ID).ToArray();
     }
 }
index 901d61f8fc88b991a8658f0703e37306872797fd..859618ae1a2a0b70ccf9a40d78a5ff2949dc4375 100644 (file)
@@ -14,7 +14,6 @@ public sealed class LungSystem : EntitySystem
     [Dependency] private readonly AtmosphereSystem _atmos = default!;
     [Dependency] private readonly InternalsSystem _internals = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
-    [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
 
     public static string LungSolutionName = "Lung";
 
@@ -29,7 +28,7 @@ public sealed class LungSystem : EntitySystem
 
     private void OnGotUnequipped(Entity<BreathToolComponent> ent, ref GotUnequippedEvent args)
     {
-        _atmosphereSystem.DisconnectInternals(ent);
+        _atmos.DisconnectInternals(ent);
     }
 
     private void OnGotEquipped(Entity<BreathToolComponent> ent, ref GotEquippedEvent args)
@@ -93,7 +92,7 @@ public sealed class LungSystem : EntitySystem
             if (moles <= 0)
                 continue;
 
-            var reagent = _atmosphereSystem.GasReagents[i];
+            var reagent = _atmos.GasReagents[i];
             if (reagent is null)
                 continue;
 
index 1b142830f175bd82c62405923f8511a8e8e407f4..2c1f9fb36f1163483ddfc93c653fb229fd2059b6 100644 (file)
@@ -46,7 +46,6 @@ namespace Content.Server.Connection
     /// </summary>
     public sealed partial class ConnectionManager : IConnectionManager
     {
-        [Dependency] private readonly IServerDbManager _dbManager = default!;
         [Dependency] private readonly IPlayerManager _plyMgr = default!;
         [Dependency] private readonly IServerNetManager _netMgr = default!;
         [Dependency] private readonly IServerDbManager _db = default!;
@@ -205,7 +204,7 @@ namespace Content.Server.Connection
                 return null;
             }
 
-            var adminData = await _dbManager.GetAdminDataForAsync(e.UserId);
+            var adminData = await _db.GetAdminDataForAsync(e.UserId);
 
             if (_cfg.GetCVar(CCVars.PanicBunkerEnabled) && adminData == null)
             {
@@ -213,7 +212,7 @@ namespace Content.Server.Connection
                 var customReason = _cfg.GetCVar(CCVars.PanicBunkerCustomReason);
 
                 var minMinutesAge = _cfg.GetCVar(CCVars.PanicBunkerMinAccountAge);
-                var record = await _dbManager.GetPlayerRecordByUserId(userId);
+                var record = await _db.GetPlayerRecordByUserId(userId);
                 var validAccountAge = record != null &&
                                       record.FirstSeenTime.CompareTo(DateTimeOffset.UtcNow - TimeSpan.FromMinutes(minMinutesAge)) <= 0;
                 var bypassAllowed = _cfg.GetCVar(CCVars.BypassBunkerWhitelist) && await _db.GetWhitelistStatusAsync(userId);
@@ -317,7 +316,7 @@ namespace Content.Server.Connection
             var maxPlaytimeMinutes = _cfg.GetCVar(CCVars.BabyJailMaxOverallMinutes);
 
             // Wait some time to lookup data
-            var record = await _dbManager.GetPlayerRecordByUserId(userId);
+            var record = await _db.GetPlayerRecordByUserId(userId);
 
             // No player record = new account or the DB is having a skill issue
             if (record == null)
index 60ffa660f57105cefc2cab9ceb028dcc23e7a4af..bb6845974000928d4806e0e9aac7277b43114996 100644 (file)
@@ -36,7 +36,7 @@ namespace Content.Server.GameTicking
 
         private void InitializeCVars()
         {
-            Subs.CVar(_configurationManager, CCVars.GameLobbyEnabled, value =>
+            Subs.CVar(_cfg, CCVars.GameLobbyEnabled, value =>
             {
                 LobbyEnabled = value;
                 foreach (var (userId, status) in _playerGameStatuses)
@@ -47,23 +47,23 @@ namespace Content.Server.GameTicking
                         LobbyEnabled ? PlayerGameStatus.NotReadyToPlay : PlayerGameStatus.ReadyToPlay;
                 }
             }, true);
-            Subs.CVar(_configurationManager, CCVars.GameDummyTicker, value => DummyTicker = value, true);
-            Subs.CVar(_configurationManager, CCVars.GameLobbyDuration, value => LobbyDuration = TimeSpan.FromSeconds(value), true);
-            Subs.CVar(_configurationManager, CCVars.GameDisallowLateJoins,
+            Subs.CVar(_cfg, CCVars.GameDummyTicker, value => DummyTicker = value, true);
+            Subs.CVar(_cfg, CCVars.GameLobbyDuration, value => LobbyDuration = TimeSpan.FromSeconds(value), true);
+            Subs.CVar(_cfg, CCVars.GameDisallowLateJoins,
                 value => { DisallowLateJoin = value; UpdateLateJoinStatus(); }, true);
-            Subs.CVar(_configurationManager, CCVars.AdminLogsServerName, value =>
+            Subs.CVar(_cfg, CCVars.AdminLogsServerName, value =>
             {
                 // TODO why tf is the server name on admin logs
                 ServerName = value;
             }, true);
-            Subs.CVar(_configurationManager, CCVars.DiscordRoundUpdateWebhook, value =>
+            Subs.CVar(_cfg, CCVars.DiscordRoundUpdateWebhook, value =>
             {
                 if (!string.IsNullOrWhiteSpace(value))
                 {
                     _discord.GetWebhook(value, data => _webhookIdentifier = data.ToIdentifier());
                 }
             }, true);
-            Subs.CVar(_configurationManager, CCVars.DiscordRoundEndRoleWebhook, value =>
+            Subs.CVar(_cfg, CCVars.DiscordRoundEndRoleWebhook, value =>
             {
                 DiscordRoundEndRole = value;
 
@@ -72,9 +72,9 @@ namespace Content.Server.GameTicking
                     DiscordRoundEndRole = null;
                 }
             }, true);
-            Subs.CVar(_configurationManager, CCVars.RoundEndSoundCollection, value => RoundEndSoundCollection = value, true);
+            Subs.CVar(_cfg, CCVars.RoundEndSoundCollection, value => RoundEndSoundCollection = value, true);
 #if EXCEPTION_TOLERANCE
-            Subs.CVar(_configurationManager, CCVars.RoundStartFailShutdownCount, value => RoundStartFailShutdownCount = value, true);
+            Subs.CVar(_cfg, CCVars.RoundStartFailShutdownCount, value => RoundStartFailShutdownCount = value, true);
 #endif
         }
     }
index 5642e84f90820842dc29fb2f3d6ab3a15f63142b..d1a8b062c4860f5207d78b140300cfd7cd6d8141 100644 (file)
@@ -41,9 +41,9 @@ namespace Content.Server.GameTicking
                 DelayStart(TimeSpan.FromSeconds(PresetFailedCooldownIncrease));
             }
 
-            if (_configurationManager.GetCVar(CCVars.GameLobbyFallbackEnabled))
+            if (_cfg.GetCVar(CCVars.GameLobbyFallbackEnabled))
             {
-                var fallbackPresets = _configurationManager.GetCVar(CCVars.GameLobbyFallbackPreset).Split(",");
+                var fallbackPresets = _cfg.GetCVar(CCVars.GameLobbyFallbackPreset).Split(",");
                 var startFailed = true;
 
                 foreach (var preset in fallbackPresets)
@@ -86,7 +86,7 @@ namespace Content.Server.GameTicking
 
         private void InitializeGamePreset()
         {
-            SetGamePreset(LobbyEnabled ? _configurationManager.GetCVar(CCVars.GameLobbyDefaultPreset) : "sandbox");
+            SetGamePreset(LobbyEnabled ? _cfg.GetCVar(CCVars.GameLobbyDefaultPreset) : "sandbox");
         }
 
         public void SetGamePreset(GamePresetPrototype? preset, bool force = false)
@@ -190,7 +190,7 @@ namespace Content.Server.GameTicking
         private void IncrementRoundNumber()
         {
             var playerIds = _playerGameStatuses.Keys.Select(player => player.UserId).ToArray();
-            var serverName = _configurationManager.GetCVar(CCVars.AdminLogsServerName);
+            var serverName = _cfg.GetCVar(CCVars.AdminLogsServerName);
 
             // TODO FIXME AAAAAAAAAAAAAAAAAAAH THIS IS BROKEN
             // Task.Run as a terrible dirty workaround to avoid synchronization context deadlock from .Result here.
index 61cdf6f8553f6bd80162a241887dcef16aafc3ad..f3764081309de7c8aaf069c204baac522c5b665c 100644 (file)
@@ -1,5 +1,3 @@
-using System.Linq;
-using Content.Server.Database;
 using Content.Shared.Administration;
 using Content.Shared.CCVar;
 using Content.Shared.GameTicking;
@@ -9,7 +7,6 @@ using Content.Shared.Preferences;
 using JetBrains.Annotations;
 using Robust.Server.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Enums;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
@@ -21,8 +18,6 @@ namespace Content.Server.GameTicking
     public sealed partial class GameTicker
     {
         [Dependency] private readonly IPlayerManager _playerManager = default!;
-        [Dependency] private readonly IServerDbManager _dbManager = default!;
-        [Dependency] private readonly SharedAudioSystem _audioSystem = default!;
 
         private void InitializePlayer()
         {
@@ -64,7 +59,7 @@ namespace Content.Server.GameTicking
                     // timer time must be > tick length
                     Timer.Spawn(0, () => _playerManager.JoinGame(args.Session));
 
-                    var record = await _dbManager.GetPlayerRecordByUserId(args.Session.UserId);
+                    var record = await _db.GetPlayerRecordByUserId(args.Session.UserId);
                     var firstConnection = record != null &&
                                           Math.Abs((record.FirstSeenTime - record.LastSeenTime).TotalMinutes) < 1;
 
@@ -74,8 +69,8 @@ namespace Content.Server.GameTicking
 
                     RaiseNetworkEvent(GetConnectionStatusMsg(), session.Channel);
 
-                    if (firstConnection && _configurationManager.GetCVar(CCVars.AdminNewPlayerJoinSound))
-                        _audioSystem.PlayGlobal(new SoundPathSpecifier("/Audio/Effects/newplayerping.ogg"),
+                    if (firstConnection && _cfg.GetCVar(CCVars.AdminNewPlayerJoinSound))
+                        _audio.PlayGlobal(new SoundPathSpecifier("/Audio/Effects/newplayerping.ogg"),
                             Filter.Empty().AddPlayers(_adminManager.ActiveAdmins), false,
                             audioParams: new AudioParams { Volume = -5f });
 
index 9109fbf96a286d6c9c969ac3c334b8664bcd63dc..7efa52bd00c79a0bab33dc5b5b305b817cdd918e 100644 (file)
@@ -127,8 +127,8 @@ public sealed partial class GameTicker
         metadata["gamemode"] = new ValueDataNode(CurrentPreset != null ? Loc.GetString(CurrentPreset.ModeTitle) : string.Empty);
         metadata["roundEndPlayers"] = _serialman.WriteValue(_replayRoundPlayerInfo);
         metadata["roundEndText"] = new ValueDataNode(_replayRoundText);
-        metadata["server_id"] = new ValueDataNode(_configurationManager.GetCVar(CCVars.ServerId));
-        metadata["server_name"] = new ValueDataNode(_configurationManager.GetCVar(CCVars.AdminLogsServerName));
+        metadata["server_id"] = new ValueDataNode(_cfg.GetCVar(CCVars.ServerId));
+        metadata["server_name"] = new ValueDataNode(_cfg.GetCVar(CCVars.AdminLogsServerName));
         metadata["roundId"] = new ValueDataNode(RoundId.ToString());
     }
 
index ca087c46ed414602f0f75f11dfd4d59b0b306552..0c7668d354d57114497f23f773d2c8bba107af9a 100644 (file)
@@ -364,7 +364,7 @@ namespace Content.Server.GameTicking
             var listOfPlayerInfo = new List<RoundEndMessageEvent.RoundEndPlayerInfo>();
             // Grab the great big book of all the Minds, we'll need them for this.
             var allMinds = EntityQueryEnumerator<MindComponent>();
-            var pvsOverride = _configurationManager.GetCVar(CCVars.RoundEndPVSOverrides);
+            var pvsOverride = _cfg.GetCVar(CCVars.RoundEndPVSOverrides);
             while (allMinds.MoveNext(out var mindId, out var mind))
             {
                 // TODO don't list redundant observer roles?
index fa1e01c7a80d22206c4be7c5eaf8fac476039ea7..f8ba7e1d7d91f6708c4eb2e5bb6e7d37408734b4 100644 (file)
@@ -8,19 +8,15 @@ using Content.Server.Maps;
 using Content.Server.Players.PlayTimeTracking;
 using Content.Server.Preferences.Managers;
 using Content.Server.ServerUpdates;
-using Content.Server.Shuttles.Systems;
 using Content.Server.Station.Systems;
 using Content.Shared.Chat;
-using Content.Shared.Damage;
 using Content.Shared.GameTicking;
 using Content.Shared.Mind;
-using Content.Shared.Mobs.Systems;
 using Content.Shared.Roles;
 using Robust.Server;
 using Robust.Server.GameObjects;
 using Robust.Server.GameStates;
 using Robust.Shared.Audio.Systems;
-using Robust.Shared.Configuration;
 using Robust.Shared.Console;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
@@ -39,7 +35,6 @@ namespace Content.Server.GameTicking
         [Dependency] private readonly IBanManager _banManager = default!;
         [Dependency] private readonly IBaseServer _baseServer = default!;
         [Dependency] private readonly IChatManager _chatManager = default!;
-        [Dependency] private readonly IConfigurationManager _configurationManager = default!;
         [Dependency] private readonly IConsoleHost _consoleHost = default!;
         [Dependency] private readonly IGameMapManager _gameMapManager = default!;
         [Dependency] private readonly IGameTiming _gameTiming = default!;
index 945b0ff998a1fb8b7d79d5d7d497e09dc98b982e..85fec0d7d1fd2b1524917b32c4b0be3bb526db5a 100644 (file)
@@ -46,11 +46,9 @@ namespace Content.Server.Ghost
         [Dependency] private readonly JobSystem _jobs = default!;
         [Dependency] private readonly EntityLookupSystem _lookup = default!;
         [Dependency] private readonly MindSystem _minds = default!;
-        [Dependency] private readonly SharedMindSystem _mindSystem = default!;
         [Dependency] private readonly MobStateSystem _mobState = default!;
         [Dependency] private readonly SharedPhysicsSystem _physics = default!;
         [Dependency] private readonly IPlayerManager _playerManager = default!;
-        [Dependency] private readonly GameTicker _ticker = default!;
         [Dependency] private readonly TransformSystem _transformSystem = default!;
         [Dependency] private readonly VisibilitySystem _visibilitySystem = default!;
         [Dependency] private readonly MetaDataSystem _metaData = default!;
@@ -170,7 +168,7 @@ namespace Content.Server.Ghost
             // Allow this entity to be seen by other ghosts.
             var visibility = EnsureComp<VisibilityComponent>(uid);
 
-            if (_ticker.RunLevel != GameRunLevel.PostRound)
+            if (_gameTicker.RunLevel != GameRunLevel.PostRound)
             {
                 _visibilitySystem.AddLayer((uid, visibility), (int) VisibilityFlags.Ghost, false);
                 _visibilitySystem.RemoveLayer((uid, visibility), (int) VisibilityFlags.Normal, false);
@@ -277,7 +275,7 @@ namespace Content.Server.Ghost
                 return;
             }
 
-            _mindSystem.UnVisit(actor.PlayerSession);
+            _mind.UnVisit(actor.PlayerSession);
         }
 
         #region Warp
@@ -455,7 +453,7 @@ namespace Content.Server.Ghost
                 spawnPosition = null;
 
             // If it's bad, look for a valid point to spawn
-            spawnPosition ??= _ticker.GetObserverSpawnPoint();
+            spawnPosition ??= _gameTicker.GetObserverSpawnPoint();
 
             // Make sure the new point is valid too
             if (!IsValidSpawnPosition(spawnPosition))
index 3ac4ecc37bcf9ea6206895bffcc295ade351e7de..641f2074b805744af37b1b1a50a8b251c90258df 100644 (file)
@@ -4,7 +4,6 @@ using Content.Server.CartridgeLoader;
 using Content.Server.CartridgeLoader.Cartridges;
 using Content.Server.Chat.Managers;
 using Content.Server.GameTicking;
-using Content.Server.Interaction;
 using Content.Server.MassMedia.Components;
 using Content.Server.Popups;
 using Content.Server.Station.Systems;
@@ -27,7 +26,6 @@ public sealed class NewsSystem : SharedNewsSystem
 {
     [Dependency] private readonly AccessReaderSystem _accessReaderSystem = default!;
     [Dependency] private readonly IGameTiming _timing = default!;
-    [Dependency] private readonly InteractionSystem _interaction = default!;
     [Dependency] private readonly IAdminLogManager _adminLogger = default!;
     [Dependency] private readonly UserInterfaceSystem _ui = default!;
     [Dependency] private readonly CartridgeLoaderSystem _cartridgeLoaderSystem = default!;
@@ -35,7 +33,6 @@ public sealed class NewsSystem : SharedNewsSystem
     [Dependency] private readonly PopupSystem _popup = default!;
     [Dependency] private readonly StationSystem _station = default!;
     [Dependency] private readonly GameTicker _ticker = default!;
-    [Dependency] private readonly AccessReaderSystem _accessReader = default!;
     [Dependency] private readonly IChatManager _chatManager = default!;
 
     public override void Initialize()
index a1c1f1f9ce96dad1447928d59dfb575a88eefb05..fc9ab081d2660615b712095fed7987d59ddba74c 100644 (file)
@@ -1,16 +1,13 @@
 using Content.Server.Administration.Logs;
-using Content.Server.Atmos;
 using Content.Server.Atmos.EntitySystems;
 using Content.Server.Atmos.Piping.Components;
 using Content.Server.Atmos.Piping.Unary.EntitySystems;
 using Content.Server.Body.Components;
 using Content.Server.Body.Systems;
 using Content.Server.Medical.Components;
-using Content.Server.NodeContainer;
 using Content.Server.NodeContainer.EntitySystems;
 using Content.Server.NodeContainer.NodeGroups;
 using Content.Server.NodeContainer.Nodes;
-using Content.Server.Power.Components;
 using Content.Server.Temperature.Components;
 using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.Atmos;
@@ -18,7 +15,6 @@ using Content.Shared.UserInterface;
 using Content.Shared.Chemistry;
 using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.Components.SolutionManager;
-using Content.Shared.Chemistry.Reagent;
 using Content.Shared.Climbing.Systems;
 using Content.Shared.Containers.ItemSlots;
 using Content.Shared.Database;
@@ -46,7 +42,6 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
     [Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
     [Dependency] private readonly BloodstreamSystem _bloodstreamSystem = default!;
-    [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
     [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
     [Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
     [Dependency] private readonly SharedToolSystem _toolSystem = default!;
@@ -196,7 +191,7 @@ public sealed partial class CryoPodSystem : SharedCryoPodSystem
         }
 
         // TODO: This should be a state my dude
-        _userInterfaceSystem.ServerSendUiMessage(
+        _uiSystem.ServerSendUiMessage(
             entity.Owner,
             HealthAnalyzerUiKey.Key,
             new HealthAnalyzerScannedUserMessage(GetNetEntity(entity.Comp.BodyContainer.ContainedEntity),
index f7650f599b4c6129fb4b333bb6b2b9a3ffced2bd..c3d41cead6d62ad925da8875a29df005644b1f63 100644 (file)
@@ -27,7 +27,6 @@ namespace Content.Server.Nutrition.EntitySystems
         [Dependency] private readonly FoodSystem _foodSystem = default!;
         [Dependency] private readonly ExplosionSystem _explosionSystem = default!;
         [Dependency] private readonly PopupSystem _popupSystem = default!;
-        [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
 
         private void InitializeVapes()
         {
@@ -127,7 +126,7 @@ namespace Content.Server.Nutrition.EntitySystems
             || args.Args.Target == null)
                 return;
 
-            var environment = _atmosphereSystem.GetContainingMixture(args.Args.Target.Value, true, true);
+            var environment = _atmos.GetContainingMixture(args.Args.Target.Value, true, true);
             if (environment == null)
             {
                 return;
@@ -139,7 +138,7 @@ namespace Content.Server.Nutrition.EntitySystems
             var merger = new GasMixture(1) { Temperature = args.Solution.Temperature };
             merger.SetMoles(entity.Comp.GasType, args.Solution.Volume.Value / entity.Comp.ReductionFactor);
 
-            _atmosphereSystem.Merge(environment, merger);
+            _atmos.Merge(environment, merger);
 
             args.Solution.RemoveAllSolution();
 
index 404eb00fef26c226fd771c40607487deff6a6f1a..90a5cb2ea0e2e5e05409585692e223ae48d2df0f 100644 (file)
@@ -9,7 +9,6 @@ using Content.Shared.CCVar;
 using Content.Shared.Power;
 using Robust.Shared.Audio;
 using Robust.Shared.Audio.Systems;
-using Robust.Shared.Timing;
 using Robust.Shared.Player;
 
 namespace Content.Server.ParticleAccelerator.EntitySystems;
@@ -18,7 +17,6 @@ public sealed partial class ParticleAcceleratorSystem
 {
     [Dependency] private readonly IAdminManager _adminManager = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
-    [Dependency] private readonly IGameTiming _timing = default!;
 
     private void InitializeControlBoxSystem()
     {
@@ -175,7 +173,7 @@ public sealed partial class ParticleAcceleratorSystem
             if (strength >= alertMinPowerState)
             {
                 var pos = Transform(uid);
-                if (_timing.CurTime > comp.EffectCooldown)
+                if (_gameTiming.CurTime > comp.EffectCooldown)
                 {
                     _chat.SendAdminAlert(player,
                         Loc.GetString("particle-accelerator-admin-power-strength-warning",
@@ -186,7 +184,7 @@ public sealed partial class ParticleAcceleratorSystem
                         Filter.Empty().AddPlayers(_adminManager.ActiveAdmins),
                         false,
                         AudioParams.Default.WithVolume(-8f));
-                    comp.EffectCooldown = _timing.CurTime + comp.CooldownDuration;
+                    comp.EffectCooldown = _gameTiming.CurTime + comp.CooldownDuration;
                 }
             }
         }
index ee4b776cf052f498041deeb451a484f0c963d2a7..3f2493b43ff94e75872e0a111e4d69130569eb71 100644 (file)
@@ -18,7 +18,6 @@ public sealed class ChaoticJumpSystem : VirtualController
     [Dependency] private readonly SharedTransformSystem _transform = default!;
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly SharedPhysicsSystem _physics = default!;
-    [Dependency] private readonly SharedTransformSystem _xform = default!;
 
     public override void Initialize()
     {
@@ -73,6 +72,6 @@ public sealed class ChaoticJumpSystem : VirtualController
 
         Spawn(component.Effect, transform.Coordinates);
 
-        _xform.SetWorldPosition(uid, targetPos);
+        _transform.SetWorldPosition(uid, targetPos);
     }
 }
index 62eb08d7cbc3fbfb285335aeef55434fbd34d294..d0f45b54fcf39d5dde810acbc584700c9a689ee9 100644 (file)
@@ -17,7 +17,6 @@ public sealed partial class CableSystem : EntitySystem
     [Dependency] private readonly SharedToolSystem _toolSystem = default!;
     [Dependency] private readonly StackSystem _stack = default!;
     [Dependency] private readonly ElectrocutionSystem _electrocutionSystem = default!;
-    [Dependency] private readonly IAdminLogManager _adminLogs = default!;
 
     public override void Initialize()
     {
@@ -51,7 +50,7 @@ public sealed partial class CableSystem : EntitySystem
         if (_electrocutionSystem.TryDoElectrifiedAct(uid, args.User))
             return;
 
-        _adminLogs.Add(LogType.CableCut, LogImpact.Medium, $"The {ToPrettyString(uid)} at {xform.Coordinates} was cut by {ToPrettyString(args.User)}.");
+        _adminLogger.Add(LogType.CableCut, LogImpact.Medium, $"The {ToPrettyString(uid)} at {xform.Coordinates} was cut by {ToPrettyString(args.User)}.");
 
         Spawn(cable.CableDroppedOnCutPrototype, xform.Coordinates);
         QueueDel(uid);
index 247055c2a7fc8ab03988e6592dab7be687dfa794..95e57119846e31716f054eeb036a05ba4008133e 100644 (file)
@@ -30,7 +30,6 @@ public sealed partial class StoreSystem
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly StackSystem _stack = default!;
     [Dependency] private readonly UserInterfaceSystem _ui = default!;
-    [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
 
     private void InitializeUi()
     {
@@ -260,7 +259,7 @@ public sealed partial class StoreSystem
         //log dat shit.
         _admin.Add(LogType.StorePurchase,
             LogImpact.Low,
-            $"{ToPrettyString(buyer):player} purchased listing \"{ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listing, _prototypeManager)}\" from {ToPrettyString(uid)}");
+            $"{ToPrettyString(buyer):player} purchased listing \"{ListingLocalisationHelpers.GetLocalisedNameOrEntityName(listing, _proto)}\" from {ToPrettyString(uid)}");
 
         listing.PurchaseAmount++; //track how many times something has been purchased
         _audio.PlayEntity(component.BuySuccessSound, msg.Actor, uid); //cha-ching!
index 07beb1444d765379b9a895c91b03d0ac24c0106a..00d97c1a46e65909caaf0416eded30f671b89feb 100644 (file)
@@ -33,7 +33,6 @@ public abstract class SharedAnomalySystem : EntitySystem
     [Dependency] private readonly SharedPhysicsSystem _physics = default!;
     [Dependency] protected readonly SharedPopupSystem Popup = default!;
     [Dependency] private readonly IPrototypeManager _prototype = default!;
-    [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly SharedTransformSystem _transform = default!;
 
     public override void Initialize()
@@ -372,7 +371,7 @@ public abstract class SharedAnomalySystem : EntitySystem
             if (tilerefs.Count == 0)
                 break;
 
-            var tileref = _random.Pick(tilerefs);
+            var tileref = Random.Pick(tilerefs);
             var distance = MathF.Sqrt(MathF.Pow(tileref.X - xform.LocalPosition.X, 2) + MathF.Pow(tileref.Y - xform.LocalPosition.Y, 2));
 
             //cut outer & inner circle
index ce4428d9fea7b766d8a1075d2e75284698528324..939a57baadff188cabb6089cc0b211ac93b2f697 100644 (file)
@@ -15,8 +15,6 @@ public abstract class SharedJobSystem : EntitySystem
 {
     [Dependency] private readonly IPrototypeManager _prototypes = default!;
     [Dependency] private readonly SharedPlayerSystem _playerSystem = default!;
-
-    [Dependency] private readonly IPrototypeManager _protoManager = default!;
     private readonly Dictionary<string, string> _inverseTrackerLookup = new();
 
     public override void Initialize()
@@ -37,7 +35,7 @@ public abstract class SharedJobSystem : EntitySystem
         _inverseTrackerLookup.Clear();
 
         // This breaks if you have N trackers to 1 JobId but future concern.
-        foreach (var job in _protoManager.EnumeratePrototypes<JobPrototype>())
+        foreach (var job in _prototypes.EnumeratePrototypes<JobPrototype>())
         {
             _inverseTrackerLookup.Add(job.PlayTimeTracker, job.ID);
         }
@@ -50,7 +48,7 @@ public abstract class SharedJobSystem : EntitySystem
     /// <returns></returns>
     public string GetJobPrototype(string trackerProto)
     {
-        DebugTools.Assert(_protoManager.HasIndex<PlayTimeTrackerPrototype>(trackerProto));
+        DebugTools.Assert(_prototypes.HasIndex<PlayTimeTrackerPrototype>(trackerProto));
         return _inverseTrackerLookup[trackerProto];
     }
 
@@ -60,7 +58,7 @@ public abstract class SharedJobSystem : EntitySystem
     public bool TryGetDepartment(string jobProto, [NotNullWhen(true)] out DepartmentPrototype? departmentPrototype)
     {
         // Not that many departments so we can just eat the cost instead of storing the inverse lookup.
-        var departmentProtos = _protoManager.EnumeratePrototypes<DepartmentPrototype>().ToList();
+        var departmentProtos = _prototypes.EnumeratePrototypes<DepartmentPrototype>().ToList();
         departmentProtos.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal));
 
         foreach (var department in departmentProtos)
@@ -85,7 +83,7 @@ public abstract class SharedJobSystem : EntitySystem
     {
         // not sorting it since there should only be 1 primary department for a job.
         // this is enforced by the job tests.
-        var departmentProtos = _protoManager.EnumeratePrototypes<DepartmentPrototype>();
+        var departmentProtos = _prototypes.EnumeratePrototypes<DepartmentPrototype>();
 
         foreach (var department in departmentProtos)
         {
index 60eafce47429a3d931c55141b20c5dae1b5c353b..a6c3c4779d27c50c5dee70feecd00fd4ecf95f0f 100644 (file)
@@ -55,7 +55,7 @@ public abstract partial class SharedToolSystem
         if (!Resolve(uid, ref welder, ref solutionContainer))
             return default;
 
-        if (!SolutionContainer.TryGetSolution(
+        if (!SolutionContainerSystem.TryGetSolution(
                 (uid, solutionContainer),
                 welder.FuelSolutionName,
                 out _,
index 86b91dcda4677864ae846717027030a5d253c3c4..4c7383a38c435a5de77b2c49e883f84524658cc3 100644 (file)
@@ -31,7 +31,6 @@ public abstract partial class SharedToolSystem : EntitySystem
     [Dependency] private   readonly SharedTransformSystem _transformSystem = default!;
     [Dependency] private   readonly TileSystem _tiles = default!;
     [Dependency] private   readonly TurfSystem _turfs = default!;
-    [Dependency] protected readonly SharedSolutionContainerSystem SolutionContainer = default!;
 
     public const string CutQuality = "Cutting";
     public const string PulseQuality = "Pulsing";