]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix 38 non-obsolete warnings (#33794)
authorSpaceManiac <tad@platymuus.com>
Tue, 11 Feb 2025 09:59:50 +0000 (01:59 -0800)
committerGitHub <noreply@github.com>
Tue, 11 Feb 2025 09:59:50 +0000 (20:59 +1100)
29 files changed:
Content.Client/DoAfter/DoAfterSystem.cs
Content.Client/GameTicking/Managers/ClientGameTicker.cs
Content.Client/Instruments/UI/InstrumentBoundUserInterface.cs
Content.Client/Lobby/LobbyUIController.cs
Content.Client/Pinpointer/UI/StationMapBeaconControl.xaml.cs
Content.Client/Power/Visualizers/CableVisualizerSystem.cs
Content.Client/Shuttles/UI/DockObject.xaml.cs
Content.Client/Shuttles/UI/DockingScreen.xaml.cs
Content.Client/Sprite/ContentSpriteSystem.cs
Content.Client/UserInterface/Controls/FancyTree/FancyTree.xaml.cs
Content.Client/Voting/VotingSystem.cs
Content.Server/Anomaly/Effects/InnerBodyAnomalySystem.cs
Content.Server/Atmos/Consoles/AtmosAlertsComputerSystem.cs
Content.Server/Botany/Systems/BotanySystem.Seed.cs
Content.Server/Chemistry/EntitySystems/HypospraySystem.cs
Content.Server/Chemistry/EntitySystems/SolutionInjectWhileEmbeddedSystem.cs
Content.Server/Discord/WebhookMessages/VoteWebhooks.cs
Content.Server/Explosion/EntitySystems/ExplosionSystem.cs
Content.Server/Forensics/Systems/ForensicPadSystem.cs
Content.Server/Ghost/GhostSystem.cs
Content.Server/NameIdentifier/NameIdentifierSystem.cs
Content.Server/Salvage/SalvageSystem.Magnet.cs
Content.Server/Station/Systems/StationSpawningSystem.cs
Content.Server/Voting/Managers/VoteManager.DefaultVotes.cs
Content.Server/Voting/Managers/VoteManager.cs
Content.Shared/Doors/Systems/SharedDoorSystem.cs
Content.Shared/GameTicking/SharedGameTicker.cs
Content.Shared/Interaction/SharedInteractionSystem.cs
Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs

index b00904a1fef496662f0859d12b9dfdb3f0d13048..5802059537fe401f12000e8c6f57464640db9313 100644 (file)
@@ -30,7 +30,9 @@ public sealed class DoAfterSystem : SharedDoAfterSystem
         _overlay.RemoveOverlay<DoAfterOverlay>();
     }
 
+#pragma warning disable RA0028 // No base call in overriden function
     public override void Update(float frameTime)
