]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Cleanup warnings: CS0414, CS8524 (#40776)
authorB_Kirill <153602297+B-Kirill@users.noreply.github.com>
Wed, 8 Oct 2025 12:43:59 +0000 (22:43 +1000)
committerGitHub <noreply@github.com>
Wed, 8 Oct 2025 12:43:59 +0000 (12:43 +0000)
* Cleanup

* CS8524

Content.Server/GameTicking/Commands/SetGamePresetCommand.cs
Content.Server/Holopad/HolopadSystem.cs
Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs
Content.Shared/Humanoid/HumanoidCharacterAppearance.cs

index 6114a4ca0d32af5de094c1bee68a563218782991..10ec2a5e9baa2f64b4d5e8c63a4793f8041eb5be 100644 (file)
@@ -4,7 +4,6 @@ using Content.Server.GameTicking.Presets;
 using Content.Shared.Administration;
 using Linguini.Shared.Util;
 using Robust.Shared.Console;
-using Robust.Shared.Prototypes;
 
 namespace Content.Server.GameTicking.Commands
 {
@@ -12,7 +11,6 @@ namespace Content.Server.GameTicking.Commands
     public sealed class SetGamePresetCommand : IConsoleCommand
     {
         [Dependency] private readonly IEntityManager _entity = default!;
-        [Dependency] private readonly IPrototypeManager _prototype = default!;
 
         public string Command => "setgamepreset";
         public string Description => Loc.GetString("set-game-preset-command-description", ("command", Command));
index 0cba4824db9583ee27102749aafe2721d6e62fc9..5a4f4d93ce722fe328fdf0d836cf175e348071cd 100644 (file)
@@ -9,7 +9,6 @@ using Content.Shared.Holopad;
 using Content.Shared.IdentityManagement;
 using Content.Shared.Labels.Components;
 using Content.Shared.Mobs;
-using Content.Shared.Mobs.Systems;
 using Content.Shared.Power;
 using Content.Shared.Silicons.StationAi;
 using Content.Shared.Speech;
@@ -40,7 +39,6 @@ public sealed class HolopadSystem : SharedHolopadSystem
     [Dependency] private readonly PopupSystem _popupSystem = default!;
     [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly PvsOverrideSystem _pvs = default!;
-    [Dependency] private readonly MobStateSystem _mobState = default!;
 
     private float _updateTimer = 1.0f;
     private const float UpdateTime = 1.0f;
index 7e275c78cee49b3de3d7121a61ce505c99b26f7a..70d9c8ae9387526d1fa7ea4a3c41666d2bedeab9 100644 (file)
@@ -1,6 +1,5 @@
 using Content.Server.Administration.Logs;
 using Content.Server.DeviceNetwork.Systems;
-using Content.Shared.ActionBlocker;
 using Content.Shared.Database;
 using Content.Shared.DeviceNetwork;
 using Content.Shared.DeviceNetwork.Events;
@@ -17,7 +16,6 @@ namespace Content.Server.SurveillanceCamera;
 public sealed class SurveillanceCameraSystem : SharedSurveillanceCameraSystem
 {
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
-    [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
     [Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;
     [Dependency] private readonly DeviceNetworkSystem _deviceNetworkSystem = default!;
     [Dependency] private readonly UserInterfaceSystem _userInterface = default!;
index 583341c815a33ae1b16ba48fada9d0576cc62a9f..a9dd6d8755b83594a4f7c78946e582b892908de0 100644 (file)
@@ -100,6 +100,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
         {
             SkinColorationStrategyInput.Unary => skinColoration.FromUnary(speciesPrototype.DefaultHumanSkinTone),
             SkinColorationStrategyInput.Color => skinColoration.ClosestSkinColor(speciesPrototype.DefaultSkinTone),
+            _ => skinColoration.ClosestSkinColor(speciesPrototype.DefaultSkinTone),
         };
 
         return new(
@@ -109,11 +110,11 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
             Color.Black,
             Color.Black,
             skinColor,
-            new ()
+            new()
         );
     }
 
-    private static IReadOnlyList<Color> RealisticEyeColors = new List<Color>
+    private static IReadOnlyList<Color> _realisticEyeColors = new List<Color>
     {
         Color.Brown,
         Color.Gray,
@@ -145,7 +146,7 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
 
         // TODO: Add random markings
 
-        var newEyeColor = random.Pick(RealisticEyeColors);
+        var newEyeColor = random.Pick(_realisticEyeColors);
 
         var protoMan = IoCManager.Resolve<IPrototypeManager>();
         var skinType = protoMan.Index<SpeciesPrototype>(species).SkinColoration;
@@ -155,9 +156,10 @@ public sealed partial class HumanoidCharacterAppearance : ICharacterAppearance,
         {
             SkinColorationStrategyInput.Unary => strategy.FromUnary(random.NextFloat(0f, 100f)),
             SkinColorationStrategyInput.Color => strategy.ClosestSkinColor(new Color(random.NextFloat(1), random.NextFloat(1), random.NextFloat(1), 1)),
+            _ => strategy.ClosestSkinColor(new Color(random.NextFloat(1), random.NextFloat(1), random.NextFloat(1), 1)),
         };
 
-        return new HumanoidCharacterAppearance(newHairStyle, newHairColor, newFacialHairStyle, newHairColor, newEyeColor, newSkinColor, new ());
+        return new HumanoidCharacterAppearance(newHairStyle, newHairColor, newFacialHairStyle, newHairColor, newEyeColor, newSkinColor, new());
 
         float RandomizeColor(float channel)
         {