RimWorld

RimWorld

Rimsential - Homebound
VPQR 12 Feb, 2022 @ 8:11am
Suggested modification to tick logic
Hello. I have a little suggestion I'd like to make.

CompPawnStorage.CompTick tries to increment the rest need level without checking if the pawn in question actually has a rest need.
That's typically not a problem, but some types of modded pawns, like robots, don't have a rest need, and the rapidly occurring errors will tank TPS enough so that storing these pawns is not viable.

May I suggest adding a null check in CompTick's rest need increment?
if (Props.pawnRestIncreaseTick != 0 && pawn.needs.rest != null)

I would post this suggestion in the comments, but I'm unable to.

Thanks for creating the mod, by the way, I really like the idea.