Jump to content

Heart Stopping rework


Nanako

Recommended Posts

Currently, the only thing that works to stop someone's heart (potassium chloride overdose) just causes their pulse to read as zero, and this has no actual mechanical effect. There is no proper mechanical implementation for heart stopping


In addition, the heart is considered an essential organ in code, and by that it means that if it is removed, the patient immediately and irrevocably dies. This makes heart transplants impossible, and is kinda unrealistic.


And people with artificial hearts are screwed over a bit too badly by EMPs. I don't mind it being a death sentance without medical aid, but right now it kills too fast to ever realistically treat them


http://gizmodo.com/how-long-does-your-heart-have-to-stop-for-before-you-ca-1457981280


I have a solution for a better implementation, that more appropriately obeys medical facts:


1. Implement a heartStopped boolean which tells whether or not the patient's heart is pumping, and a heartstopCounter float value, which increments each proc, or each second, whenever the patient's heart is either stopped, or is missing. It should incremement by an amount each second, equal to 1 / (bodyTemp / 310)

The idea here, is that it increments by 1 point per second at normal body temperature, but slower when the patient is cold. Because people can survive for longer without heart rhythym when they're cold


2. When heartstopCounter reaches 20, the patient collapses and is perma-weakened. This gives a few precious seconds after your heart stops, to flee towards medical before you're incapacitated


3. Much like with blood loss, have the patient's suffocation damage increment towards a maximum value, which is equal to heartstopCounter*0.33 (100 suffocation at 300, 200 (and thus death) at 600)


4. When heartstopCounter reaches 300, the patient starts suffering brain damage too. Exactly how much to be determined, but it should reach 100 brain damage by the time heartstopCounter reaches 600


5. Remove the flag that makes instant death happen if the heart is removed.


6. When people with mechanical hearts get EMPed, stop their heart, and deal some damage, but less than it does now.


7. If a still-beating heart is removed from the body, the patient should suffer massive immediate blood loss, and ongoing internal bleeding. So that the heart-stopping medicines will have a functional surgical purpose. Stop the heart before removing it


8. Administering CPR would always be possible on a patient whose heart is stopped. CPR would reduce the heartstopCounter, have a chance of restarting the patient's heart once it's below 20. Damage to the heart would massively reduce the chance of success at this.


The net result of this is that:

1. A patient starts suffering brain damage after 5 minutes of no bloodflow, at normal body temperature

2. A patient is guaranteed to be dead after 10 minutes of no bloodflow, at normal body temperature

3. Being cold slows down this effect, allowing the patient to survive longer.

4. By making a lack of a heart no longer be instant death, heart transplants become a mechanical possibility. A patient can survive heartless on a surgery table for a few minutes, while you transplant in a replacement

5, People with mechanical hearts have at least some hope of recieving medical treatment and being saved. If they're rescued in time and tossed into the cryotubes, they can be preserved while science makes the necessary nanopaste to perform surgery, or while you find a donor organic heart to transplant in. Dylan might not die every time raiders turn up.

6. With transplants being possible, we could give robotics the ability to make new artificial hearts for transplant.

7. It'd be a good framework to add defibrillators back into later.

8. More realism, more depth, more complexity, more fun!

Link to comment

A few points of note. Once you reach 100 damage total, you start sustaining OXYLOSS automatically. This is to simulate your organism failing to handle the strain, and effectively dying.


Second, all organs fail pretty damned violently right now. It'd be a little odd if the heart took 5 to 20 minutes, while the rest still pretty much ded you immediately.


As far as heart surgery and organ replacement surgery was concerned, we used to have this thing: https://github.com/Aurorastation/Aurora/pull/75

It pretty much enabled you to stop all organ processing for the mob, and go rooting around with their insides (to even enable brain swaps without one of the patients dying).

Link to comment
A few points of note. Once you reach 100 damage total, you start sustaining OXYLOSS automatically. This is to simulate your organism failing to handle the strain, and effectively dying.

I'm aware of this, but inaprovaline stops it.


IT's also kind of slow, it takes exactly 5 minutes to go from 0% health to death by crit oxyloss alone.


And, oddly, the crit oxyloss actually replaces all other sources of oxyloss, by supplanting the losebreath result with a value thats 66% weaker. Even with a punctured lung it still takes the same amount of time to suffocate, which kind of seems like a design flaw. but maybe not

 

Second, all organs fail pretty damned violently right now. It'd be a little odd if the heart took 5 to 20 minutes, while the rest still pretty much ded you immediately.

A punctured lung will kill you in 8.5 minutes in total (not counting any damage you may have taken to get the rupture)


My formula would generally work out about the same, once you factor in things like crit oxyloss (and does brain damage contribute to death?) I intended for 10 minutes to only be the point of inevitable death, i'm fine with it ocurring sooner by a combination of factors. But for someone who's just been hit by an EMP, stopped their heart and fled, getting to live ~10 minutes seems reasonable and gives medical a chance.


Liver failure might be faster, since it takes other organs with it, i'd have to test.

 

As far as heart surgery and organ replacement surgery was concerned, we used to have this thing: https://github.com/Aurorastation/Aurora/pull/75

i think that link is a map? didnt seem to be lifesupport table code


I remember you talking about the life support table the other day. I like the idea of having more freedom in those regards, but it seemed like a kind of too-easy solution (from a user's viewpoint), and i'm not keen on removing the urgency from surgery. I'd rather see fixed, the detailed problems that prevent us from doing these things in the first place.


Like the brain transplant example you brought up, a body shouldn't immediately die without a brain, just die quickly until a new one is put in. i don't think we should need a special machine to work around instadeath code oddities.


I do like the idea of life support machines in general though, but not one that's so all-encompassing. For example i'd love to see a heart bypass machine that would pump blood normally while you're hooked up, regardless of the status or existence of your heart. but i'd still want that limited to heart function only, personally.

Link to comment
×
×
  • Create New...