sumghai / MedPod

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

Diagnosis and healing times should be affected by pawn body size #43

Closed sumghai closed 3 years ago

sumghai commented 3 years ago

Describe your idea:

The maxDiagnosisTime and maxPerHediffHealingTime parameters from the MedPod.CompProperties_MedPodSettings Comp should be multiplied by the current pawn's body size and/or mass (relative to a baseline humanoid pawn).

Why do you think your idea would be a good fit for MedPod?: Larger pawns such as farm animals and megafauna should take longer to treat than humans, while small pets should be treated faster.

Implementing this contributes towards #11.

What alternatives/workarounds have you tried? Leaving the code as-is right now means a one-size-fits-all diagnosis and treatment time for all pawns irrespective of body size or mass, which detracts from player experience.

Declaration

I hereby verify that:

sumghai commented 3 years ago

For simplicity, we will assume that the energy beam from the MedPod's scanner is able to penetrate deep into body cavities and tissues, so pawn mass can be ignored.

Instead, the scaling will work solely on (relative) body size, as a large body size implies a larger (apparent) surface area that the scanner has to cover.

sumghai commented 3 years ago

Tested successfully with a baseline human (Body Size 1.0) and Ratkin (Body Size 0.68), both with a missing left leg - the Ratkin was treated much faster than the human.