Improvements to Spawning

This commit is contained in:
Vegapnk 2024-07-16 19:02:30 +02:00
parent 13630e6e7c
commit 7f1fa01abd
2 changed files with 19 additions and 0 deletions

View file

@ -20,6 +20,7 @@
<li>0.5</li>
<li>0.25</li>
<li>0.1</li>
<li>0.005</li>
</mtbDaysPerStage>
</li>
</comps>
@ -72,6 +73,20 @@
</li>
</capMods>
</li>
<li>
<label>living fountain</label>
<minSeverity>10.1</minSeverity>
<hungerRateFactor>0.1</hungerRateFactor>
<statOffsets>
<Vulnerability>-1.5</Vulnerability>
</statOffsets>
<capMods>
<li>
<capacity>Moving</capacity>
<offset>-0.55</offset>
</li>
</capMods>
</li>
</stages>
</HediffDef>

View file

@ -97,8 +97,12 @@ namespace RJW_Genes
Thing cum = ThingMaker.MakeThing(cumDef);
cum.Position = cell;
int stacks = Math.Max(1, (int)(hediff.Severity * 3));
stacks = Math.Min(stacks, 75); // 75 is the default max stacksize ...
cum.stackCount = stacks;
cum.SpawnSetup(map, false);
//TODO: Reduce this ... better?
hediff.Severity -= stacks / 50;
}
private int ticksLeft;