]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Change Botany Minimum Quantity For Random Chems (#41955)
authorahandleman <ahandleman@wustl.edu>
Tue, 23 Dec 2025 22:15:51 +0000 (16:15 -0600)
committerGitHub <noreply@github.com>
Tue, 23 Dec 2025 22:15:51 +0000 (22:15 +0000)
* Initial change to fix minimums

* Switch to clamp for setting min

Content.Server/EntityEffects/Effects/Botany/PlantMutateChemicalsEntityEffectSystem.cs

index d5589966b11ed6a96b7a11903a72bc5814172607..1f8f3fc946fe5229d64750a6158c515f1c280ad8 100644 (file)
@@ -33,8 +33,9 @@ public sealed partial class PlantMutateChemicalsEntityEffectSystem : EntityEffec
         }
         else
         {
-            seedChemQuantity.Min = FixedPoint2.Epsilon;
-            seedChemQuantity.Max = FixedPoint2.Zero + amount;
+            //Set the minimum to a fifth of the quantity to give some level of bad luck protection
+            seedChemQuantity.Min = FixedPoint2.Clamp(pick.Quantity / 5f, FixedPoint2.Epsilon, 1f);
+            seedChemQuantity.Max = seedChemQuantity.Min + amount;
             seedChemQuantity.Inherent = false;
         }
         var potencyDivisor = 100f / seedChemQuantity.Max;