mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Crit Rework Final Submission
This commit is contained in:
@@ -267,7 +267,7 @@
|
||||
H.Weaken(4)
|
||||
if(H.staminaloss && !H.sleeping)
|
||||
var/total_health = (H.health - H.staminaloss)
|
||||
if(total_health <= config.health_threshold_crit && !H.stat)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
|
||||
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \
|
||||
"<span class='userdanger'>[user] knocks you unconscious!</span>")
|
||||
H.SetSleeping(30)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//NOTE: Breathing happens once per FOUR TICKS, unless the last breath fails. In which case it happens once per ONE TICK! So oxyloss healing is done once per 4 ticks while oxyloss damage is applied once per tick!
|
||||
#define HUMAN_MAX_OXYLOSS 3 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
#define HUMAN_CRIT_MAX_OXYLOSS ( (tickerProcess.getLastTickerTimeDuration()) / 3) //The amount of damage you'll get when in critical condition. We want this to be a 5 minute deal = 300s. There are 100HP to get through, so (1/3)*last_tick_duration per second. Breaths however only happen every 4 ticks.
|
||||
//NOTE: Breathing happens once EVERY OTHER TICK.
|
||||
#define HUMAN_MAX_OXYLOSS 5 //Defines how much oxyloss humans can get per tick. A tile with no air at all (such as space) applies this value, otherwise it's a percentage of it.
|
||||
|
||||
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
|
||||
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
SetSilence(0)
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
if(health < HEALTH_THRESHOLD_DEAD && check_death_method() || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
death()
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if((getOxyLoss() > 50) || (config.health_threshold_crit >= health))
|
||||
if((getOxyLoss() > 50) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method()))
|
||||
if(health <= 20 && prob(1))
|
||||
emote("gasp")
|
||||
if(!reagents.has_reagent("epinephrine"))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
if(stat == DEAD)
|
||||
//If we mostly took damage from fire
|
||||
if(fireloss > 125)
|
||||
if(getFireLoss() > 125)
|
||||
icon_state = "alien[caste]_husked"
|
||||
pixel_y = 0
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
if((getOxyLoss() > 25) || (HEALTH_THRESHOLD_CRIT >= health && check_death_method()))
|
||||
//if( health <= 20 && prob(1) )
|
||||
// spawn(0)
|
||||
// emote("gasp")
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
. = ..()
|
||||
|
||||
if(.)
|
||||
if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)))
|
||||
if(!container && (health < HEALTH_THRESHOLD_DEAD && check_death_method() || ((world.time - timeofhostdeath) > config.revival_brain_life)))
|
||||
death()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
return
|
||||
// if(health <= min_health)
|
||||
if(stat == DEAD)
|
||||
if(container && health > config.health_threshold_dead)
|
||||
if(container && health > HEALTH_THRESHOLD_DEAD)
|
||||
update_revive()
|
||||
create_debug_log("revived, trigger reason: [reason]")
|
||||
return
|
||||
else
|
||||
if(!container || health <= config.health_threshold_dead)
|
||||
if(!container || health <= HEALTH_THRESHOLD_DEAD && check_death_method())
|
||||
// Considered "dead" without any external apparatus
|
||||
death()
|
||||
create_debug_log("died, trigger reason: [reason]")
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
add_attack_logs(M, src, "Shaked", ATKLOG_ALL)
|
||||
if(health >= config.health_threshold_crit)
|
||||
if(health >= HEALTH_THRESHOLD_CRIT)
|
||||
if(src == M && ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
visible_message( \
|
||||
|
||||
@@ -22,9 +22,8 @@
|
||||
|
||||
var/wetlevel = 0 //how wet the mob is
|
||||
|
||||
var/failed_last_breath = FALSE //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
var/co2overloadtime = null
|
||||
var/dreaming = 0 //How many dream images we have left to send
|
||||
var/nightmare = 0
|
||||
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
@@ -680,6 +680,14 @@
|
||||
message = "<B>[src]</B> trembles."
|
||||
m_type = 1
|
||||
|
||||
if("shudder", "shudders")
|
||||
message = "<B>[src]</B> shudders."
|
||||
m_type = 1
|
||||
|
||||
if("bshake", "bshakes")
|
||||
message = "<B>[src]</B> shakes."
|
||||
m_type = 1
|
||||
|
||||
if("sneeze", "sneezes")
|
||||
if(miming)
|
||||
message = "<B>[src]</B> sneezes."
|
||||
|
||||
@@ -1651,6 +1651,9 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H)
|
||||
if(H == src)
|
||||
to_chat(src, "<span class='warning'>You cannot perform CPR on yourself!</span>")
|
||||
return
|
||||
if(H.stat == DEAD || (H.status_flags & FAKEDEATH))
|
||||
to_chat(src, "<span class='warning'>[H.name] is dead!</span>")
|
||||
return
|
||||
@@ -1662,25 +1665,29 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
return
|
||||
if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
|
||||
to_chat(src, "<span class='warning'>Remove your mask first!</span>")
|
||||
return 0
|
||||
return
|
||||
if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted))
|
||||
to_chat(src, "<span class='warning'>Remove [H.p_their()] mask first!</span>")
|
||||
return 0
|
||||
visible_message("<span class='danger'>[src] is trying to perform CPR on [H.name]!</span>", \
|
||||
"<span class='danger'>You try to perform CPR on [H.name]!</span>")
|
||||
return
|
||||
if(H.receiving_cpr) // To prevent spam stacking
|
||||
to_chat(src, "<span class='warning'>They are already receiving CPR!</span>")
|
||||
return
|
||||
visible_message("<span class='danger'>[src] is trying to perform CPR on [H.name]!</span>", "<span class='danger'>You try to perform CPR on [H.name]!</span>")
|
||||
H.receiving_cpr = TRUE
|
||||
if(do_mob(src, H, 40))
|
||||
if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit)
|
||||
var/suff = min(H.getOxyLoss(), 7)
|
||||
H.adjustOxyLoss(-suff)
|
||||
if(H.health <= HEALTH_THRESHOLD_CRIT)
|
||||
H.adjustOxyLoss(-15)
|
||||
H.SetLoseBreath(0)
|
||||
H.AdjustParalysis(-1)
|
||||
H.updatehealth("cpr")
|
||||
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", \
|
||||
"<span class='notice'>You perform CPR on [H.name].</span>")
|
||||
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", "<span class='notice'>You perform CPR on [H.name].</span>")
|
||||
|
||||
to_chat(H, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
|
||||
to_chat(src, "<span class='alert'>Repeat at least every 7 seconds.")
|
||||
H.receiving_cpr = FALSE
|
||||
add_attack_logs(src, H, "CPRed", ATKLOG_ALL)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
H.receiving_cpr = FALSE
|
||||
to_chat(src, "<span class='danger'>You need to stay still while performing CPR!</span>")
|
||||
|
||||
/mob/living/carbon/human/canBeHandcuffed()
|
||||
@@ -1696,7 +1703,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
return (health <= HEALTH_THRESHOLD_CRIT && stat == UNCONSCIOUS)
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
@@ -2000,4 +2007,4 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
var/obj/item/organ/internal/lantern/O = get_int_organ(/obj/item/organ/internal/lantern)
|
||||
if(O && O.glowing)
|
||||
O.toggle_biolum(TRUE)
|
||||
visible_message("<span class='danger'>[src] is engulfed in shadows and fades into the darkness.</span>", "<span class='danger'>A sense of dread washes over you as you suddenly dim dark.</span>")
|
||||
visible_message("<span class='danger'>[src] is engulfed in shadows and fades into the darkness.</span>", "<span class='danger'>A sense of dread washes over you as you suddenly dim dark.</span>")
|
||||
@@ -15,7 +15,7 @@
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
|
||||
//TODO: fix husking
|
||||
if(((maxHealth - total_burn) < config.health_threshold_dead) && stat == DEAD)
|
||||
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD)
|
||||
ChangeToHusk()
|
||||
update_stat("updatehealth([reason])")
|
||||
med_hud_set_health()
|
||||
@@ -171,11 +171,15 @@
|
||||
|
||||
// Defined here solely to take species flags into account without having to recast at mob/living level.
|
||||
/mob/living/carbon/human/adjustOxyLoss(amount)
|
||||
if(NO_BREATHE in dna.species.species_traits)
|
||||
return FALSE
|
||||
if(dna.species && amount > 0)
|
||||
amount = amount * dna.species.oxy_mod
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/setOxyLoss(amount)
|
||||
if(NO_BREATHE in dna.species.species_traits)
|
||||
return FALSE
|
||||
if(dna.species && amount > 0)
|
||||
amount = amount * dna.species.oxy_mod
|
||||
. = ..()
|
||||
|
||||
@@ -64,6 +64,7 @@ var/global/default_martial_art = new/datum/martial_art
|
||||
var/check_mutations=0 // Check mutations on next life tick
|
||||
|
||||
var/heartbeat = 0
|
||||
var/receiving_cpr = FALSE
|
||||
|
||||
var/fire_dmi = 'icons/mob/OnFire.dmi'
|
||||
var/fire_sprite = "Standing"
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
update_mutations()
|
||||
check_mutations=0
|
||||
|
||||
handle_shock()
|
||||
handle_pain()
|
||||
handle_heartbeat()
|
||||
handle_heartattack()
|
||||
handle_drunk()
|
||||
dna.species.handle_life(src)
|
||||
|
||||
@@ -141,15 +139,6 @@
|
||||
if(3)
|
||||
emote("drool")
|
||||
|
||||
if(getBrainLoss() >= 100 && stat != DEAD) //you lapse into a coma and die without immediate aid; RIP. -Fox
|
||||
Weaken(20)
|
||||
AdjustLoseBreath(10)
|
||||
AdjustSilence(2)
|
||||
|
||||
if(getBrainLoss() >= 120 && stat != DEAD) //they died from stupidity--literally. -Fox
|
||||
visible_message("<span class='alert'><B>[src]</B> goes limp, [p_their()] facial expression utterly blank.</span>")
|
||||
death()
|
||||
|
||||
/mob/living/carbon/human/handle_mutations_and_radiation()
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
if(!gene.block)
|
||||
@@ -242,12 +231,10 @@
|
||||
var/obj/item/organ/internal/L = get_organ_slot("lungs")
|
||||
|
||||
if(!L || L && (L.status & ORGAN_DEAD))
|
||||
if(health >= config.health_threshold_crit)
|
||||
if(health >= HEALTH_THRESHOLD_CRIT)
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS + 1)
|
||||
else if(!(NOCRITDAMAGE in dna.species.species_traits))
|
||||
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
|
||||
failed_last_breath = TRUE
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
|
||||
if(dna.species)
|
||||
var/datum/species/S = dna.species
|
||||
@@ -270,7 +257,7 @@
|
||||
// USED IN DEATHWHISPERS
|
||||
/mob/living/carbon/human/proc/isInCrit()
|
||||
// Health is in deep shit and we're not already dead
|
||||
return health <= 0 && stat != 2
|
||||
return health <= HEALTH_THRESHOLD_CRIT && stat != DEAD
|
||||
|
||||
|
||||
/mob/living/carbon/human/get_breath_from_internal(volume_needed) //making this call the parent would be far too complicated
|
||||
@@ -791,6 +778,70 @@
|
||||
|
||||
handle_organs()
|
||||
|
||||
if(getBrainLoss() >= 120 || (health + (getOxyLoss() / 2)) <= -500)
|
||||
visible_message("<span class='alert'><B>[src]</B> goes limp, their facial expression utterly blank.</span>")
|
||||
death()
|
||||
return
|
||||
|
||||
if(getBrainLoss() >= 100) // braindeath
|
||||
AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25)
|
||||
Weaken(30)
|
||||
|
||||
if(!check_death_method())
|
||||
if(health <= HEALTH_THRESHOLD_DEAD)
|
||||
var/deathchance = min(99, ((getBrainLoss() * -5) + (health + (getOxyLoss() / 2))) * -0.01)
|
||||
if(prob(deathchance))
|
||||
death()
|
||||
return
|
||||
|
||||
if(health <= HEALTH_THRESHOLD_CRIT)
|
||||
if(prob(5))
|
||||
emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver"))
|
||||
AdjustStuttering(5, bound_lower = 0, bound_upper = 5)
|
||||
EyeBlurry(5)
|
||||
if(prob(7))
|
||||
AdjustConfused(2)
|
||||
if(prob(5))
|
||||
Paralyse(2)
|
||||
switch(health)
|
||||
if(-INFINITY to -100)
|
||||
adjustOxyLoss(1)
|
||||
if(prob(health * -0.1))
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.set_heartattack(TRUE)
|
||||
if(prob(health * -0.2))
|
||||
var/datum/disease/D = new /datum/disease/critical/heart_failure
|
||||
ForceContractDisease(D)
|
||||
Paralyse(5)
|
||||
if(-99 to -80)
|
||||
adjustOxyLoss(1)
|
||||
if(prob(4))
|
||||
to_chat(src, "<span class='userdanger'>Your chest hurts...</span>")
|
||||
Paralyse(2)
|
||||
var/datum/disease/D = new /datum/disease/critical/heart_failure
|
||||
ForceContractDisease(D)
|
||||
if(-79 to -50)
|
||||
adjustOxyLoss(1)
|
||||
if(prob(10))
|
||||
var/datum/disease/D = new /datum/disease/critical/shock
|
||||
ForceContractDisease(D)
|
||||
if(prob(health * -0.08))
|
||||
var/datum/disease/D = new /datum/disease/critical/heart_failure
|
||||
ForceContractDisease(D)
|
||||
if(prob(6))
|
||||
to_chat(src, "<span class='userdanger'>You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!</span>")
|
||||
Weaken(3)
|
||||
if(prob(3))
|
||||
Paralyse(2)
|
||||
if(-49 to 0)
|
||||
adjustOxyLoss(1)
|
||||
if(prob(3))
|
||||
var/datum/disease/D = new /datum/disease/critical/shock
|
||||
ForceContractDisease(D)
|
||||
if(prob(5))
|
||||
to_chat(src, "<span class='userdanger'>You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!</span>")
|
||||
Weaken(3)
|
||||
|
||||
else //dead
|
||||
SetSilence(0)
|
||||
@@ -962,7 +1013,7 @@
|
||||
return
|
||||
|
||||
if(H.is_robotic()) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people.
|
||||
if(shock_stage >= 10 || istype(get_turf(src), /turf/space))
|
||||
if(isinspace())
|
||||
//PULSE_THREADY - maximum value for pulse, currently it 5.
|
||||
//High pulse value corresponds to a fast rate of heartbeat.
|
||||
//Divided by 2, otherwise it is too slow.
|
||||
@@ -980,7 +1031,7 @@
|
||||
if(pulse == PULSE_NONE)
|
||||
return
|
||||
|
||||
if(pulse >= PULSE_2FAST || shock_stage >= 10 || istype(get_turf(src), /turf/space))
|
||||
if(pulse >= PULSE_2FAST || isinspace())
|
||||
//PULSE_THREADY - maximum value for pulse, currently it 5.
|
||||
//High pulse value corresponds to a fast rate of heartbeat.
|
||||
//Divided by 2, otherwise it is too slow.
|
||||
@@ -999,7 +1050,7 @@
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/can_heartattack()
|
||||
if(NO_BLOOD in dna.species.species_traits)
|
||||
if((NO_BLOOD in dna.species.species_traits) && !dna.species.forced_heartattack)
|
||||
return FALSE
|
||||
if(NO_INTORGANS in dna.species.species_traits)
|
||||
return FALSE
|
||||
@@ -1026,16 +1077,19 @@
|
||||
|
||||
heart.beating = !status
|
||||
|
||||
/mob/living/carbon/human/proc/handle_heartattack()
|
||||
/mob/living/carbon/human/handle_heartattack()
|
||||
if(!can_heartattack() || !undergoing_cardiac_arrest() || reagents.has_reagent("corazone"))
|
||||
return
|
||||
AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
|
||||
adjustOxyLoss(5)
|
||||
Paralyse(4)
|
||||
adjustBruteLoss(2)
|
||||
if(getOxyLoss())
|
||||
adjustBrainLoss(3)
|
||||
else if(prob(10))
|
||||
adjustBrainLoss(1)
|
||||
Weaken(5)
|
||||
AdjustLoseBreath(20, bound_lower = 0, bound_upper = 25)
|
||||
adjustOxyLoss(20)
|
||||
|
||||
|
||||
|
||||
// Need this in species.
|
||||
//#undef HUMAN_MAX_OXYLOSS
|
||||
//#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
//#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
@@ -91,7 +91,7 @@
|
||||
var/obj/item/organ/internal/L = get_organ_slot("lungs")
|
||||
if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD))
|
||||
return FALSE
|
||||
if(oxyloss > 10 || losebreath >= 4)
|
||||
if(getOxyLoss() > 10 || losebreath >= 4)
|
||||
emote("gasp")
|
||||
return FALSE
|
||||
if(mind)
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/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 dna.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 [p_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)
|
||||
@@ -91,6 +91,8 @@
|
||||
|
||||
var/is_small
|
||||
var/show_ssd = 1
|
||||
var/forced_heartattack = FALSE //Some species have blood, but we still want them to have heart attacks
|
||||
var/dies_at_threshold = FALSE // Do they die or get knocked out at specific thresholds, or do they go through complex crit?
|
||||
var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them
|
||||
var/has_gender = TRUE
|
||||
var/blacklisted = FALSE
|
||||
@@ -255,8 +257,6 @@
|
||||
. += (health_deficiency / 75)
|
||||
else
|
||||
. += (health_deficiency / 25)
|
||||
if(H.shock_stage >= 10)
|
||||
. += 3
|
||||
. += 2 * H.stance_damage //damaged/missing feet or legs is slow
|
||||
|
||||
if((hungry >= 70) && !flight)
|
||||
@@ -298,11 +298,8 @@
|
||||
// (Slime People changing color based on the reagents they consume)
|
||||
/datum/species/proc/handle_life(mob/living/carbon/human/H)
|
||||
if((NO_BREATHE in species_traits) || (BREATHLESS in H.mutations))
|
||||
H.setOxyLoss(0)
|
||||
H.SetLoseBreath(0)
|
||||
|
||||
var/takes_crit_damage = (!(NOCRITDAMAGE in species_traits))
|
||||
if((H.health <= config.health_threshold_crit) && takes_crit_damage)
|
||||
if((H.health <= HEALTH_THRESHOLD_CRIT) && takes_crit_damage)
|
||||
H.adjustBruteLoss(1)
|
||||
return
|
||||
|
||||
@@ -315,7 +312,7 @@
|
||||
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
|
||||
return TRUE
|
||||
if(target.health >= config.health_threshold_crit && !(target.status_flags & FAKEDEATH))
|
||||
if(target.health >= HEALTH_THRESHOLD_CRIT && !(target.status_flags & FAKEDEATH))
|
||||
target.help_shake_act(user)
|
||||
return TRUE
|
||||
else
|
||||
@@ -539,7 +536,7 @@
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/get_perceived_trauma(mob/living/carbon/human/H)
|
||||
return 100 - ((NO_PAIN in species_traits) ? 0 : H.traumatic_shock) - H.getStaminaLoss()
|
||||
return H.health - H.getStaminaLoss()
|
||||
|
||||
/datum/species/proc/handle_hud_icons(mob/living/carbon/human/H)
|
||||
if(!H.client)
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
)
|
||||
|
||||
species_traits = list(NO_BLOOD, NO_BREATHE, VIRUSIMMUNE, NOGUNS, NO_EXAMINE)
|
||||
|
||||
oxy_mod = 0
|
||||
dies_at_threshold = TRUE
|
||||
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
dietflags = DIET_OMNI
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
water and other radiation."
|
||||
|
||||
species_traits = list(NO_BREATHE, RADIMMUNE, IS_PLANT, NO_BLOOD, NO_PAIN)
|
||||
dies_at_threshold = TRUE
|
||||
clothing_flags = HAS_SOCKS
|
||||
default_hair_colour = "#000000"
|
||||
has_gender = FALSE
|
||||
@@ -39,8 +40,6 @@
|
||||
taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE
|
||||
skinned_type = /obj/item/stack/sheet/wood
|
||||
|
||||
oxy_mod = 0
|
||||
|
||||
body_temperature = T0C + 15 //make the plant people have a bit lower body temperature, why not
|
||||
blood_color = "#004400"
|
||||
flesh_color = "#907E4A"
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
deform = 'icons/mob/human_races/r_golem.dmi'
|
||||
|
||||
species_traits = list(NO_BREATHE, NO_BLOOD, NO_PAIN, RADIMMUNE, VIRUSIMMUNE, NOGUNS)
|
||||
dies_at_threshold = TRUE
|
||||
brute_mod = 0.45 //55% damage reduction
|
||||
burn_mod = 0.45
|
||||
tox_mod = 0.45
|
||||
oxy_mod = 0
|
||||
|
||||
dietflags = DIET_OMNI //golems can eat anything because they are magic or something
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
burn_mod = 2.28 // So they take 50% extra damage from brute/burn overall
|
||||
tox_mod = 0
|
||||
clone_mod = 0
|
||||
oxy_mod = 0
|
||||
death_message = "gives one shrill beep before falling limp, their monitor flashing blue before completely shutting off..."
|
||||
|
||||
species_traits = list(IS_WHITELISTED, NO_BREATHE, NO_SCAN, NO_INTORGANS, NO_PAIN, NO_DNA, RADIMMUNE, VIRUSIMMUNE, NOTRANSSTING)
|
||||
@@ -36,6 +35,7 @@
|
||||
|
||||
//Default styles for created mobs.
|
||||
default_hair = "Blue IPC Screen"
|
||||
dies_at_threshold = TRUE
|
||||
can_revive_by_healing = 1
|
||||
has_gender = FALSE
|
||||
reagent_tag = PROCESS_SYN
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
language = "Sol Common"
|
||||
burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores
|
||||
brute_mod = 2 // damn, double wham, double dam
|
||||
oxy_mod = 0
|
||||
species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_BLOOD, NO_PAIN, NO_SCAN, RADIMMUNE)
|
||||
dies_at_threshold = TRUE
|
||||
dietflags = DIET_OMNI //still human at their core, so they maintain their eating habits and diet
|
||||
|
||||
//Default styles for created mobs.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//language = "Clatter"
|
||||
|
||||
species_traits = list(IS_WHITELISTED, NO_BLOOD, NOTRANSSTING)
|
||||
forced_heartattack = TRUE // Plasmamen have no blood, but they should still get heart-attacks
|
||||
skinned_type = /obj/item/stack/sheet/mineral/plasma // We're low on plasma, R&D! *eyes plasmaman co-worker intently*
|
||||
dietflags = DIET_OMNI
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
)
|
||||
|
||||
species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE)
|
||||
|
||||
oxy_mod = 0
|
||||
dies_at_threshold = TRUE
|
||||
|
||||
dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE, NOGUNS, NO_EXAMINE) //Can't use guns due to muzzle flash
|
||||
burn_mod = 1.5 //1.5x burn damage, 2x is excessive
|
||||
oxy_mod = 0
|
||||
heatmod = 1.5
|
||||
|
||||
silent_steps = 1
|
||||
@@ -63,7 +62,6 @@
|
||||
|
||||
species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE, NO_EXAMINE)
|
||||
burn_mod = 1.1
|
||||
oxy_mod = 0
|
||||
heatmod = 1.1
|
||||
|
||||
/datum/species/shadow/ling/lesser/handle_life(mob/living/carbon/human/H)
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
flesh_color = "#E6E6C6"
|
||||
|
||||
species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE)
|
||||
dies_at_threshold = TRUE
|
||||
skinned_type = /obj/item/stack/sheet/bone
|
||||
|
||||
oxy_mod = 0
|
||||
|
||||
dietflags = DIET_OMNI
|
||||
reagent_tag = PROCESS_ORG
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
cold_level_3 = 200
|
||||
coldmod = 3
|
||||
|
||||
oxy_mod = 0
|
||||
brain_mod = 2.5
|
||||
|
||||
male_cough_sounds = list('sound/effects/slime_squish.ogg')
|
||||
female_cough_sounds = list('sound/effects/slime_squish.ogg')
|
||||
|
||||
species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_INTORGANS, NO_SCAN)
|
||||
dies_at_threshold = TRUE
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
bodyflags = HAS_SKIN_COLOR | NO_EYES
|
||||
dietflags = DIET_CARN
|
||||
@@ -83,7 +83,7 @@
|
||||
H.update_body()
|
||||
..()
|
||||
|
||||
/datum/species/slime/can_hear() // fucking snowflakes
|
||||
/datum/species/slime/can_hear() // fucking snowflakes
|
||||
. = TRUE
|
||||
|
||||
/datum/action/innate/slimecolor
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
eyes = "vox_eyes_s"
|
||||
|
||||
species_traits = list(NO_SCAN, IS_WHITELISTED, NOTRANSSTING)
|
||||
dies_at_threshold = TRUE
|
||||
clothing_flags = HAS_SOCKS
|
||||
dietflags = DIET_OMNI
|
||||
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
|
||||
dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too
|
||||
|
||||
oxy_mod = 0
|
||||
dies_at_threshold = TRUE
|
||||
|
||||
reagent_tag = PROCESS_ORG
|
||||
base_color = "#704300"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/mob/living/carbon/human/SetLoseBreath(amount)
|
||||
if(NO_BREATHE in dna.species.species_traits)
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/SetStunned(amount, updating = 1, force = 0)
|
||||
if(dna.species)
|
||||
amount = amount * dna.species.stun_mod
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(dna.species && dna.species.can_revive_by_healing)
|
||||
var/obj/item/organ/internal/brain/B = get_int_organ(/obj/item/organ/internal/brain)
|
||||
if(B)
|
||||
if((health >= (config.health_threshold_dead + config.health_threshold_crit) * 0.5) && getBrainLoss()<120)
|
||||
if((health >= (HEALTH_THRESHOLD_DEAD + HEALTH_THRESHOLD_CRIT) * 0.5) && getBrainLoss() < 120)
|
||||
update_revive()
|
||||
create_debug_log("revived from healing, trigger reason: [reason]")
|
||||
|
||||
@@ -30,4 +30,7 @@
|
||||
/mob/living/carbon/human/can_hear()
|
||||
. = TRUE // Fallback if we don't have a species
|
||||
if(dna.species)
|
||||
. = dna.species.can_hear(src)
|
||||
. = dna.species.can_hear(src)
|
||||
|
||||
/mob/living/carbon/human/check_death_method()
|
||||
return dna.species.dies_at_threshold
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/handle_breathing(times_fired)
|
||||
if(times_fired % 4 == 2 || failed_last_breath)
|
||||
breathe() //Breathe per 4 ticks, unless suffocating
|
||||
if(times_fired % 2 == 1)
|
||||
breathe() //Breathe every other tick, unless suffocating
|
||||
else
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/location_as_object = loc
|
||||
@@ -47,13 +47,13 @@
|
||||
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(health <= config.health_threshold_crit)
|
||||
if(health <= HEALTH_THRESHOLD_CRIT && check_death_method())
|
||||
AdjustLoseBreath(1)
|
||||
|
||||
//Suffocate
|
||||
if(losebreath > 0)
|
||||
AdjustLoseBreath(-1)
|
||||
if(prob(10))
|
||||
if(prob(75))
|
||||
emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
var/obj/loc_as_obj = loc
|
||||
@@ -97,7 +97,6 @@
|
||||
//CRIT
|
||||
if(!breath || (breath.total_moles() == 0) || !lungs)
|
||||
adjustOxyLoss(1)
|
||||
failed_last_breath = TRUE
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
return FALSE
|
||||
|
||||
@@ -121,15 +120,12 @@
|
||||
if(O2_partialpressure > 0)
|
||||
var/ratio = 1 - O2_partialpressure/safe_oxy_min
|
||||
adjustOxyLoss(min(5*ratio, 3))
|
||||
failed_last_breath = TRUE
|
||||
oxygen_used = breath.oxygen*ratio
|
||||
else
|
||||
adjustOxyLoss(3)
|
||||
failed_last_breath = TRUE
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
|
||||
else //Enough oxygen
|
||||
failed_last_breath = FALSE
|
||||
adjustOxyLoss(-5)
|
||||
oxygen_used = breath.oxygen
|
||||
clear_alert("not_enough_oxy")
|
||||
@@ -406,35 +402,54 @@
|
||||
handle_hud_icons_health_overlay()
|
||||
|
||||
/mob/living/carbon/proc/handle_hud_icons_health_overlay()
|
||||
if(stat == UNCONSCIOUS && health <= config.health_threshold_crit)
|
||||
var/severity = 0
|
||||
switch(health)
|
||||
if(-20 to -10) severity = 1
|
||||
if(-30 to -20) severity = 2
|
||||
if(-40 to -30) severity = 3
|
||||
if(-50 to -40) severity = 4
|
||||
if(-60 to -50) severity = 5
|
||||
if(-70 to -60) severity = 6
|
||||
if(-80 to -70) severity = 7
|
||||
if(-90 to -80) severity = 8
|
||||
if(-95 to -90) severity = 9
|
||||
if(-INFINITY to -95) severity = 10
|
||||
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
|
||||
else if(stat == CONSCIOUS)
|
||||
clear_fullscreen("crit")
|
||||
if(oxyloss)
|
||||
if(stat == UNCONSCIOUS && health <= HEALTH_THRESHOLD_CRIT)
|
||||
if(check_death_method())
|
||||
var/severity = 0
|
||||
switch(oxyloss)
|
||||
if(10 to 20) severity = 1
|
||||
if(20 to 25) severity = 2
|
||||
if(25 to 30) severity = 3
|
||||
if(30 to 35) severity = 4
|
||||
if(35 to 40) severity = 5
|
||||
if(40 to 45) severity = 6
|
||||
if(45 to INFINITY) severity = 7
|
||||
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
|
||||
else
|
||||
clear_fullscreen("oxy")
|
||||
switch(health)
|
||||
if(-20 to -10)
|
||||
severity = 1
|
||||
if(-30 to -20)
|
||||
severity = 2
|
||||
if(-40 to -30)
|
||||
severity = 3
|
||||
if(-50 to -40)
|
||||
severity = 4
|
||||
if(-60 to -50)
|
||||
severity = 5
|
||||
if(-70 to -60)
|
||||
severity = 6
|
||||
if(-80 to -70)
|
||||
severity = 7
|
||||
if(-90 to -80)
|
||||
severity = 8
|
||||
if(-95 to -90)
|
||||
severity = 9
|
||||
if(-INFINITY to -95)
|
||||
severity = 10
|
||||
overlay_fullscreen("crit", /obj/screen/fullscreen/crit, severity)
|
||||
else if(stat == CONSCIOUS)
|
||||
if(check_death_method())
|
||||
clear_fullscreen("crit")
|
||||
if(getOxyLoss())
|
||||
var/severity = 0
|
||||
switch(getOxyLoss())
|
||||
if(10 to 20)
|
||||
severity = 1
|
||||
if(20 to 25)
|
||||
severity = 2
|
||||
if(25 to 30)
|
||||
severity = 3
|
||||
if(30 to 35)
|
||||
severity = 4
|
||||
if(35 to 40)
|
||||
severity = 5
|
||||
if(40 to 45)
|
||||
severity = 6
|
||||
if(45 to INFINITY)
|
||||
severity = 7
|
||||
overlay_fullscreen("oxy", /obj/screen/fullscreen/oxy, severity)
|
||||
else
|
||||
clear_fullscreen("oxy")
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = getBruteLoss() + getFireLoss() + damageoverlaytemp
|
||||
@@ -450,4 +465,4 @@
|
||||
if(85 to INFINITY) severity = 6
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
clear_fullscreen("brute")
|
||||
@@ -174,11 +174,11 @@
|
||||
else
|
||||
health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
|
||||
|
||||
if(health < config.health_threshold_dead && stat != 2)
|
||||
if(health < HEALTH_THRESHOLD_DEAD && check_death_method() && stat != DEAD)
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health <= config.health_threshold_crit)
|
||||
else if(src.health <= HEALTH_THRESHOLD_CRIT && check_death_method())
|
||||
|
||||
if(!src.reagents.has_reagent("epinephrine"))
|
||||
src.adjustOxyLoss(10)
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
return
|
||||
if(stat != DEAD)
|
||||
// if(health <= min_health)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
// if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health)
|
||||
if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit)
|
||||
if(paralysis || sleeping || (check_death_method() && getOxyLoss() > 50) || (status_flags & FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
|
||||
if(stat == CONSCIOUS)
|
||||
KnockOut()
|
||||
create_debug_log("fell unconscious, trigger reason: [reason]")
|
||||
@@ -21,7 +21,7 @@
|
||||
..()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
if(total_health <= config.health_threshold_softcrit && !stat)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !stat)
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
Weaken(5)
|
||||
setStaminaLoss(health - 2)
|
||||
|
||||
@@ -104,11 +104,11 @@
|
||||
/mob/living/proc/getBruteLoss()
|
||||
return bruteloss
|
||||
|
||||
/mob/living/proc/adjustBruteLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_bruteloss = bruteloss
|
||||
bruteloss = min(max(bruteloss + amount, 0),(maxHealth*2))
|
||||
bruteloss = max(bruteloss + amount, 0)
|
||||
if(old_bruteloss == bruteloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -120,11 +120,13 @@
|
||||
/mob/living/proc/getOxyLoss()
|
||||
return oxyloss
|
||||
|
||||
/mob/living/proc/adjustOxyLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
if(BREATHLESS in mutations)
|
||||
return FALSE
|
||||
var/old_oxyloss = oxyloss
|
||||
oxyloss = min(max(oxyloss + amount, 0),(maxHealth*2))
|
||||
oxyloss = max(oxyloss + amount, 0)
|
||||
if(old_oxyloss == oxyloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -136,6 +138,8 @@
|
||||
/mob/living/proc/setOxyLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
if(BREATHLESS in mutations)
|
||||
return FALSE
|
||||
var/old_oxyloss = oxyloss
|
||||
oxyloss = amount
|
||||
if(old_oxyloss == oxyloss)
|
||||
@@ -149,11 +153,11 @@
|
||||
/mob/living/proc/getToxLoss()
|
||||
return toxloss
|
||||
|
||||
/mob/living/proc/adjustToxLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_toxloss = toxloss
|
||||
toxloss = min(max(toxloss + amount, 0),(maxHealth*2))
|
||||
toxloss = max(toxloss + amount, 0)
|
||||
if(old_toxloss == toxloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -162,7 +166,7 @@
|
||||
if(updating_health)
|
||||
updatehealth("adjustToxLoss")
|
||||
|
||||
/mob/living/proc/setToxLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/setToxLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_toxloss = toxloss
|
||||
@@ -178,11 +182,11 @@
|
||||
/mob/living/proc/getFireLoss()
|
||||
return fireloss
|
||||
|
||||
/mob/living/proc/adjustFireLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_fireloss = fireloss
|
||||
fireloss = min(max(fireloss + amount, 0),(maxHealth*2))
|
||||
fireloss = max(fireloss + amount, 0)
|
||||
if(old_fireloss == fireloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -194,11 +198,11 @@
|
||||
/mob/living/proc/getCloneLoss()
|
||||
return cloneloss
|
||||
|
||||
/mob/living/proc/adjustCloneLoss(var/amount, updating_health = TRUE)
|
||||
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_cloneloss = cloneloss
|
||||
cloneloss = min(max(cloneloss + amount, 0),(maxHealth*2))
|
||||
cloneloss = max(cloneloss + amount, 0)
|
||||
if(old_cloneloss == cloneloss)
|
||||
updating_health = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -207,8 +211,9 @@
|
||||
if(updating_health)
|
||||
updatehealth("adjustCloneLoss")
|
||||
|
||||
/mob/living/proc/setCloneLoss(var/amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
/mob/living/proc/setCloneLoss(amount, updating_health = TRUE)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE //godmode
|
||||
var/old_cloneloss = cloneloss
|
||||
cloneloss = amount
|
||||
if(old_cloneloss == cloneloss)
|
||||
@@ -235,7 +240,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE
|
||||
var/old_stamloss = staminaloss
|
||||
staminaloss = min(max(staminaloss + amount, 0),(maxHealth*2))
|
||||
staminaloss = max(staminaloss + amount, 0)
|
||||
if(old_stamloss == staminaloss)
|
||||
updating = FALSE
|
||||
. = STATUS_UPDATE_NONE
|
||||
@@ -300,4 +305,4 @@
|
||||
updatehealth("take overall damage")
|
||||
|
||||
/mob/living/proc/has_organic_damage()
|
||||
return (maxHealth - health)
|
||||
return (maxHealth - health)
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
handle_diseases()
|
||||
|
||||
//Heart Attack, if applicable
|
||||
if(stat != DEAD)
|
||||
handle_heartattack()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
if(environment)
|
||||
handle_environment(environment)
|
||||
@@ -56,6 +60,9 @@
|
||||
/mob/living/proc/handle_breathing(times_fired)
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_heartattack()
|
||||
return
|
||||
|
||||
/mob/living/proc/handle_mutations_and_radiation()
|
||||
radiation = 0 //so radiation don't accumulate in simple animals
|
||||
return
|
||||
|
||||
@@ -246,17 +246,18 @@
|
||||
set hidden = 1
|
||||
if(InCritical())
|
||||
create_attack_log("[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!")
|
||||
adjustOxyLoss(health - config.health_threshold_dead)
|
||||
adjustOxyLoss(health - HEALTH_THRESHOLD_DEAD)
|
||||
// super check for weird mobs, including ones that adjust hp
|
||||
// we don't want to go overboard and gib them, though
|
||||
for(var/i = 1 to 5)
|
||||
if(health < config.health_threshold_dead)
|
||||
if(health < HEALTH_THRESHOLD_DEAD)
|
||||
break
|
||||
take_overall_damage(max(5, health - config.health_threshold_dead), 0)
|
||||
take_overall_damage(max(5, health - HEALTH_THRESHOLD_DEAD), 0)
|
||||
death()
|
||||
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
return (health < 0 && health > -95.0 && stat == UNCONSCIOUS)
|
||||
return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/ex_act(severity)
|
||||
..()
|
||||
@@ -462,7 +463,6 @@
|
||||
human_mob = src
|
||||
human_mob.set_heartattack(FALSE)
|
||||
human_mob.restore_blood()
|
||||
human_mob.shock_stage = 0
|
||||
human_mob.decaylevel = 0
|
||||
human_mob.remove_all_embedded_objects()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
return
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
else if(health > (maxHealth*0.25))
|
||||
msgs += "<span class='warning'>It is covered in wounds!</span>"
|
||||
if(resting)
|
||||
if(bruteloss > 0 || fireloss > 0)
|
||||
if(getBruteLoss() || getFireLoss())
|
||||
msgs += "<span class='warning'>It is currently licking its wounds, regenerating the damage to its body!</span>"
|
||||
else
|
||||
msgs += "<span class='notice'>It is currently resting.</span>"
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/hellhound/Life(seconds, times_fired)
|
||||
. = ..()
|
||||
if(stat != DEAD && resting && (bruteloss > 0) || (fireloss > 0))
|
||||
if(stat != DEAD && resting && (getBruteLoss() || getFireLoss()))
|
||||
if(life_regen_cycles >= life_regen_cycle_trigger)
|
||||
life_regen_cycles = 0
|
||||
to_chat(src, "<span class='notice'>You lick your wounds, helping them close.</span>")
|
||||
@@ -91,7 +91,7 @@
|
||||
/mob/living/simple_animal/hostile/hellhound/proc/wants_to_rest()
|
||||
if(target)
|
||||
return FALSE
|
||||
if(bruteloss > 0 || fireloss > 0)
|
||||
if(getBruteLoss() || getFireLoss())
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/on_life()
|
||||
..()
|
||||
if(owner.health < config.health_threshold_crit)
|
||||
if(owner.health < HEALTH_THRESHOLD_CRIT)
|
||||
ui_action_click()
|
||||
|
||||
/obj/item/organ/internal/hivelord_core/afterattack(atom/target, mob/user, proximity_flag)
|
||||
|
||||
@@ -316,12 +316,12 @@ var/global/list/ts_spiderling_list = list()
|
||||
adjustToxLoss(rand(1,10))
|
||||
if(regen_points < regen_points_max)
|
||||
regen_points += regen_points_per_tick
|
||||
if((bruteloss > 0) || (fireloss > 0))
|
||||
if(getBruteLoss() || getFireLoss())
|
||||
if(regen_points > regen_points_per_hp)
|
||||
if(bruteloss > 0)
|
||||
if(getBruteLoss())
|
||||
adjustBruteLoss(-1)
|
||||
regen_points -= regen_points_per_hp
|
||||
else if(fireloss > 0)
|
||||
else if(getFireLoss())
|
||||
adjustFireLoss(-1)
|
||||
regen_points -= regen_points_per_hp
|
||||
if(prob(5))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/mob/living/proc/can_be_revived()
|
||||
. = TRUE
|
||||
// if(health <= min_health)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(health <= HEALTH_THRESHOLD_DEAD)
|
||||
return FALSE
|
||||
|
||||
// death() is used to make a mob die
|
||||
@@ -71,3 +71,6 @@
|
||||
spell.updateButtonIcon()
|
||||
|
||||
return 1
|
||||
|
||||
/mob/living/proc/check_death_method()
|
||||
return TRUE
|
||||
@@ -297,6 +297,8 @@
|
||||
SetLoseBreath(max(losebreath, amount))
|
||||
|
||||
/mob/living/SetLoseBreath(amount)
|
||||
if(BREATHLESS in mutations)
|
||||
return FALSE
|
||||
losebreath = max(amount, 0)
|
||||
|
||||
/mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(health <= HEALTH_THRESHOLD_DEAD && check_death_method())
|
||||
death()
|
||||
create_debug_log("died of damage, trigger reason: [reason]")
|
||||
else if(paralysis || status_flags & FAKEDEATH)
|
||||
|
||||
@@ -114,6 +114,19 @@
|
||||
M.ForceContractDisease(new /datum/disease/vampire(0))
|
||||
return ..()
|
||||
|
||||
/datum/reagent/bacon_grease
|
||||
name = "pure bacon grease"
|
||||
id = "bacon_grease"
|
||||
description = "Hook me up to an IV of that sweet, sweet stuff!"
|
||||
reagent_state = LIQUID
|
||||
color = "#F7E6B1"
|
||||
can_synth = FALSE
|
||||
|
||||
/datum/reagent/bacon_grease/on_mob_life(mob/living/carbon/M)
|
||||
if(volume > 4.5)
|
||||
M.ForceContractDisease(new /datum/disease/critical/heart_failure(0))
|
||||
return ..()
|
||||
|
||||
/datum/reagent/heartworms
|
||||
name = "Space heartworms"
|
||||
id = "heartworms"
|
||||
|
||||
@@ -845,10 +845,7 @@
|
||||
to_chat(M, "<span class='warning'>Your chest is burning with pain!</span>")
|
||||
update_flags |= M.Stun(1, FALSE)
|
||||
update_flags |= M.Weaken(1, FALSE)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.undergoing_cardiac_arrest())
|
||||
H.set_heartattack(TRUE)
|
||||
M.ForceContractDisease(new /datum/disease/critical/heart_failure(0))
|
||||
return ..() | update_flags
|
||||
|
||||
/datum/reagent/fungus
|
||||
|
||||
@@ -16,13 +16,6 @@
|
||||
shock_reduction = 200
|
||||
taste_message = "numbness"
|
||||
|
||||
/datum/reagent/medicine/hydrocodone/on_mob_life(mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
return ..()
|
||||
|
||||
/datum/reagent/medicine/sterilizine
|
||||
name = "Sterilizine"
|
||||
id = "sterilizine"
|
||||
@@ -412,10 +405,6 @@
|
||||
var/update_flags = STATUS_UPDATE_NONE
|
||||
if(prob(55))
|
||||
update_flags |= M.adjustBruteLoss(-2*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
return ..() | update_flags
|
||||
|
||||
/datum/reagent/medicine/salbutamol
|
||||
@@ -472,7 +461,7 @@
|
||||
update_flags |= M.AdjustWeakened(-1, FALSE)
|
||||
update_flags |= M.adjustStaminaLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
M.AdjustLoseBreath(-1, bound_lower = 5)
|
||||
if(M.oxyloss > 75)
|
||||
if(M.getOxyLoss() > 75)
|
||||
update_flags |= M.adjustOxyLoss(-1, FALSE)
|
||||
if(M.health < 0 || M.health > 0 && prob(33))
|
||||
update_flags |= M.adjustToxLoss(-1, FALSE)
|
||||
@@ -547,10 +536,6 @@
|
||||
if(36 to INFINITY)
|
||||
M.Paralyse(15)
|
||||
M.Drowsy(20)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/oculine
|
||||
@@ -600,7 +585,7 @@
|
||||
if(prob(4))
|
||||
M.emote("collapse")
|
||||
M.AdjustLoseBreath(-5, bound_lower = 5)
|
||||
if(M.oxyloss > 65)
|
||||
if(M.getOxyLoss() > 65)
|
||||
update_flags |= M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
if(M.health < -25)
|
||||
update_flags |= M.adjustToxLoss(-1, FALSE)
|
||||
@@ -636,7 +621,7 @@
|
||||
update_flags |= M.adjustBrainLoss(-1, FALSE)
|
||||
holder.remove_reagent("histamine", 15)
|
||||
M.AdjustLoseBreath(-1, bound_lower = 3)
|
||||
if(M.oxyloss > 35)
|
||||
if(M.getOxyLoss() > 35)
|
||||
update_flags |= M.adjustOxyLoss(-10*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
if(M.health < -10 && M.health > -65)
|
||||
update_flags |= M.adjustToxLoss(-1*REAGENTS_EFFECT_MULTIPLIER, FALSE)
|
||||
@@ -789,7 +774,7 @@
|
||||
M.SetSlur(0)
|
||||
M.AdjustDrunk(-4)
|
||||
M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 8, 0, 1)
|
||||
if(M.toxloss <= 25)
|
||||
if(M.getToxLoss() <= 25)
|
||||
update_flags |= M.adjustToxLoss(-2.0, FALSE)
|
||||
return ..() | update_flags
|
||||
|
||||
|
||||
@@ -264,11 +264,4 @@
|
||||
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
|
||||
result_amount = 3
|
||||
min_temp = T0C + 100
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
|
||||
/datum/chemical_reaction/corazone
|
||||
name = "Corazone"
|
||||
id = "corazone"
|
||||
result = "corazone"
|
||||
result_amount = 3
|
||||
required_reagents = list("phenol" = 2, "lithium" = 1)
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
@@ -44,10 +44,28 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/toxin
|
||||
name = "toxin bottle"
|
||||
desc = "A small bottle of toxins. Do not drink, it is poisonous."
|
||||
desc = "A small bottle containing toxic compounds."
|
||||
icon_state = "small_bottle"
|
||||
list_reagents = list("toxin" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/atropine
|
||||
name = "atropine bottle"
|
||||
desc = "A small bottle containing atropine, used for cardiac emergencies."
|
||||
icon_state = "small_bottle"
|
||||
list_reagents = list("atropine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/saline
|
||||
name = "saline-glucose bottle"
|
||||
desc = "A small bottle containing saline-glucose solution."
|
||||
icon_state = "small_bottle"
|
||||
list_reagents = list("salglu_solution" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/salicylic
|
||||
name = "salicylic acid bottle"
|
||||
desc = "A small bottle containing medicine for pain and fevers."
|
||||
icon_state = "small_bottle"
|
||||
list_reagents = list("sal_acid" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/cyanide
|
||||
name = "cyanide bottle"
|
||||
desc = "A small bottle of cyanide. Bitter almonds?"
|
||||
@@ -99,25 +117,25 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/morphine
|
||||
name = "Morphine Bottle"
|
||||
desc = "A small bottle. Contains morphine."
|
||||
icon_state = "round_bottle"
|
||||
desc = "A small bottle of morphine, a powerful painkiller."
|
||||
icon_state = "bottle"
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/ether
|
||||
name = "Ether Bottle"
|
||||
desc = "A small bottle. Contains ether."
|
||||
desc = "A small bottle of an ether, a strong anesthetic and sedative."
|
||||
icon_state = "round_bottle"
|
||||
list_reagents = list("ether" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/charcoal
|
||||
name = "Charcoal Bottle"
|
||||
desc = "A small bottle. Contains charcoal."
|
||||
icon_state = "round_bottle"
|
||||
icon_state = "wide_bottle"
|
||||
list_reagents = list("charcoal" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/epinephrine
|
||||
name = "Epinephrine Bottle"
|
||||
desc = "A small bottle. Contains epinephrine."
|
||||
desc = "A small bottle. Contains epinephrine - used to stabilize patients."
|
||||
icon_state = "round_bottle"
|
||||
list_reagents = list("epinephrine" = 30)
|
||||
|
||||
@@ -236,9 +254,21 @@
|
||||
/obj/item/reagent_containers/glass/bottle/diphenhydramine
|
||||
name = "diphenhydramine bottle"
|
||||
desc = "A small bottle of diphenhydramine."
|
||||
icon_state = "bottle"
|
||||
icon_state = "round_bottle"
|
||||
list_reagents = list("diphenhydramine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/oculine
|
||||
name = "oculine bottle"
|
||||
desc = "A small bottle of combined eye and ear medication."
|
||||
icon_state = "round_bottle"
|
||||
list_reagents = list("oculine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/potassium_iodide
|
||||
name = "potassium iodide bottle"
|
||||
desc = "A small bottle of potassium iodide."
|
||||
icon_state = "wide_bottle"
|
||||
list_reagents = list("potass_iodide" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "Charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 25)
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/salicylic
|
||||
name = "Salicylic Acid pill"
|
||||
@@ -121,4 +121,22 @@
|
||||
name = "Hydrocodone pill"
|
||||
desc = "Used to treat extreme pain."
|
||||
icon_state = "pill6"
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
list_reagents = list("hydrocodone" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/calomel
|
||||
name = "calomel pill"
|
||||
desc = "Can be used to purge impurities, but is highly toxic itself."
|
||||
icon_state = "pill3"
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to cure genetic abnormalities."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("mutadone" = 20)
|
||||
|
||||
/obj/item/reagent_containers/food/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat cranial swelling."
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("mannitol" = 20)
|
||||
@@ -318,6 +318,11 @@
|
||||
desc = "Contains insulin - used to treat diabetes."
|
||||
list_reagents = list("insulin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "Syringe (calomel)"
|
||||
desc = "Contains calomel, which be used to purge impurities, but is highly toxic itself."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
|
||||
@@ -52,6 +52,16 @@
|
||||
build_path = /obj/item/healthupgrade
|
||||
category = list("Medical")
|
||||
|
||||
/datum/design/handheld_defib
|
||||
name = "Handheld Defibrillator"
|
||||
desc = "A smaller defibrillator only capable of treating cardiac arrest."
|
||||
id = "handheld_defib"
|
||||
req_tech = list("biotech" = 2, "magnets" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 20, MAT_GLASS = 20)
|
||||
build_path = /obj/item/handheld_defibrillator
|
||||
category = list("Medical")
|
||||
|
||||
/datum/design/defib
|
||||
name = "Defibrillator"
|
||||
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
|
||||
|
||||
@@ -306,7 +306,8 @@
|
||||
/obj/item/roller = 1,
|
||||
/obj/item/storage/pill_bottle/ert = 1,
|
||||
/obj/item/flashlight = 1,
|
||||
/obj/item/healthupgrade = 1
|
||||
/obj/item/healthupgrade = 1,
|
||||
/obj/item/handheld_defibrillator = 1
|
||||
)
|
||||
|
||||
/datum/outfit/job/centcom/response_team/medic/red
|
||||
@@ -335,7 +336,8 @@
|
||||
/obj/item/roller = 1,
|
||||
/obj/item/clothing/shoes/magboots = 1,
|
||||
/obj/item/bodyanalyzer = 1,
|
||||
/obj/item/healthupgrade = 1
|
||||
/obj/item/healthupgrade = 1,
|
||||
/obj/item/handheld_defibrillator = 1
|
||||
)
|
||||
|
||||
/datum/outfit/job/centcom/response_team/medic/gamma
|
||||
@@ -357,7 +359,8 @@
|
||||
/obj/item/bodyanalyzer/advanced = 1,
|
||||
/obj/item/extinguisher/mini = 1,
|
||||
/obj/item/roller = 1,
|
||||
/obj/item/healthanalyzer/advanced = 1
|
||||
/obj/item/healthanalyzer/advanced = 1,
|
||||
/obj/item/handheld_defibrillator = 1
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
/obj/item/organ/internal/heart/cybernetic/upgraded/on_life()
|
||||
if(!ishuman(owner))
|
||||
return
|
||||
|
||||
if(!(status & ORGAN_DEAD) && !attempted_restart && !beating)
|
||||
to_chat(owner, "<span class='warning'>Your [name] detects a cardiac event and attempts to return to its normal rhythm!</span>")
|
||||
if(prob(20) && emagged)
|
||||
@@ -180,6 +181,28 @@
|
||||
addtimer(CALLBACK(src, .proc/recharge), 300)
|
||||
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] fails to return to its normal rhythm!</span>"), 30)
|
||||
|
||||
if(!(status & ORGAN_DEAD) && !attempted_restart && owner.HasDisease(new /datum/disease/critical/heart_failure(0)))
|
||||
to_chat(owner, "<span class='warning'>Your [name] detects a cardiac event and attempts to return to its normal rhythm!</span>")
|
||||
if(prob(40) && emagged)
|
||||
attempted_restart = TRUE
|
||||
for(var/datum/disease/critical/heart_failure/HF in owner.viruses)
|
||||
HF.cure()
|
||||
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] returns to its normal rhythm!</span>"), 30)
|
||||
addtimer(CALLBACK(src, .proc/recharge), 200)
|
||||
else if(prob(25))
|
||||
attempted_restart = TRUE
|
||||
for(var/datum/disease/critical/heart_failure/HF in owner.viruses)
|
||||
HF.cure()
|
||||
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] returns to its normal rhythm!</span>"), 30)
|
||||
addtimer(CALLBACK(src, .proc/recharge), 200)
|
||||
else
|
||||
attempted_restart = TRUE
|
||||
if(emagged)
|
||||
addtimer(CALLBACK(src, .proc/recharge), 200)
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/recharge), 300)
|
||||
addtimer(CALLBACK(src, .proc/message_to_owner, owner, "<span class='warning'>Your [name] fails to return to its normal rhythm!</span>"), 30)
|
||||
|
||||
if(!(status & ORGAN_DEAD))
|
||||
var/boost = emagged ? 2 : 1
|
||||
owner.AdjustDrowsy(-4 * boost)
|
||||
@@ -230,7 +253,7 @@
|
||||
owner.adjustFireLoss(numHigh)
|
||||
if(prob(numMid))
|
||||
to_chat(owner, "<span class='warning'>Your [name] lurches awkwardly!</span>")
|
||||
Stop()
|
||||
owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0))
|
||||
if(prob(numMid))
|
||||
to_chat(owner, "<span class='danger'>Your [name] stops beating!</span>")
|
||||
Stop()
|
||||
@@ -246,4 +269,4 @@
|
||||
owner.adjustFireLoss(numMid)
|
||||
if(prob(numLow))
|
||||
to_chat(owner, "<span class='warning'>Your [name] lurches awkwardly!</span>")
|
||||
Stop()
|
||||
owner.ForceContractDisease(new /datum/disease/critical/heart_failure(0))
|
||||
@@ -19,20 +19,16 @@
|
||||
var/safe_toxins_max = 0.05
|
||||
var/SA_para_min = 1 //Sleeping agent
|
||||
var/SA_sleep_min = 5 //Sleeping agent
|
||||
var/gas_toxicity_multiplier = 100
|
||||
|
||||
var/oxy_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/oxy_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
|
||||
var/oxy_damage_type = OXY
|
||||
var/nitro_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/nitro_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
var/oxy_breath_dam_multiplier = 1
|
||||
var/nitro_damage_type = OXY
|
||||
var/co2_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/co2_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
var/nitro_breath_dam_multiplier = 1
|
||||
var/co2_damage_type = OXY
|
||||
var/tox_breath_dam_min = MIN_TOXIC_GAS_DAMAGE
|
||||
var/tox_breath_dam_max = MAX_TOXIC_GAS_DAMAGE
|
||||
var/co2_breath_dam_multiplier = 1
|
||||
var/tox_damage_type = TOX
|
||||
var/tox_breath_dam_multiplier = 1
|
||||
|
||||
var/cold_message = "your face freezing and an icicle forming"
|
||||
var/cold_level_1_threshold = 260
|
||||
@@ -88,12 +84,11 @@
|
||||
return
|
||||
|
||||
if(!breath || (breath.total_moles() == 0))
|
||||
if(H.health >= config.health_threshold_crit)
|
||||
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
else if(!(NOCRITDAMAGE in H.dna.species.species_traits))
|
||||
H.adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
if(isspaceturf(loc))
|
||||
H.adjustOxyLoss(10)
|
||||
else
|
||||
H.adjustOxyLoss(5)
|
||||
|
||||
H.failed_last_breath = TRUE
|
||||
if(safe_oxygen_min)
|
||||
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else if(safe_toxins_min)
|
||||
@@ -104,6 +99,10 @@
|
||||
H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
return FALSE
|
||||
|
||||
|
||||
if(H.health < HEALTH_THRESHOLD_CRIT)
|
||||
return FALSE
|
||||
|
||||
var/gas_breathed = 0
|
||||
|
||||
//Partial pressures in our breath
|
||||
@@ -118,8 +117,8 @@
|
||||
//Too much oxygen! //Yes, some species may not like it.
|
||||
if(safe_oxygen_max)
|
||||
if(O2_pp > safe_oxygen_max)
|
||||
var/ratio = (breath.oxygen/safe_oxygen_max) * gas_toxicity_multiplier
|
||||
H.apply_damage_type(Clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
|
||||
var/ratio = breath.oxygen/safe_oxygen_max
|
||||
H.apply_damage_type(ratio * 325 * oxy_breath_dam_multiplier, oxy_damage_type)
|
||||
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
|
||||
else
|
||||
H.clear_alert("too_much_oxy")
|
||||
@@ -130,8 +129,7 @@
|
||||
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath.oxygen)
|
||||
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
H.adjustOxyLoss(-5)
|
||||
H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS)
|
||||
gas_breathed = breath.oxygen
|
||||
H.clear_alert("not_enough_oxy")
|
||||
|
||||
@@ -145,8 +143,8 @@
|
||||
//Too much nitrogen!
|
||||
if(safe_nitro_max)
|
||||
if(N2_pp > safe_nitro_max)
|
||||
var/ratio = (breath.nitrogen/safe_nitro_max) * gas_toxicity_multiplier
|
||||
H.apply_damage_type(Clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
|
||||
var/ratio = breath.nitrogen/safe_nitro_max
|
||||
H.apply_damage_type(ratio * 325 * nitro_breath_dam_multiplier, nitro_damage_type)
|
||||
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
|
||||
else
|
||||
H.clear_alert("too_much_nitro")
|
||||
@@ -157,8 +155,7 @@
|
||||
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath.nitrogen)
|
||||
H.throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
H.adjustOxyLoss(-5)
|
||||
H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS)
|
||||
gas_breathed = breath.nitrogen
|
||||
H.clear_alert("not_enough_nitro")
|
||||
|
||||
@@ -176,9 +173,9 @@
|
||||
H.co2overloadtime = world.time
|
||||
else if(world.time - H.co2overloadtime > 120)
|
||||
H.Paralyse(3)
|
||||
H.apply_damage_type(3, co2_damage_type) // Lets hurt em a little, let them know we mean business
|
||||
H.apply_damage_type(HUMAN_MAX_OXYLOSS * co2_breath_dam_multiplier, co2_damage_type) // Lets hurt em a little, let them know we mean business
|
||||
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
|
||||
H.apply_damage_type(8, co2_damage_type)
|
||||
H.apply_damage_type(15 * co2_breath_dam_multiplier, co2_damage_type)
|
||||
H.throw_alert("too_much_co2", /obj/screen/alert/too_much_co2)
|
||||
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
|
||||
H.emote("cough")
|
||||
@@ -193,8 +190,7 @@
|
||||
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath.carbon_dioxide)
|
||||
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
H.adjustOxyLoss(-5)
|
||||
H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS)
|
||||
gas_breathed = breath.carbon_dioxide
|
||||
H.clear_alert("not_enough_co2")
|
||||
|
||||
@@ -209,8 +205,8 @@
|
||||
//Too much toxins!
|
||||
if(safe_toxins_max)
|
||||
if(Toxins_pp > safe_toxins_max)
|
||||
var/ratio = (breath.toxins/safe_toxins_max) * gas_toxicity_multiplier
|
||||
H.apply_damage_type(Clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
|
||||
var/ratio = breath.toxins/safe_toxins_max
|
||||
H.apply_damage_type(ratio * 325 * tox_breath_dam_multiplier, tox_damage_type)
|
||||
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
H.clear_alert("too_much_tox")
|
||||
@@ -222,8 +218,7 @@
|
||||
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath.toxins)
|
||||
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else
|
||||
H.failed_last_breath = FALSE
|
||||
H.adjustOxyLoss(-5)
|
||||
H.adjustOxyLoss(-HUMAN_MAX_OXYLOSS)
|
||||
gas_breathed = breath.toxins
|
||||
H.clear_alert("not_enough_tox")
|
||||
|
||||
@@ -261,11 +256,9 @@
|
||||
if(breath_pp > 0)
|
||||
var/ratio = safe_breath_min/breath_pp
|
||||
H.adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!
|
||||
H.failed_last_breath = TRUE
|
||||
. = true_pp*ratio/6
|
||||
else
|
||||
H.adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
H.failed_last_breath = TRUE
|
||||
|
||||
|
||||
/obj/item/organ/internal/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
@@ -332,6 +325,7 @@
|
||||
safe_oxygen_max = 0.05 //This is toxic to us
|
||||
safe_nitro_min = 16 //We breathe THIS!
|
||||
oxy_damage_type = TOX //And it poisons us
|
||||
oxy_breath_dam_multiplier = 0.16
|
||||
|
||||
/obj/item/organ/internal/lungs/drask
|
||||
icon = 'icons/obj/species_organs/drask.dmi'
|
||||
@@ -341,7 +335,7 @@
|
||||
cold_level_1_damage = -COLD_GAS_DAMAGE_LEVEL_1 //They heal when the air is cold
|
||||
cold_level_2_damage = -COLD_GAS_DAMAGE_LEVEL_2
|
||||
cold_level_3_damage = -COLD_GAS_DAMAGE_LEVEL_3
|
||||
cold_damage_types = list(BRUTE = 1, BURN = 0.5)
|
||||
cold_damage_types = list(BRUTE = 0.5, BURN = 0.25)
|
||||
|
||||
/obj/item/organ/internal/lungs/cybernetic
|
||||
name = "cybernetic lungs"
|
||||
|
||||
Reference in New Issue
Block a user