mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-25 08:42:52 +00:00
Conflicts: code/datums/recipe.dm code/game/machinery/bots/farmbot.dm code/game/machinery/bots/medbot.dm code/game/mecha/equipment/tools/tools.dm code/game/objects/effects/chem/chemsmoke.dm code/game/objects/effects/effect_system.dm code/game/objects/items/toys.dm code/game/objects/items/weapons/extinguisher.dm code/game/objects/items/weapons/mop.dm code/modules/mob/living/carbon/human/human.dm code/modules/organs/organ_internal.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Recipes.dm code/modules/reagents/reagent_containers/food/snacks.dm code/modules/reagents/reagent_containers/pill.dm code/modules/reagents/reagent_containers/spray.dm maps/exodus-1.dmm
37 lines
945 B
Plaintext
37 lines
945 B
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 (species && (species.flags & NO_PAIN))
|
|
src.traumatic_shock = 0
|
|
return 0
|
|
|
|
src.traumatic_shock = \
|
|
1 * src.getOxyLoss() + \
|
|
0.7 * src.getToxLoss() + \
|
|
1.5 * src.getFireLoss() + \
|
|
1.2 * src.getBruteLoss() + \
|
|
1.7 * src.getCloneLoss() + \
|
|
2 * src.halloss + \
|
|
-1 * src.analgesic
|
|
|
|
if(src.slurring)
|
|
src.traumatic_shock -= 20
|
|
|
|
// broken or ripped off organs will add quite a bit of pain
|
|
if(istype(src,/mob/living/carbon/human))
|
|
var/mob/living/carbon/human/M = src
|
|
for(var/obj/item/organ/external/organ in M.organs)
|
|
if(organ && (organ.is_broken() || organ.open))
|
|
src.traumatic_shock += 30
|
|
|
|
if(src.traumatic_shock < 0)
|
|
src.traumatic_shock = 0
|
|
|
|
return src.traumatic_shock
|
|
|
|
|
|
/mob/living/carbon/proc/handle_shock()
|
|
updateshock()
|