sumghai / MedPod

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

Pawns With Blacklisted Hediff Still Being Taken To MedPods #95

Closed GeodesicDragon closed 2 months ago

GeodesicDragon commented 2 months ago

Describe the bug:
I have created a compatibility patch for the Addictol mod that prevents MedPods from healing the addictol detoxification hediff, because pawns get stuck in it. When this hediff is active, the pawn becomes incapacitated; instead of taking them to their regular bed, my doctors are still taking them to MedPods, resulting in the pawn getting stuck. I then have to abort treatment and set the pawn to be treated with herbal medicine in order for them to be taken to their own bed.

Expected behavior:
I expected the pawn with the detox hediff to be taken to their own bed, as the patch I created is supposed to prevent MedPods from treating it.

Steps to reproduce:

  1. Install the two mods I mentioned.
  2. Acquire addictol and use it on a pawn.
  3. The pawn will be taken to a MedPod instead of their own bed.

Additional information:

System and Game Configuration

Operating System: Windows 10 64-bit Physical RAM: 128GB RimWorld base game version: 1.5.4104 RimWorld DLCs loaded: Royalty, Ideology, Biotech and Anomaly MedPod mod version: 1.5.30 MedPod mod downloaded from: Steam Your mod list: See attached. With the exception of mods I created, all of them came from Steam, so where a version number is not included you can assume it was the latest version at the time I posted this. Active Mods.txt

Declaration

I hereby verify that:

sumghai commented 2 months ago

I've reproduced the reported behavior on my end, but what you have here is a pretty tricky situation.

Pawns downed for any reason (including anesthesia from the base game) will always be marked as requiring MedPod treatment. Since Addictol by design makes pawns unconscious, pawns will get hauled to MedPods, be diagnosed as not needing any treatment because of your patch, and remain stuck there because Addictol keeps pawns downed.

Since you want pawns with Addictol to not use MedPods, you'll need to change your patch to flag the Addictol hediff as blocking the use of MedPods entirely - at least, until the hediff clears up on its own:

https://github.com/sumghai/MedPod/wiki/For-modders:-Making-your-mod-compatible-with-MedPod#blocking-pawns-with-certain-hediffs-from-using-medpods

GeodesicDragon commented 2 months ago

Thanks, I've done that and it has solved the problem.