+#pragma warning restore RA0028 // No base call in overriden function
     {
         // Currently this only predicts do afters initiated by the player.
 
index fcf5ae91a4971db3f829ded1c08df744650334c9..3d5775a3c59c9084a1d679992a662270f3d9cce5 100644 (file)
@@ -43,6 +43,8 @@ namespace Content.Client.GameTicking.Managers
 
         public override void Initialize()
         {
+            base.Initialize();
+
             SubscribeNetworkEvent<TickerJoinLobbyEvent>(JoinLobby);
             SubscribeNetworkEvent<TickerJoinGameEvent>(JoinGame);
             SubscribeNetworkEvent<TickerConnectionStatusEvent>(ConnectionStatus);
index 4816ce8c365b93a006e3574d8f89c948cecfb8fb..13397e2d9f0e289b44007665ef0a085c0854d66f 100644 (file)
@@ -2,7 +2,6 @@ using Content.Shared.ActionBlocker;
 using Content.Shared.Instruments.UI;
 using Content.Shared.Interaction;
 using Robust.Client.Audio.Midi;
-using Robust.Client.GameObjects;
 using Robust.Client.Player;
 using Robust.Client.UserInterface;
 
@@ -13,7 +12,6 @@ namespace Content.Client.Instruments.UI
         public IEntityManager Entities => EntMan;
         [Dependency] public readonly IMidiManager MidiManager = default!;
         [Dependency] public readonly IFileDialogManager FileDialogManager = default!;
-        [Dependency] public readonly IPlayerManager PlayerManager = default!;
         [Dependency] public readonly ILocalizationManager Loc = default!;
 
         public readonly InstrumentSystem Instruments;
index 56dc9d6d41232648bb5901a76917ed50f37efdda..cea8248e9fc653891f8b724d6e0b6a9172120685 100644 (file)
@@ -43,7 +43,6 @@ public sealed class LobbyUIController : UIController, IOnStateEntered<LobbyState
     [UISystemDependency] private readonly ClientInventorySystem _inventory = default!;
     [UISystemDependency] private readonly StationSpawningSystem _spawn = default!;
     [UISystemDependency] private readonly GuidebookSystem _guide = default!;
-    [UISystemDependency] private readonly LoadoutSystem _loadouts = default!;
 
     private CharacterSetupGui? _characterSetup;
     private HumanoidProfileEditor? _profileEditor;
index a4d4055c7dfe1b554dbf2a081a42f8c3376f4ac4..e3bd2f4ebea90259f0141e33c725e0347e66594a 100644 (file)
@@ -10,8 +10,6 @@ namespace Content.Client.Pinpointer.UI;
 [GenerateTypedNameReferences]
 public sealed partial class StationMapBeaconControl : Control, IComparable<StationMapBeaconControl>
 {
-    [Dependency] private readonly IEntityManager _entMan = default!;
-
     public readonly EntityCoordinates BeaconPosition;
     public Action<EntityCoordinates>? OnPressed;
     public string? Label => BeaconNameLabel.Text;
index aa518d40195ce9a124d9a929ef3665ba81be0857..60fb0d127a7832098d5401eca6c71718e6431cf7 100644 (file)
@@ -4,14 +4,18 @@ using Robust.Client.GameObjects;
 
 namespace Content.Client.Power.Visualizers;
 
-public sealed class CableVisualizerSystem : VisualizerSystem<CableVisualizerComponent>
+public sealed class CableVisualizerSystem : EntitySystem
 {
+    [Dependency] private readonly AppearanceSystem _appearanceSystem = default!;
+
     public override void Initialize()
     {
+        base.Initialize();
+
         SubscribeLocalEvent<CableVisualizerComponent, AppearanceChangeEvent>(OnAppearanceChange, after: new[] { typeof(SubFloorHideSystem) });
     }
 
-    protected override void OnAppearanceChange(EntityUid uid, CableVisualizerComponent component, ref AppearanceChangeEvent args)
+    private void OnAppearanceChange(EntityUid uid, CableVisualizerComponent component, ref AppearanceChangeEvent args)
     {
         if (args.Sprite == null)
             return;
@@ -23,7 +27,7 @@ public sealed class CableVisualizerSystem : VisualizerSystem<CableVisualizerComp
             return;
         }
 
-        if (!AppearanceSystem.TryGetData<WireVisDirFlags>(uid, WireVisVisuals.ConnectedMask, out var mask, args.Component))
+        if (!_appearanceSystem.TryGetData<WireVisDirFlags>(uid, WireVisVisuals.ConnectedMask, out var mask, args.Component))
             mask = WireVisDirFlags.None;
 
         args.Sprite.LayerSetState(0, $"{component.StatePrefix}{(int) mask}");
index d7d565a23e94b130212bb5831171af83ae7dbc22..3aae64ced29debbdb20d895ad28ba59750bbefba 100644 (file)
@@ -1,24 +1,14 @@
-using System.Text;
 using Content.Shared.Shuttles.BUIStates;
-using Content.Shared.Shuttles.Systems;
-using JetBrains.Annotations;
 using Robust.Client.AutoGenerated;
 using Robust.Client.Graphics;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Map;
 
 namespace Content.Client.Shuttles.UI;
 
 [GenerateTypedNameReferences]
 public sealed partial class DockObject : PanelContainer
 {
-    [PublicAPI]
-    public event Action? UndockPressed;
-
-    [PublicAPI]
-    public event Action? ViewPressed;
-
     public BoxContainer ContentsContainer => Contents;
 
     public DockObject()
index c0aa7942148624ac784a6616dffbd551cd374ffe..97943c6973f85b487eb3413f9fb902a3d45575fb 100644 (file)
@@ -163,16 +163,6 @@ public sealed partial class DockingScreen : BoxContainer
             }
 
             dockContainer.AddDock(dock, DockingControl);
-
-            dockContainer.ViewPressed += () =>
-            {
-                OnDockPress(dock);
-            };
-
-            dockContainer.UndockPressed += () =>
-            {
-                UndockRequest?.Invoke(dock.Entity);
-            };
         }
     }
 
index da0547666b2b4df61acb769d88aef5cd62cc4d25..831978f904d565e9dfd9543b60af3955d2c92cf7 100644 (file)
@@ -3,12 +3,12 @@ using System.Numerics;
 using System.Threading;
 using System.Threading.Tasks;
 using Content.Client.Administration.Managers;
-using Content.Shared.Database;
 using Content.Shared.Verbs;
 using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.UserInterface;
 using Robust.Shared.ContentPack;
+using Robust.Shared.Exceptions;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
 using SixLabors.ImageSharp;
@@ -24,6 +24,7 @@ public sealed class ContentSpriteSystem : EntitySystem
     [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly IResourceManager _resManager = default!;
     [Dependency] private readonly IUserInterfaceManager _ui = default!;
+    [Dependency] private readonly IRuntimeLog _runtimeLog = default!;
 
     private ContentSpriteControl _control = new();
 
@@ -42,12 +43,12 @@ public sealed class ContentSpriteSystem : EntitySystem
     {
         base.Shutdown();
 
-        foreach (var queued in _control._queuedTextures)
+        foreach (var queued in _control.QueuedTextures)
         {
             queued.Tcs.SetCanceled();
         }
 
-        _control._queuedTextures.Clear();
+        _control.QueuedTextures.Clear();
 
         _ui.RootControl.RemoveChild(_control);
     }
@@ -103,7 +104,7 @@ public sealed class ContentSpriteSystem : EntitySystem
         var texture = _clyde.CreateRenderTarget(new Vector2i(size.X, size.Y), new RenderTargetFormatParameters(RenderTargetColorFormat.Rgba8Srgb), name: "export");
         var tcs = new TaskCompletionSource(cancelToken);
 
-        _control._queuedTextures.Enqueue((texture, direction, entity, includeId, tcs));
+        _control.QueuedTextures.Enqueue((texture, direction, entity, includeId, tcs));
 
         await tcs.Task;
     }
@@ -113,13 +114,21 @@ public sealed class ContentSpriteSystem : EntitySystem
         if (!_adminManager.IsAdmin())
             return;
 
+        var target = ev.Target;
         Verb verb = new()
         {
             Text = Loc.GetString("export-entity-verb-get-data-text"),
             Category = VerbCategory.Debug,
-            Act = () =>
+            Act = async () =>
             {
-                Export(ev.Target);
+                try
+                {
+                    await Export(target);
+                }
+                catch (Exception e)
+                {
+                    _runtimeLog.LogException(e, $"{nameof(ContentSpriteSystem)}.{nameof(Export)}");
+                }
             },
         };
 
@@ -141,7 +150,7 @@ public sealed class ContentSpriteSystem : EntitySystem
             Direction Direction,
             EntityUid Entity,
             bool IncludeId,
-            TaskCompletionSource Tcs)> _queuedTextures = new();
+            TaskCompletionSource Tcs)> QueuedTextures = new();
 
         private ISawmill _sawmill;
 
