mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Merge pull request #2955 from Anewbe/heart_damage
Big Ol' Medical Tweaks
This commit is contained in:
@@ -71,15 +71,11 @@
|
||||
|
||||
/mob/living/carbon/brain/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching) touching.metabolize()
|
||||
if(ingested) ingested.metabolize()
|
||||
if(bloodstr) bloodstr.metabolize()
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
|
||||
|
||||
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
|
||||
var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain
|
||||
// life should decrease this by 1 every tick
|
||||
|
||||
// total amount of wounds on mob, used to spread out healing and the like over all wounds
|
||||
var/number_wounds = 0
|
||||
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
|
||||
|
||||
@@ -1050,7 +1050,7 @@
|
||||
"<span class='warning'>A spike of pain jolts your [organ.name] as you bump [O] inside.</span>", \
|
||||
"<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>", \
|
||||
"<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>")
|
||||
src << msg
|
||||
custom_pain(msg, 40)
|
||||
|
||||
organ.take_damage(rand(1,3), 0, 0)
|
||||
if(!(organ.robotic >= ORGAN_ROBOT) && (should_have_organ(O_HEART))) //There is no blood in protheses.
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
if (!lying && !buckled && world.time - l_move_time < 15)
|
||||
//Moving around with fractured ribs won't do you any good
|
||||
if (prob(10) && !stat && can_feel_pain() && analgesic < 50 && E.is_broken() && E.internal_organs.len)
|
||||
if (prob(10) && !stat && can_feel_pain() && chem_effects[CE_PAINKILLER] < 50 && E.is_broken() && E.internal_organs.len)
|
||||
custom_pain("Pain jolts through your broken [E.encased ? E.encased : E.name], staggering you!", 50)
|
||||
drop_item(loc)
|
||||
Stun(2)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
var/rn = rand(0, 200)
|
||||
if(getBrainLoss() >= 5)
|
||||
if(0 <= rn && rn <= 3)
|
||||
custom_pain("Your head feels numb and painful.")
|
||||
custom_pain("Your head feels numb and painful.", 10)
|
||||
if(getBrainLoss() >= 15)
|
||||
if(4 <= rn && rn <= 6) if(eye_blurry <= 0)
|
||||
src << "<span class='warning'>It becomes hard to see for some reason.</span>"
|
||||
@@ -328,17 +328,20 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
|
||||
if(suiciding)
|
||||
failed_last_breath = 1
|
||||
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
suiciding --
|
||||
return 0
|
||||
|
||||
if(does_not_breathe)
|
||||
failed_last_breath = 0
|
||||
adjustOxyLoss(-5)
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles == 0) || suiciding)
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
failed_last_breath = 1
|
||||
if(suiciding)
|
||||
adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
return 0
|
||||
if(health > config.health_threshold_crit)
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
else
|
||||
@@ -350,8 +353,11 @@
|
||||
rupture_lung()
|
||||
|
||||
if(should_have_organ("brain"))
|
||||
var/brainOxPercent = 0.02 //Default2% of your current oxyloss is applied as brain damage, 50 oxyloss is 1 brain damage
|
||||
if(CE_STABLE in chem_effects)
|
||||
brainOxPercent = 0.01 //Halved in effect
|
||||
if(prob(5))
|
||||
adjustBrainLoss(0.02 * oxyloss) //2% of your current oxyloss is applied as brain damage, 50 oxyloss is 1 brain damage
|
||||
adjustBrainLoss(brainOxPercent * oxyloss)
|
||||
|
||||
oxygen_alert = max(oxygen_alert, 1)
|
||||
|
||||
@@ -794,7 +800,6 @@
|
||||
|
||||
if(reagents)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(!isSynthetic())
|
||||
|
||||
@@ -802,9 +807,6 @@
|
||||
if(ingested) ingested.metabolize()
|
||||
if(bloodstr) bloodstr.metabolize()
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
var/total_phoronloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
if(I.contaminated)
|
||||
@@ -1155,7 +1157,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(healths)
|
||||
if (analgesic > 100)
|
||||
if (chem_effects[CE_PAINKILLER] > 100)
|
||||
healths.icon_state = "health_numb"
|
||||
else
|
||||
// Generate a by-limb health display.
|
||||
@@ -1437,8 +1439,11 @@
|
||||
shock_stage = max(shock_stage-1, 0)
|
||||
return
|
||||
|
||||
if(stat)
|
||||
return 0
|
||||
|
||||
if(shock_stage == 10)
|
||||
src << "<span class='danger'>[pick("It hurts so much", "You really need some painkillers", "Dear god, the pain")]!</span>"
|
||||
custom_pain("[pick("It hurts so much", "You really need some painkillers", "Dear god, the pain")]!", 40)
|
||||
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30) emote("me",1,"is having trouble keeping their eyes open.")
|
||||
|
||||
@@ -67,15 +67,11 @@
|
||||
|
||||
/mob/living/carbon/slime/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching) touching.metabolize()
|
||||
if(ingested) ingested.metabolize()
|
||||
if(bloodstr) bloodstr.metabolize()
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
return //TODO: DEFERRED
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
var/painMes = pick("You can feel your body becoming weak!", "You feel like you're about to die!", "You feel every part of your body screaming in agony!", "A low, rolling pain passes through your body!", "Your body feels as if it's falling apart!", "You feel extremely weak!", "A sharp, deep pain bathes every inch of your body!")
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.custom_pain(painMes)
|
||||
H.custom_pain(painMes, 100)
|
||||
else if (istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
if (C.can_feel_pain())
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
1.2 * src.getShockBruteLoss() + \
|
||||
1.7 * src.getCloneLoss() + \
|
||||
2 * src.halloss + \
|
||||
-1 * src.analgesic
|
||||
-1 * src.chem_effects[CE_PAINKILLER]
|
||||
|
||||
if(src.slurring)
|
||||
src.traumatic_shock -= 20
|
||||
|
||||
@@ -716,11 +716,20 @@ default behaviour is:
|
||||
src << "<span class='warning'>You feel like you are about to throw up!</span>"
|
||||
sleep(100) //and you have 10 more for mad dash to the bucket
|
||||
|
||||
//Damaged livers cause you to vomit blood.
|
||||
if(!blood_vomit)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(!H.isSynthetic())
|
||||
var/obj/item/organ/internal/liver/L = H.internal_organs_by_name["liver"]
|
||||
if(L.is_broken())
|
||||
blood_vomit = 1
|
||||
|
||||
Stun(5)
|
||||
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs
|
||||
if(istype(T))
|
||||
if(blood_vomit)
|
||||
T.add_blood_floor(src)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
speak_emote = list("chitters")
|
||||
emote_hear = list("chitters")
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/spidermeat
|
||||
|
||||
var/busy = 0
|
||||
var/poison_per_bite = 5
|
||||
|
||||
@@ -903,7 +903,7 @@ mob/proc/yank_out_object()
|
||||
if(prob(selection.w_class * 5) && (affected.robotic < ORGAN_ROBOT)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||
var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15))
|
||||
affected.wounds += I
|
||||
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
|
||||
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 50)
|
||||
|
||||
if (ishuman(U))
|
||||
var/mob/living/carbon/human/human_user = U
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
user << "<span class='notice'>You must stand still to feel [E] for fractures.</span>"
|
||||
else if(E.status & ORGAN_BROKEN)
|
||||
user << "<span class='warning'>The [E.encased ? E.encased : "bone in the [E.name]"] moves slightly when you poke it!</span>"
|
||||
H.custom_pain("Your [E.name] hurts where it's poked.")
|
||||
H.custom_pain("Your [E.name] hurts where it's poked.", 40)
|
||||
else
|
||||
user << "<span class='notice'>The [E.encased ? E.encased : "bones in the [E.name]"] seem to be fine.</span>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user