So, just to clarify for any aspiring modders who might run into this thread in the year 3016:
The reason the rottable comp doesn't work outside of the tickerType=Rare scenario is probably due to this code (and correct me if I'm wrong here, guys) in CompRottable within the C# assembly -
I have to assume this is done to save system resources, since the Rare ticker doesn't apply to every tick.
The reason the rottable comp doesn't work outside of the tickerType=Rare scenario is probably due to this code (and correct me if I'm wrong here, guys) in CompRottable within the C# assembly -
Code Select
public override void CompTickRare()
{
float rotProgress = this.RotProgress;
float num = 1f;
float temperatureForCell = GenTemperature.GetTemperatureForCell(this.parent.PositionHeld);
num *= GenTemperature.RotRateAtTemperature(temperatureForCell);
this.RotProgress += Mathf.Round(num * 250f);
if (this.Stage == RotStage.Rotting && this.PropsRot.rotDestroys)
{
if (Find.SlotGroupManager.SlotGroupAt(this.parent.Position) != null)
{
Messages.Message("MessageRottedAwayInStorage".Translate(new object[]
{
this.parent.Label
}).CapitalizeFirst(), MessageSound.Silent);
LessonAutoActivator.TeachOpportunity(ConceptDefOf.SpoilageAndFreezers, OpportunityType.GoodToKnow);
}
this.parent.Destroy(DestroyMode.Vanish);
return;
}
bool flag = Mathf.FloorToInt(rotProgress / 60000f) != Mathf.FloorToInt(this.RotProgress / 60000f);
if (flag)
{
if (this.Stage == RotStage.Rotting && this.PropsRot.rotDamagePerDay > 0f)
{
this.parent.TakeDamage(new DamageInfo(DamageDefOf.Rotting, GenMath.RoundRandom(this.PropsRot.rotDamagePerDay), null, null, null));
}
else if (this.Stage == RotStage.Dessicated && this.PropsRot.dessicatedDamagePerDay > 0f && this.ShouldTakeDessicateDamage())
{
this.parent.TakeDamage(new DamageInfo(DamageDefOf.Rotting, GenMath.RoundRandom(this.PropsRot.dessicatedDamagePerDay), null, null, null));
}
}
}I have to assume this is done to save system resources, since the Rare ticker doesn't apply to every tick.
)