]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix plant metabolism in guidebook. (#41854)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Sun, 14 Dec 2025 21:51:16 +0000 (13:51 -0800)
committerGitHub <noreply@github.com>
Sun, 14 Dec 2025 21:51:16 +0000 (21:51 +0000)
AAAAAAAAAAAAAAAAAAAAAAA

* cleaner

* even cleaner

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Shared/Chemistry/Reagent/ReagentPrototype.cs

index e634e03284b31395a03e006de023e85b8bc2810a..45ef5c672ef0627db482d0ff37c449a42d81135f 100644 (file)
@@ -208,7 +208,7 @@ namespace Content.Shared.Chemistry.Reagent
             return removed;
         }
 
-        public IEnumerable<string> GuidebookReagentEffectsDescription(IPrototypeManager prototype, IEntitySystemManager entSys, IEnumerable<EntityEffect> effects, FixedPoint2? metabolism = null)
+        public IEnumerable<string> GuidebookReagentEffectsDescription(IPrototypeManager prototype, IEntitySystemManager entSys, IEnumerable<EntityEffect> effects, FixedPoint2 metabolism)
         {
             return effects.Select(x => GuidebookReagentEffectDescription(prototype, entSys, x, metabolism))
                 .Where(x => x is not null)
@@ -216,12 +216,12 @@ namespace Content.Shared.Chemistry.Reagent
                 .ToArray();
         }
 
-        public string? GuidebookReagentEffectDescription(IPrototypeManager prototype, IEntitySystemManager entSys, EntityEffect effect, FixedPoint2? metabolism)
+        public string? GuidebookReagentEffectDescription(IPrototypeManager prototype, IEntitySystemManager entSys, EntityEffect effect, FixedPoint2 metabolism)
         {
             if (effect.EntityEffectGuidebookText(prototype, entSys) is not { } description)
                 return null;
 
-            var quantity = metabolism == null ? 0f : (double)(effect.MinScale * metabolism);
+            var quantity = (double)(effect.MinScale * metabolism);
 
             return Loc.GetString(
                 "guidebook-reagent-effect-description",
@@ -256,7 +256,7 @@ namespace Content.Shared.Chemistry.Reagent
             if (proto.PlantMetabolisms.Count > 0)
             {
                 PlantMetabolisms =
-                    new List<string>(proto.GuidebookReagentEffectsDescription(prototype, entSys, proto.PlantMetabolisms));
+                    new List<string>(proto.GuidebookReagentEffectsDescription(prototype, entSys, proto.PlantMetabolisms, FixedPoint2.New(1f)));
             }
         }
     }