-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exiting the MedPod under certain conditions does not remove the coma. #9
Comments
This sounds bizarre. The MedPod is designed so that if it runs out of power, is destroyed or otherwise despawned while treating a patient, the patient should immediately be given an (improper) cortical stimulation to wake them up. As for why the delta-wave induced coma is currently "permanent", this is because I needed a way to keep the patient lying in the MedPod for a whole treatment cycle, as usually with vanilla hospital beds it is possible that a patient partially recovers to the point of regaining the ability to walk, run off to deal with food/other needs, and (maybe) return later to fully recover. I am thinking of possibly tweaking the delta-wave coma to expire after a period of time, although if it expires while there are still hediffs remaining to be treated, the treatment will get interrupted when the pawn runs off. Since you mentioned that you're not "100% sure of how this happened, as part of this was off-screen", please go back and try to reproduce this situation in detail, so that I know to start investigating this issue. |
I removed a bionic part from a colonist, removed all other hospital beds so she was put in the medpod to recover. I then had a colonist turn the machine off, and carry her to a new hospital bed. She still had the coma after this. Gif of the mentioned steps here: https://imgur.com/a/Rj58cBw |
Bug confirmed - this looks like an extremely bizarre edge case. Detailed InvestigationSetup
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Scenario 5
Scenario 6
Basically, the current code correctly handles situations where the MedPod loses power or is destroyed, by waking the patient up and cancelling out the Delta Wave Induced Coma. When the Designate Toggle Power gizmo is set to Off, the task for switching off the MedPod is actually given to the patient lying on it. Usually, no other pawn approaches the MedPod until it has finished treating the patient, then the (ex) patient gets off and switches off the MedPod themselves. If, however, for some bizarre reason the player decides to forcefully tell another pawn to switch off a MedPod while in treatment mode, the patient loses their reservation on the MedPod, falls off and does not get their Delta Wave Induced Coma removed. Some ways to solve this problem:
|
Right, so I've found yet another edge case that triggers this bug:
This is a more plausible situation, because perhaps the player wants to perform triage by prioritizing a critically-wounded patient over someone with a hangnail who just happened to get on the MedPod first. To handle this particular edge case, I will need to detect when the current patient is kicked off the MedPod, and apply the improper Cortical Stimulation hediff instead to wake them up. |
@CodePanter - Please try the following development build, and see if it fixes both edge cases: https://github.com/sumghai/MedPod/archive/d1460a96aa99c86c87fa1f0a48c1f9d4d009afa9.zip |
I tried all situations I could come up with, including some you didn't mention like using a medpod on a prisoner, and then toggling the 'for prisoner' setting, and everything seems to work perfectly fine. Thank you for fixing this! |
Good catch on the prisoner toggle use cases as well, thanks! Marking this one as done. |
I can't be 100% sure of how this happened, as part of this was off-screen, but one of my colonists had just had surgery, was still 'woozy' from anesthetics, and got in the MedPod.
I'm not sure whether she took damage from something, the power went off for a second, or something different entirely happened, but the colonist was ejected from the MedPod, and was still in the coma from the MedPod.
She initially was carried over to a normal medical bed where I waited for quite a while, but nothing happened (not even after the wooziness was gone). I then un-assigned that bed as a hospital bed, and she was carried back to the MedPod, where her treatment was then finished, which resulted in the coma being removed.
I can imagine this being a big problem if a player for some reason loses their MedPod (due to reasonable game mechanics, or the other issue I filed) and then be stuck with a seemingly permanently comatose colonist.
The text was updated successfully, but these errors were encountered: