]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix formatting warnings (#30122)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Wed, 17 Jul 2024 18:25:19 +0000 (20:25 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Jul 2024 18:25:19 +0000 (10:25 -0800)
Content.Server/Botany/Components/SeedComponent.cs
Content.Server/Botany/Systems/MutationSystem.cs
Content.Server/Botany/Systems/SeedExtractorSystem.cs

index f475ec3cfc445a67b1841eb062d6781545410b40..ffa1b7ef4e98bbc90b30ff883fccfe586e6bd1bb 100644 (file)
@@ -24,7 +24,7 @@ namespace Content.Server.Botany.Components
         /// <summary>
         ///     Name of a base seed prototype that is used if <see cref="Seed"/> is null.
         /// </summary>
-        [DataField("seedId", customTypeSerializer:typeof(PrototypeIdSerializer<SeedPrototype>))]
+        [DataField("seedId", customTypeSerializer: typeof(PrototypeIdSerializer<SeedPrototype>))]
         public string? SeedId;
     }
 }
index c7ce5d47efa45b0b16919e5563b505609030c64f..474859823a3906ce16c0fdce2d29bd513a11c047 100644 (file)
@@ -2,10 +2,8 @@ using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Content.Shared.Random;
 using Content.Shared.Random.Helpers;
-using Content.Shared.Chemistry.Reagent;
 using System.Linq;
 using Content.Shared.Atmos;
-using FastAccessors;
 
 namespace Content.Server.Botany;
 
@@ -42,6 +40,7 @@ public sealed class MutationSystem : EntitySystem
         // Add up everything in the bits column and put the number here.
         const int totalbits = 275;
 
+        #pragma warning disable IDE0055 // disable formatting warnings because this looks more readable
         // Tolerances (55)
         MutateFloat(ref seed.NutrientConsumption  , 0.05f, 1.2f, 5, totalbits, severity);
         MutateFloat(ref seed.WaterConsumption     , 3f   , 9f  , 5, totalbits, severity);
@@ -75,6 +74,7 @@ public sealed class MutationSystem : EntitySystem
         MutateBool(ref seed.TurnIntoKudzu , true , 10, totalbits, severity);
         MutateBool(ref seed.CanScream     , true , 10, totalbits, severity);
         seed.BioluminescentColor = RandomColor(seed.BioluminescentColor, 10, totalbits, severity);
+        #pragma warning restore IDE0055
 
         // ConstantUpgade (10)
         MutateHarvestType(ref seed.HarvestRepeat, 10, totalbits, severity);
@@ -261,7 +261,7 @@ public sealed class MutationSystem : EntitySystem
         {
             var pick = _randomChems.Pick(_robustRandom);
             string chemicalId = pick.reagent;
-            int amount = _robustRandom.Next(1, ((int)pick.quantity));
+            int amount = _robustRandom.Next(1, (int)pick.quantity);
             SeedChemQuantity seedChemQuantity = new SeedChemQuantity();
             if (chemicals.ContainsKey(chemicalId))
             {
@@ -274,7 +274,7 @@ public sealed class MutationSystem : EntitySystem
                 seedChemQuantity.Max = 1 + amount;
                 seedChemQuantity.Inherent = false;
             }
-            int potencyDivisor = (int) Math.Ceiling(100.0f / seedChemQuantity.Max);
+            int potencyDivisor = (int)Math.Ceiling(100.0f / seedChemQuantity.Max);
             seedChemQuantity.PotencyDivisor = potencyDivisor;
             chemicals[chemicalId] = seedChemQuantity;
         }
index f1ae6c9f11ae9ea5f297914f3fc202716e6f1861..9a5e70762e78ece77e42752d57704773a348f50e 100644 (file)
@@ -29,12 +29,12 @@ public sealed class SeedExtractorSystem : EntitySystem
             return;
         if (!_botanySystem.TryGetSeed(produce, out var seed) || seed.Seedless)
         {
-            _popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-no-seeds",("name", args.Used)),
+            _popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-no-seeds", ("name", args.Used)),
                 args.User, PopupType.MediumCaution);
             return;
         }
 
-        _popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message",("name", args.Used)),
+        _popupSystem.PopupCursor(Loc.GetString("seed-extractor-component-interact-message", ("name", args.Used)),
             args.User, PopupType.Medium);
 
         QueueDel(args.Used);