mirror of
https://github.com/Xevion/RimWorld-Hydroponics-Expanded.git
synced 2025-12-07 13:16:24 -06:00
Update fertility levels, use BuildingBase.fertility Def attribute for fertility calculations
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
<Mass>80</Mass>
|
||||
</statBases>
|
||||
<size>(1,4)</size>
|
||||
<!-- this stat doesn't do anything for this mod -->
|
||||
<fertility>2.8</fertility>
|
||||
<building>
|
||||
<defaultPlantToGrow>Plant_Rice</defaultPlantToGrow>
|
||||
@@ -88,6 +87,7 @@
|
||||
<cornerBR>Damage/Corner</cornerBR>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<fertility>3.0</fertility>
|
||||
<constructionSkillPrerequisite>8</constructionSkillPrerequisite>
|
||||
<statBases>
|
||||
<WorkToBuild>5000</WorkToBuild>
|
||||
@@ -133,6 +133,7 @@
|
||||
<cornerBR>Damage/Corner</cornerBR>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<fertility>3.15</fertility>
|
||||
<constructionSkillPrerequisite>10</constructionSkillPrerequisite>
|
||||
<statBases>
|
||||
<WorkToBuild>7000</WorkToBuild>
|
||||
@@ -177,6 +178,7 @@
|
||||
<cornerBR>Damage/Corner</cornerBR>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<fertility>3.4</fertility>
|
||||
<constructionSkillPrerequisite>12</constructionSkillPrerequisite>
|
||||
<statBases>
|
||||
<WorkToBuild>9500</WorkToBuild>
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user