mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #7870 from Fox-McCloud/tweaks/fixes/organ/stuff
Various little fixes/refactors
This commit is contained in:
@@ -940,57 +940,6 @@
|
||||
if(hud_used)
|
||||
hud_used.lingchemdisplay.invisibility = 101
|
||||
|
||||
/mob/living/carbon/human/handle_shock()
|
||||
..()
|
||||
if(status_flags & GODMODE)
|
||||
return 0 //godmode
|
||||
if(NO_PAIN in species.species_traits)
|
||||
return
|
||||
|
||||
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
if(traumatic_shock >= 100)
|
||||
shock_stage += 1
|
||||
else
|
||||
shock_stage = min(shock_stage, 160)
|
||||
shock_stage = max(shock_stage-1, 0)
|
||||
return
|
||||
|
||||
if(shock_stage == 10)
|
||||
to_chat(src, "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!"))
|
||||
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30) custom_emote(1,"is having trouble keeping their eyes open.")
|
||||
EyeBlurry(2)
|
||||
Stuttering(5)
|
||||
|
||||
if(shock_stage == 40)
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
|
||||
if(shock_stage >=60)
|
||||
if(shock_stage == 60) custom_emote(1,"falls limp.")
|
||||
if(prob(2))
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 80)
|
||||
if(prob(5))
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 120)
|
||||
if(prob(2))
|
||||
to_chat(src, "<font color='red'><b>"+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness."))
|
||||
Paralyse(5)
|
||||
|
||||
if(shock_stage == 150)
|
||||
custom_emote(1,"can no longer stand, collapsing!")
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 150)
|
||||
Weaken(20)
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/handle_pulse()
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/mob/living/carbon/human/var/traumatic_shock = 0
|
||||
/mob/living/carbon/human/var/shock_stage = 0
|
||||
|
||||
// proc to find out in how much pain the mob is at the moment
|
||||
/mob/living/carbon/human/proc/updateshock()
|
||||
traumatic_shock = getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()
|
||||
|
||||
// broken or ripped off organs will add quite a bit of pain
|
||||
for(var/thing in bodyparts)
|
||||
var/obj/item/organ/external/BP = thing
|
||||
if(BP.status & ORGAN_BROKEN && !(BP.status & ORGAN_SPLINTED) || BP.open)
|
||||
traumatic_shock += 15
|
||||
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.shock_reduction)
|
||||
traumatic_shock = max(0, traumatic_shock - R.shock_reduction) // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball
|
||||
if(drunk)
|
||||
traumatic_shock = max(0, traumatic_shock - 10)
|
||||
|
||||
return traumatic_shock
|
||||
|
||||
/mob/living/carbon/human/proc/handle_shock()
|
||||
if(status_flags & GODMODE) //godmode
|
||||
return
|
||||
if(NO_PAIN in species.species_traits)
|
||||
return
|
||||
|
||||
updateshock()
|
||||
|
||||
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
if(traumatic_shock >= 100)
|
||||
shock_stage += 1
|
||||
else
|
||||
shock_stage = min(shock_stage, 160)
|
||||
shock_stage = max(shock_stage-1, 0)
|
||||
return
|
||||
|
||||
if(shock_stage == 10)
|
||||
to_chat(src, "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!"))
|
||||
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30)
|
||||
custom_emote(1,"is having trouble keeping their eyes open.")
|
||||
EyeBlurry(2)
|
||||
Stuttering(5)
|
||||
|
||||
if(shock_stage == 40)
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
|
||||
if(shock_stage >=60)
|
||||
if(shock_stage == 60)
|
||||
custom_emote(1,"falls limp.")
|
||||
if(prob(2))
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 80)
|
||||
if(prob(5))
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 120)
|
||||
if(prob(2))
|
||||
to_chat(src, "<font color='red'><b>"+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness."))
|
||||
Paralyse(5)
|
||||
|
||||
if(shock_stage == 150)
|
||||
custom_emote(1,"can no longer stand, collapsing!")
|
||||
Weaken(20)
|
||||
|
||||
if(shock_stage >= 150)
|
||||
Weaken(20)
|
||||
@@ -866,7 +866,6 @@
|
||||
var/turf/T = H.loc
|
||||
light_amount = min(T.get_lumcount() * 10, 5) //hardcapped so it's not abused by having a ton of flashlights
|
||||
H.nutrition = min(H.nutrition+light_amount, NUTRITION_LEVEL_WELL_FED+10)
|
||||
H.traumatic_shock -= light_amount
|
||||
|
||||
if(light_amount > 0)
|
||||
H.clear_alert("nolight")
|
||||
@@ -879,7 +878,6 @@
|
||||
H.adjustFireLoss(-(light_amount/4))
|
||||
if(H.nutrition < NUTRITION_LEVEL_STARVING+50)
|
||||
H.take_overall_damage(10,0)
|
||||
H.traumatic_shock++
|
||||
|
||||
/datum/species/machine
|
||||
name = "Machine"
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/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()
|
||||
src.traumatic_shock = \
|
||||
1 * src.getOxyLoss() + \
|
||||
1 * src.getToxLoss() + \
|
||||
1 * src.getFireLoss() + \
|
||||
1 * src.getBruteLoss() + \
|
||||
1 * src.getCloneLoss()
|
||||
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.shock_reduction)
|
||||
src.traumatic_shock -= R.shock_reduction // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball
|
||||
if(src.slurring)
|
||||
src.traumatic_shock -= 10
|
||||
|
||||
// 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.bodyparts)
|
||||
if(!organ)
|
||||
continue
|
||||
else if(organ.status & ORGAN_BROKEN || organ.open)
|
||||
src.traumatic_shock += 15
|
||||
if(organ.status & ORGAN_SPLINTED)
|
||||
src.traumatic_shock -= 15
|
||||
|
||||
if(src.traumatic_shock < 0)
|
||||
src.traumatic_shock = 0
|
||||
|
||||
return src.traumatic_shock
|
||||
|
||||
|
||||
/mob/living/carbon/proc/handle_shock()
|
||||
updateshock()
|
||||
Reference in New Issue
Block a user