mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 03:50:54 +01:00
Fix plant metabolism in guidebook. (#41854)
* AAAAAAAAAAAAAAAAAAAAAAA * cleaner * even cleaner --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
faa12d0e66
commit
5650e6be0f
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user