Update fertility levels, use BuildingBase.fertility Def attribute for fertility calculations

This commit is contained in:
2023-07-15 20:18:52 -05:00
parent 7541428635
commit 0546fb2e55
2 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,6 @@ namespace HydroponicsExpanded {
public class BuildingDenseHydroponicsBasin : Building_PlantGrower, IThingHolder, IPlantToGrowSettable {
private ThingOwner _innerContainer;
private int _capacity = 4;
private float _fertility = 1.0f;
private float _highestGrowth = 0f;
private HydroponicsStage _stage = HydroponicsStage.Sowing;
@@ -74,7 +73,7 @@ namespace HydroponicsExpanded {
// ReSharper disable once PossibleNullReferenceException
float growthAmount = 1f / (60_000f * growthTrackingPlant.def.plant.growDays) * 250f;
growthTrackingPlant.Growth += _fertility * growthAmount;
growthTrackingPlant.Growth += def.fertility * growthAmount;
_highestGrowth = growthTrackingPlant.Growth;
// When growth is complete, move to the harvesting stage.