@@ -155,7 +164,7 @@ public sealed class ContentSpriteSystem : EntitySystem
         {
             base.Draw(handle);
 
-            while (_queuedTextures.TryDequeue(out var queued))
+            while (QueuedTextures.TryDequeue(out var queued))
             {
                 if (queued.Tcs.Task.IsCanceled)
                     continue;
index 6cf7622ea4e8a65038d8069573a28a03a5c34b11..e231004868ad50f38c8e547ab7760db1513a76e8 100644 (file)
@@ -7,7 +7,6 @@ using Robust.Client.ResourceManagement;
 using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.XAML;
-using Robust.Shared.Graphics;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
 
@@ -96,7 +95,6 @@ public sealed partial class FancyTree : Control
     private void LoadIcons()
     {
         IconColor = TryGetStyleProperty(StylePropertyIconColor, out Color color) ? color : Color.White;
-        string? path;
 
         if (!TryGetStyleProperty(StylePropertyIconExpanded, out IconExpanded))
             IconExpanded = _resCache.GetTexture(DefaultIconExpanded);
index dd74e1ccb1851115f23416306d1d1d70962a420d..9fea4d153f0c92d586b04e646be00d54e75e8826 100644 (file)
@@ -1,15 +1,11 @@
-using Content.Client.Ghost;
 using Content.Shared.Voting;
 
 namespace Content.Client.Voting;
 
 public sealed class VotingSystem : EntitySystem
 {
-
     public event Action<VotePlayerListResponseEvent>? VotePlayerListResponse; //Provides a list of players elligble for vote actions
 
-    [Dependency] private readonly GhostSystem _ghostSystem = default!;
-
     public override void Initialize()
     {
         base.Initialize();
index b75be376383fafc75d0bde4b5e3fcd2248b0cd6b..5380a1aa0a1b2a27593154432b75b28c5ee25c67 100644 (file)
@@ -4,7 +4,6 @@ using Content.Server.Chat.Managers;
 using Content.Server.Jittering;
 using Content.Server.Mind;
 using Content.Server.Stunnable;
-using Content.Shared.Actions;
 using Content.Shared.Anomaly;
 using Content.Shared.Anomaly.Components;
 using Content.Shared.Anomaly.Effects;
@@ -24,8 +23,6 @@ public sealed class InnerBodyAnomalySystem : SharedInnerBodyAnomalySystem
 {
     [Dependency] private readonly IAdminLogManager _adminLog = default!;
     [Dependency] private readonly AnomalySystem _anomaly = default!;
-    [Dependency] private readonly ActionContainerSystem _actionContainer = default!;
-    [Dependency] private readonly SharedActionsSystem _actions = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly BodySystem _body = default!;
     [Dependency] private readonly IChatManager _chat = default!;
index 2d35ae59731094edfa94a8c159d79bf691ba034e..6e3a11b5f939e6bdcb63d18adac0b4e20cd3bade 100644 (file)
@@ -10,10 +10,8 @@ using Content.Shared.Atmos.Monitor;
 using Content.Shared.Atmos.Monitor.Components;
 using Content.Shared.DeviceNetwork.Components;
 using Content.Shared.Pinpointer;
-using Content.Shared.Tag;
 using Robust.Server.GameObjects;
 using Robust.Shared.Map.Components;
-using Robust.Shared.Timing;
 using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 
@@ -25,11 +23,9 @@ public sealed class AtmosAlertsComputerSystem : SharedAtmosAlertsComputerSystem
     [Dependency] private readonly AirAlarmSystem _airAlarmSystem = default!;
     [Dependency] private readonly AtmosDeviceNetworkSystem _atmosDevNet = default!;
     [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
-    [Dependency] private readonly TagSystem _tagSystem = default!;
     [Dependency] private readonly MapSystem _mapSystem = default!;
     [Dependency] private readonly TransformSystem _transformSystem = default!;
     [Dependency] private readonly NavMapSystem _navMapSystem = default!;
-    [Dependency] private readonly IGameTiming _gameTiming = default!;
     [Dependency] private readonly DeviceListSystem _deviceListSystem = default!;
 
     private const float UpdateTime = 1.0f;
@@ -54,7 +50,7 @@ public sealed class AtmosAlertsComputerSystem : SharedAtmosAlertsComputerSystem
         SubscribeLocalEvent<AtmosAlertsDeviceComponent, AnchorStateChangedEvent>(OnDeviceAnchorChanged);
     }
 
-    #region Event handling 
+    #region Event handling
 
     private void OnConsoleInit(EntityUid uid, AtmosAlertsComputerComponent component, ComponentInit args)
     {
index 76421daf2e9c788a5ba2a97a9d5d4c18648ae88a..81645be34f40f99e69004236fe9d26b7b6337844 100644 (file)
@@ -10,7 +10,6 @@ using Content.Shared.Random;
 using Content.Shared.Random.Helpers;
 using Robust.Server.GameObjects;
 using Robust.Shared.Map;
-using Robust.Shared.Physics.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using System.Diagnostics.CodeAnalysis;
@@ -25,10 +24,8 @@ public sealed partial class BotanySystem : EntitySystem
     [Dependency] private readonly AppearanceSystem _appearance = default!;
     [Dependency] private readonly PopupSystem _popupSystem = default!;
     [Dependency] private readonly SharedHandsSystem _hands = default!;
-    [Dependency] private readonly SharedPointLightSystem _light = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
     [Dependency] private readonly MetaDataSystem _metaData = default!;
-    [Dependency] private readonly FixtureSystem _fixtureSystem = default!;
     [Dependency] private readonly RandomHelperSystem _randomHelper = default!;
 
     public override void Initialize()
index 8345aa3c3ddeff7997ebb96b3fcdda7661941be3..d537c2ffdd7e2928619c6296664508a69cdfad33 100644 (file)
@@ -12,10 +12,7 @@ using Content.Shared.Interaction.Events;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Timing;
 using Content.Shared.Weapons.Melee.Events;
-using Content.Server.Interaction;
 using Content.Server.Body.Components;
-using Robust.Shared.GameStates;
-using System.Diagnostics.CodeAnalysis;
 using System.Linq;
 using Robust.Server.Audio;
 
@@ -24,7 +21,6 @@ namespace Content.Server.Chemistry.EntitySystems;
 public sealed class HypospraySystem : SharedHypospraySystem
 {
     [Dependency] private readonly AudioSystem _audio = default!;
-    [Dependency] private readonly InteractionSystem _interaction = default!;
 
     public override void Initialize()
     {
index 2baeba9da15a9e16b3e24142dccdeff7445f349e..eb805a9099033ccb1be220f1ad07702a18479829 100644 (file)
@@ -1,14 +1,6 @@
-using Content.Server.Body.Components;
-using Content.Server.Body.Systems;
 using Content.Server.Chemistry.Components;
-using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.Chemistry.Events;
-using Content.Shared.Inventory;
-using Content.Shared.Popups;
 using Content.Shared.Projectiles;
-using Content.Shared.Tag;
-using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Collections;
 using Robust.Shared.Timing;
 
 namespace Content.Server.Chemistry.EntitySystems;
@@ -19,16 +11,11 @@ namespace Content.Server.Chemistry.EntitySystems;
 public sealed class SolutionInjectWhileEmbeddedSystem : EntitySystem
 {
        [Dependency] private readonly IGameTiming _gameTiming = default!;
-    [Dependency] private readonly BloodstreamSystem _bloodstream = default!;
-    [Dependency] private readonly InventorySystem _inventory = default!;
-    [Dependency] private readonly SharedPopupSystem _popup = default!;
-    [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
-    [Dependency] private readonly TagSystem _tag = default!;
 
     public override void Initialize()
     {
         base.Initialize();
-        
+
         SubscribeLocalEvent<SolutionInjectWhileEmbeddedComponent, MapInitEvent>(OnMapInit);
     }
 
index 74953d10fa25e8972f635a79b8c77d3bbdb75ec2..9e147fced2e40f95c336d0912504b28052e0b0ae 100644 (file)
@@ -1,9 +1,7 @@
 using Content.Server.GameTicking;
 using Content.Server.Voting;
 using Robust.Server;
-using Robust.Shared.Configuration;
 using Robust.Shared.Utility;
-using System.Diagnostics;
 using System.Text.Json;
 using System.Text.Json.Nodes;
 
@@ -11,7 +9,6 @@ namespace Content.Server.Discord.WebhookMessages;
 
 public sealed class VoteWebhooks : IPostInjectInit
 {
-    [Dependency] private readonly IConfigurationManager _cfg = default!;
     [Dependency] private readonly IEntitySystemManager _entSys = default!;
     [Dependency] private readonly DiscordWebhook _discord = default!;
     [Dependency] private readonly IBaseServer _baseServer = default!;
index 0962674504deaaa7bdaee1272ddbde763b3b634f..beffbd6d68eabe8d13df64bf127525e774f09241 100644 (file)
@@ -3,10 +3,8 @@ using System.Numerics;
 using Content.Server.Administration.Logs;
 using Content.Server.Atmos.Components;
 using Content.Server.Chat.Managers;
-using Content.Server.Explosion.Components;
 using Content.Server.NodeContainer.EntitySystems;
 using Content.Server.NPC.Pathfinding;
-using Content.Shared.Armor;
 using Content.Shared.Camera;
 using Content.Shared.CCVar;
 using Content.Shared.Damage;
@@ -18,8 +16,6 @@ using Content.Shared.GameTicking;
 using Content.Shared.Inventory;
 using Content.Shared.Projectiles;
 using Content.Shared.Throwing;
-using Content.Shared.Explosion.Components;
-using Content.Shared.Explosion.EntitySystems;
 using Robust.Server.GameStates;
 using Robust.Server.Player;
 using Robust.Shared.Audio.Systems;
index a3f5627cdba20138a760a3333b2ede15c0ed5fa9..71bbcfb44a0a206d2f9654572c2b62d3502b9a4a 100644 (file)
@@ -17,7 +17,6 @@ namespace Content.Server.Forensics
         [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
         [Dependency] private readonly InventorySystem _inventory = default!;
         [Dependency] private readonly PopupSystem _popupSystem = default!;
-        [Dependency] private readonly MetaDataSystem _metaData = default!;
         [Dependency] private readonly LabelSystem _label = default!;
 
         public override void Initialize()
index 25319557ae165bc76540d0dacdf355c211538884..4220f1231ecf3b1b42ce68f455b4bf7a9403ad7a 100644 (file)
@@ -57,7 +57,6 @@ namespace Content.Server.Ghost
         [Dependency] private readonly MetaDataSystem _metaData = default!;
         [Dependency] private readonly MobThresholdSystem _mobThresholdSystem = default!;
         [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
-        [Dependency] private readonly IAdminLogManager _adminLogger = default!;
         [Dependency] private readonly IConfigurationManager _configurationManager = default!;
         [Dependency] private readonly IChatManager _chatManager = default!;
         [Dependency] private readonly SharedMindSystem _mind = default!;
@@ -503,7 +502,7 @@ namespace Content.Server.Ghost
             var playerEntity = mind.CurrentEntity;
 
             if (playerEntity != null && viaCommand)
-                _adminLogger.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} is attempting to ghost via command");
+                _adminLog.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} is attempting to ghost via command");
 
             var handleEv = new GhostAttemptHandleEvent(mind, canReturnGlobal);
             RaiseLocalEvent(handleEv);
@@ -575,7 +574,7 @@ namespace Content.Server.Ghost
             }
 
             if (playerEntity != null)
-                _adminLogger.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} ghosted{(!canReturn ? " (non-returnable)" : "")}");
+                _adminLog.Add(LogType.Mind, $"{EntityManager.ToPrettyString(playerEntity.Value):player} ghosted{(!canReturn ? " (non-returnable)" : "")}");
 
             var ghost = SpawnGhost((mindId, mind), position, canReturn);
 
index 6db6e0ff565cdeb5f41056dcf081eb522e448ceb..273e9407fd5f65de6d4643417627a8028d05b19e 100644 (file)
@@ -14,7 +14,6 @@ public sealed class NameIdentifierSystem : EntitySystem
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
     [Dependency] private readonly IRobustRandom _robustRandom = default!;
     [Dependency] private readonly MetaDataSystem _metaData = default!;
-    [Dependency] private readonly ILogManager _logManager = default!;
 
     /// <summary>
     /// Free IDs available per <see cref="NameIdentifierGroupPrototype"/>.
index 81db78fb20113a3ba6fc4a53c8016ab411354624..dd61aad2742f417065d04f12641b4074862dc938 100644 (file)
@@ -2,19 +2,20 @@ using System.Linq;
 using System.Numerics;
 using System.Threading.Tasks;
 using Content.Server.Salvage.Magnet;
-using Content.Shared.Humanoid;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Procedural;
 using Content.Shared.Radio;
 using Content.Shared.Salvage.Magnet;
 using Robust.Server.Maps;
+using Robust.Shared.Exceptions;
 using Robust.Shared.Map;
-using Robust.Shared.Map.Components;
 
 namespace Content.Server.Salvage;
 
 public sealed partial class SalvageSystem
 {
+    [Dependency] private readonly IRuntimeLog _runtimeLog = default!;
+
     [ValidatePrototypeId<RadioChannelPrototype>]
     private const string MagnetChannel = "Supply";
 
@@ -45,7 +46,19 @@ public sealed partial class SalvageSystem
             return;
         }
 
-        TakeMagnetOffer((station.Value, dataComp), args.Index, (uid, component));
+        var index = args.Index;
+        async void TryTakeMagnetOffer()
+        {
+            try
+            {
+                await TakeMagnetOffer((station.Value, dataComp), index, (uid, component));
+            }
+            catch (Exception e)
+            {
+                _runtimeLog.LogException(e, $"{nameof(SalvageSystem)}.{nameof(TakeMagnetOffer)}");
+            }
+        }
+        TryTakeMagnetOffer();
     }
 
     private void OnMagnetStartup(EntityUid uid, SalvageMagnetComponent component, ComponentStartup args)
index 3dd499537137473c11401d93c6b6e8f3a3599e6a..de4b36df26592e1d78225e2e4a02d7a93b9241c4 100644 (file)
@@ -4,8 +4,6 @@ using Content.Server.Humanoid;
 using Content.Server.IdentityManagement;
 using Content.Server.Mind.Commands;
 using Content.Server.PDA;
-using Content.Server.Shuttles.Systems;
-using Content.Server.Spawners.EntitySystems;
 using Content.Server.Station.Components;
 using Content.Shared.Access.Components;
 using Content.Shared.Access.Systems;
@@ -39,10 +37,8 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
 {
     [Dependency] private readonly SharedAccessSystem _accessSystem = default!;
     [Dependency] private readonly ActorSystem _actors = default!;
-    [Dependency] private readonly ArrivalsSystem _arrivalsSystem = default!;
     [Dependency] private readonly IdCardSystem _cardSystem = default!;
     [Dependency] private readonly IConfigurationManager _configurationManager = default!;
-    [Dependency] private readonly ContainerSpawnPointSystem _containerSpawnPointSystem = default!;
     [Dependency] private readonly HumanoidAppearanceSystem _humanoidSystem = default!;
     [Dependency] private readonly IdentitySystem _identity = default!;
     [Dependency] private readonly MetaDataSystem _metaSystem = default!;
index fb99b3cfad821ec6262f7770f6465137693d58f8..187295a0734ea1edad39e51abbfca2e069ee3fbf 100644 (file)
@@ -1,7 +1,6 @@
 using System.Linq;
 using Content.Server.Administration;
 using Content.Server.Administration.Managers;
-using Content.Server.Database;
 using Content.Server.Discord.WebhookMessages;
 using Content.Server.GameTicking;
 using Content.Server.GameTicking.Presets;
@@ -11,7 +10,6 @@ using Content.Server.RoundEnd;
 using Content.Shared.CCVar;
 using Content.Shared.Chat;
 using Content.Shared.Database;
-using Content.Shared.Ghost;
 using Content.Shared.Players;
 using Content.Shared.Players.PlayTimeTracking;
 using Content.Shared.Voting;
@@ -27,14 +25,13 @@ namespace Content.Server.Voting.Managers
         [Dependency] private readonly IPlayerLocator _locator = default!;
         [Dependency] private readonly ILogManager _logManager = default!;
         [Dependency] private readonly IBanManager _bans = default!;
-        [Dependency] private readonly IServerDbManager _dbManager = default!;
         [Dependency] private readonly VoteWebhooks _voteWebhooks = default!;
 
         private VotingSystem? _votingSystem;
         private RoleSystem? _roleSystem;
         private GameTicker? _gameTicker;
 
-        private static readonly Dictionary<StandardVoteType, CVarDef<bool>> _voteTypesToEnableCVars = new()
+        private static readonly Dictionary<StandardVoteType, CVarDef<bool>> VoteTypesToEnableCVars = new()
         {
             {StandardVoteType.Restart, CCVars.VoteRestartEnabled},
             {StandardVoteType.Preset, CCVars.VotePresetEnabled},
index 10b975fdcac29054e4d82d1c535324dc9e6f8ee3..94e637638ee4baa9e3fb9d0c9d0c68df87b89c0f 100644 (file)
@@ -65,7 +65,7 @@ namespace Content.Server.Voting.Managers
                 DirtyCanCallVoteAll();
             });
 
-            foreach (var kvp in _voteTypesToEnableCVars)
+            foreach (var kvp in VoteTypesToEnableCVars)
             {
                 _cfg.OnValueChanged(kvp.Value, _ =>
                 {
@@ -346,7 +346,7 @@ namespace Content.Server.Voting.Managers
             if (!_cfg.GetCVar(CCVars.VoteEnabled))
                 return false;
             // Specific standard vote types can be disabled with cvars.
-            if (voteType != null && _voteTypesToEnableCVars.TryGetValue(voteType.Value, out var cvar) && !_cfg.GetCVar(cvar))
+            if (voteType != null && VoteTypesToEnableCVars.TryGetValue(voteType.Value, out var cvar) && !_cfg.GetCVar(cvar))
                 return false;
 
             // Cannot start vote if vote is already active (as non-admin).
index f2dcd443e918d3d74c71e3b7b16a54cbe778f7ba..23bea0cdf14c55b438e597ebd49672ec681e3bca 100644 (file)
@@ -23,7 +23,6 @@ using Robust.Shared.Timing;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Map.Components;
-using Robust.Shared.Physics;
 
 namespace Content.Shared.Doors.Systems;
 
index 5126a6bdc4956ff39fecafa243cfd484f97507aa..015889b1523d70a2ae34c4abf72e71e4d2a5c028 100644 (file)
@@ -41,7 +41,10 @@ namespace Content.Shared.GameTicking
 
         private void OnRecordingStart(MappingDataNode metadata, List<object> events)
         {
-            metadata["roundId"] = new ValueDataNode(RoundId.ToString());
+            if (RoundId != 0)
+            {
+                metadata["roundId"] = new ValueDataNode(RoundId.ToString());
+            }
         }
 
         public TimeSpan RoundDuration()
index 1eb7bd112d3ec5e3e777cc9b132054a339ff6b1f..2f09f3e54914cd946ec2c56c2cd3dc8cd8207d12 100644 (file)
@@ -28,7 +28,6 @@ using Content.Shared.UserInterface;
 using Content.Shared.Verbs;
 using Content.Shared.Wall;
 using JetBrains.Annotations;
-using Robust.Shared.Configuration;
 using Robust.Shared.Containers;
 using Robust.Shared.Input;
 using Robust.Shared.Input.Binding;
@@ -38,7 +37,6 @@ using Robust.Shared.Physics;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Player;
-using Robust.Shared.Random;
 using Robust.Shared.Serialization;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
@@ -65,12 +63,10 @@ namespace Content.Shared.Interaction
         [Dependency] private readonly UseDelaySystem _useDelay = default!;
         [Dependency] private readonly PullingSystem _pullSystem = default!;
         [Dependency] private readonly InventorySystem _inventory = default!;
-        [Dependency] private readonly IRobustRandom _random = default!;
         [Dependency] private readonly TagSystem _tagSystem = default!;
         [Dependency] private readonly SharedUserInterfaceSystem _ui = default!;
         [Dependency] private readonly SharedStrippableSystem _strippable = default!;
         [Dependency] private readonly SharedPlayerRateLimitManager _rateLimit = default!;
-        [Dependency] private readonly IConfigurationManager _cfg = default!;
         [Dependency] private readonly ISharedChatManager _chat = default!;
 
         private EntityQuery<IgnoreUIRangeComponent> _ignoreUiRangeQuery;
index 829f574ad1d19305ac49a9649cf5df101b48cab8..5b0f331234d48fc136bc0971fba5f7aa0532c306 100644 (file)
@@ -9,7 +9,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Item;
 using Content.Shared.Lock;
 using Content.Shared.Movement.Events;
-using Content.Shared.Placeable;
 using Content.Shared.Popups;
 using Content.Shared.Storage.Components;
 using Content.Shared.Tools.Systems;
@@ -34,7 +33,6 @@ public abstract class SharedEntityStorageSystem : EntitySystem
     [Dependency] private   readonly IGameTiming _timing = default!;
     [Dependency] private   readonly INetManager _net = default!;
     [Dependency] private   readonly EntityLookupSystem _lookup = default!;
-    [Dependency] private   readonly PlaceableSurfaceSystem _placeableSurface = default!;
     [Dependency] private   readonly SharedAppearanceSystem _appearance = default!;
     [Dependency] private   readonly SharedAudioSystem _audio = default!;
     [Dependency] private   readonly SharedContainerSystem _container = default!;