From 2977d89f3e93654126d2cd7c4a272e080929cf48 Mon Sep 17 00:00:00 2001 From: B_Kirill <153602297+B-Kirill@users.noreply.github.com> Date: Sun, 25 Jan 2026 06:35:41 +1000 Subject: [PATCH] Cleanup warnings: CS0168, CS0414, CS8321 (#42623) --- Content.Client/Humanoid/OrganMarkingPicker.xaml.cs | 1 - Content.Server/Administration/Managers/BanManager.cs | 1 - Content.Server/Body/Commands/AddHandCommand.cs | 2 -- Content.Server/Database/ServerDbBase.cs | 2 +- Content.Server/Radio/EntitySystems/JammerSystem.cs | 8 -------- Content.Shared/Body/InitialBodySystem.cs | 1 - Content.Shared/Chemistry/Reaction/ReactionMixerSystem.cs | 2 -- Content.Shared/Humanoid/HumanoidCharacterAppearance.cs | 5 ----- .../Components/EntitySystems/HandheldGrinderSystem.cs | 2 -- Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs | 1 - .../Teleportation/Systems/SharedPortalSystem.cs | 1 - 11 files changed, 1 insertion(+), 25 deletions(-) diff --git a/Content.Client/Humanoid/OrganMarkingPicker.xaml.cs b/Content.Client/Humanoid/OrganMarkingPicker.xaml.cs index 63ef73950d0..8bcdf41dfe5 100644 --- a/Content.Client/Humanoid/OrganMarkingPicker.xaml.cs +++ b/Content.Client/Humanoid/OrganMarkingPicker.xaml.cs @@ -14,7 +14,6 @@ namespace Content.Client.Humanoid; public sealed partial class OrganMarkingPicker : Control { [Dependency] private readonly MarkingManager _marking = default!; - [Dependency] private readonly IPrototypeManager _prototype = default!; [Dependency] private readonly IEntityManager _entity = default!; private readonly SpriteSystem _sprite; diff --git a/Content.Server/Administration/Managers/BanManager.cs b/Content.Server/Administration/Managers/BanManager.cs index ccf76e3995d..650e1a18723 100644 --- a/Content.Server/Administration/Managers/BanManager.cs +++ b/Content.Server/Administration/Managers/BanManager.cs @@ -29,7 +29,6 @@ public sealed partial class BanManager : IBanManager, IPostInjectInit [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly IChatManager _chat = default!; [Dependency] private readonly IServerDbManager _db = default!; - [Dependency] private readonly ServerDbEntryManager _entryManager = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly ILocalizationManager _localizationManager = default!; [Dependency] private readonly ILogManager _logManager = default!; diff --git a/Content.Server/Body/Commands/AddHandCommand.cs b/Content.Server/Body/Commands/AddHandCommand.cs index 5d02d19155e..ae8d6f69ebe 100644 --- a/Content.Server/Body/Commands/AddHandCommand.cs +++ b/Content.Server/Body/Commands/AddHandCommand.cs @@ -3,7 +3,6 @@ using Content.Server.Hands.Systems; using Content.Shared.Administration; using Content.Shared.Hands.Components; using Robust.Shared.Console; -using Robust.Shared.Prototypes; namespace Content.Server.Body.Commands { @@ -11,7 +10,6 @@ namespace Content.Server.Body.Commands sealed class AddHandCommand : IConsoleCommand { [Dependency] private readonly IEntityManager _entManager = default!; - [Dependency] private readonly IPrototypeManager _protoManager = default!; private static int _handIdAccumulator; diff --git a/Content.Server/Database/ServerDbBase.cs b/Content.Server/Database/ServerDbBase.cs index 2c5524f5023..ec463012354 100644 --- a/Content.Server/Database/ServerDbBase.cs +++ b/Content.Server/Database/ServerDbBase.cs @@ -215,7 +215,7 @@ namespace Content.Server.Database { return document.Deserialize(); } - catch (JsonException exception) + catch (JsonException) { return null; } diff --git a/Content.Server/Radio/EntitySystems/JammerSystem.cs b/Content.Server/Radio/EntitySystems/JammerSystem.cs index e39fc23831c..812e0404b4e 100644 --- a/Content.Server/Radio/EntitySystems/JammerSystem.cs +++ b/Content.Server/Radio/EntitySystems/JammerSystem.cs @@ -1,19 +1,11 @@ -using Content.Shared.DeviceNetwork.Components; -using Content.Shared.Interaction; -using Content.Shared.Power.EntitySystems; -using Content.Shared.PowerCell; using Content.Shared.Radio.EntitySystems; using Content.Shared.Radio.Components; -using Content.Shared.DeviceNetwork.Systems; namespace Content.Server.Radio.EntitySystems; public sealed class JammerSystem : SharedJammerSystem { - [Dependency] private readonly PowerCellSystem _powerCell = default!; - [Dependency] private readonly SharedBatterySystem _battery = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly SharedDeviceNetworkJammerSystem _jammer = default!; public override void Initialize() { diff --git a/Content.Shared/Body/InitialBodySystem.cs b/Content.Shared/Body/InitialBodySystem.cs index a062d1b0d1d..639024171fb 100644 --- a/Content.Shared/Body/InitialBodySystem.cs +++ b/Content.Shared/Body/InitialBodySystem.cs @@ -7,7 +7,6 @@ namespace Content.Shared.Body; public sealed class InitialBodySystem : EntitySystem { [Dependency] private readonly SharedContainerSystem _container = default!; - [Dependency] private readonly SharedTransformSystem _transform = default!; public override void Initialize() { diff --git a/Content.Shared/Chemistry/Reaction/ReactionMixerSystem.cs b/Content.Shared/Chemistry/Reaction/ReactionMixerSystem.cs index bd5b481517f..34c94f2cb75 100644 --- a/Content.Shared/Chemistry/Reaction/ReactionMixerSystem.cs +++ b/Content.Shared/Chemistry/Reaction/ReactionMixerSystem.cs @@ -7,7 +7,6 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Interaction.Events; using Content.Shared.Popups; using Robust.Shared.Audio.Systems; -using Robust.Shared.Network; namespace Content.Shared.Chemistry.Reaction; @@ -17,7 +16,6 @@ public sealed partial class ReactionMixerSystem : EntitySystem [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly INetManager _net = default!; public override void Initialize() { diff --git a/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs b/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs index b2123db04bf..734f0b8b6aa 100644 --- a/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs +++ b/Content.Shared/Humanoid/HumanoidCharacterAppearance.cs @@ -104,11 +104,6 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance, }; return new HumanoidCharacterAppearance(newEyeColor, newSkinColor, new()); - - float RandomizeColor(float channel) - { - return MathHelper.Clamp01(channel + random.Next(-25, 25) / 100f); - } } public static Color ClampColor(Color color) diff --git a/Content.Shared/Kitchen/Components/EntitySystems/HandheldGrinderSystem.cs b/Content.Shared/Kitchen/Components/EntitySystems/HandheldGrinderSystem.cs index 26130d6d30c..3a5931d261e 100644 --- a/Content.Shared/Kitchen/Components/EntitySystems/HandheldGrinderSystem.cs +++ b/Content.Shared/Kitchen/Components/EntitySystems/HandheldGrinderSystem.cs @@ -9,7 +9,6 @@ using Content.Shared.Popups; using Content.Shared.Stacks; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; -using Robust.Shared.Network; using Robust.Shared.Serialization; namespace Content.Shared.Kitchen.EntitySystems; @@ -22,7 +21,6 @@ internal sealed class HandheldGrinderSystem : EntitySystem [Dependency] private readonly SharedDestructibleSystem _destructibleSystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; - [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly SharedPuddleSystem _puddle = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; diff --git a/Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs b/Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs index 5fd10094668..258b964cca6 100644 --- a/Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs +++ b/Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs @@ -13,7 +13,6 @@ namespace Content.Shared.Radio.EntitySystems; public abstract class SharedJammerSystem : EntitySystem { [Dependency] private readonly ItemToggleSystem _itemToggle = default!; - [Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedDeviceNetworkJammerSystem _jammer = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; diff --git a/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs b/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs index 473a7f9fb9d..3735b68f611 100644 --- a/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs +++ b/Content.Shared/Teleportation/Systems/SharedPortalSystem.cs @@ -33,7 +33,6 @@ public abstract class SharedPortalSystem : EntitySystem [Dependency] private readonly SharedTransformSystem _transform = default!; [Dependency] private readonly PullingSystem _pulling = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly SharedGrapplingGunSystem _grappling = default!; [Dependency] private readonly SharedJointSystem _joints = default!; private const string PortalFixture = "portalFixture";