From 5650e6be0fd39da9888f29c64452650c4e9e70f9 Mon Sep 17 00:00:00 2001 From: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:51:16 -0800 Subject: [PATCH] Fix plant metabolism in guidebook. (#41854) * AAAAAAAAAAAAAAAAAAAAAAA * cleaner * even cleaner --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> --- Content.Shared/Chemistry/Reagent/ReagentPrototype.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs index e634e03284..45ef5c672e 100644 --- a/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs +++ b/Content.Shared/Chemistry/Reagent/ReagentPrototype.cs @@ -208,7 +208,7 @@ namespace Content.Shared.Chemistry.Reagent return removed; } - public IEnumerable GuidebookReagentEffectsDescription(IPrototypeManager prototype, IEntitySystemManager entSys, IEnumerable effects, FixedPoint2? metabolism = null) + public IEnumerable GuidebookReagentEffectsDescription(IPrototypeManager prototype, IEntitySystemManager entSys, IEnumerable 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(proto.GuidebookReagentEffectsDescription(prototype, entSys, proto.PlantMetabolisms)); + new List(proto.GuidebookReagentEffectsDescription(prototype, entSys, proto.PlantMetabolisms, FixedPoint2.New(1f))); } } } -- 2.52.0