sumghai / MedPod

Advanced regenerative medical beds for RimWorld
Other
14 stars 15 forks source link

Hard cap on XML-configurable diagnosis/healing time parameters #36

Closed sumghai closed 3 years ago

sumghai commented 3 years ago

As observed in #35, a user triggered an edge case by setting maxPerHediffHealingTime to 300 seconds, ostensibly for "balance reasons". This is equivalent to ~7 RimWorld hours, which is way beyond the typical healing time for the Elysium movie MedPods, even if we account for time potentially being sped up as part of the magic of movie montages.

A hard cap of 30 seconds should be set (despite the user's vocal displeasure), so that tweakers (like himself) don't come up with obscene values like above.

sumghai commented 3 years ago

The XML params for diagnosis and healing time are now automatically capped at 30 seconds, with a friendly red-text error message that pops up in the Debug log if this limit is exceeded.