Files
VOREStation/code/modules/mob/living/carbon/shock.dm
T
Cameron Lennox fb81ffbe83 Amputation Repair, Surgery adjustments, and amputation vision. (#19199)
* Fixes necrosis steps setting bone

Makes it so you the 'cut away' step doesn't set bones to open. This is entirely a non-internal fix (you're working on the flesh, not the organs inside) so you don't need the bone retracted.

* Update other.dm

* Crowbar Augment

* descriptors

* Update carbon.dm

* no typecasting

* removes unused proc

* Limb status

* Makes butchering take time

Gives a warning as well when starting it.

* Update organ.dm

* Update organ.dm

* Closing surgical stages and desc.

Opened organs have descriptions that they're opened.

Organs inform you that they have SPECIAL MECHANICS THAT'VE BEEN IN FOR 10 YEARS that you can do to them.

Allows fixing amputated organs

A BUNCH of stuff

* Update organ.dm

* Keep the washing

* Update external_repair.dm

* Update other.dm

* Organizes surgeries

* fix a typo

* Update surgery.dm

* More surgery

* Nerve Surgery

Adds template for nerve surgery

* Prevents pain from limbs that feel no pain

* Update external_repair.dm
2026-02-27 19:16:27 +01:00

47 lines
1.3 KiB
Plaintext

/mob/living/var/traumatic_shock = 0
/mob/living/carbon/var/shock_stage = 0
// proc to find out in how much pain the mob is at the moment
/mob/living/carbon/proc/updateshock()
if (!can_feel_pain() && !synth_cosmetic_pain)
src.traumatic_shock = 0
return 0
src.traumatic_shock = \
1 * src.getOxyLoss() + \
0.7 * src.getToxLoss() + \
1.2 * src.getShockFireLoss() + \
1.2 * src.getShockBruteLoss() + \
1.7 * src.getCloneLoss() + \
2 * src.halloss
if(src.slurring)
src.traumatic_shock -= 20
// broken or ripped off organs will add quite a bit of pain
if(ishuman(src))
var/mob/living/carbon/human/M = src
for(var/obj/item/organ/external/organ in M.organs)
if(!organ.organ_can_feel_pain())
continue
if(organ.is_broken() || organ.open)
src.traumatic_shock += 30
else if(organ.is_dislocated())
src.traumatic_shock += 15
// Some individuals/species are more or less supectible to pain. Default trauma_mod = 1. Does not affect painkillers
if(ishuman(src))
var/mob/living/carbon/human/H = src
H.traumatic_shock *= H.species.trauma_mod
src.traumatic_shock += -1 * src.chem_effects[CE_PAINKILLER]
if(src.traumatic_shock < 0)
src.traumatic_shock = 0
return src.traumatic_shock
/mob/living/carbon/proc/handle_shock()
updateshock()