Crit Rework Final Submission
@@ -40,6 +40,9 @@
|
||||
#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath
|
||||
#define XENO_HOST 16384 //Tracks whether we're gonna be a baby alien's mummy.
|
||||
|
||||
//Health Defines
|
||||
#define HEALTH_THRESHOLD_CRIT 0
|
||||
#define HEALTH_THRESHOLD_DEAD -100
|
||||
|
||||
//Grab levels
|
||||
#define GRAB_PASSIVE 1
|
||||
|
||||
@@ -100,10 +100,6 @@
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/health_threshold_softcrit = 0
|
||||
var/health_threshold_crit = 0
|
||||
var/health_threshold_dead = -100
|
||||
|
||||
var/bones_can_break = 1
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
@@ -663,10 +659,6 @@
|
||||
value = text2num(value)
|
||||
|
||||
switch(name)
|
||||
if("health_threshold_crit")
|
||||
config.health_threshold_crit = value
|
||||
if("health_threshold_dead")
|
||||
config.health_threshold_dead = value
|
||||
if("revival_pod_plants")
|
||||
config.revival_pod_plants = value
|
||||
if("revival_cloning")
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/datum/disease/critical
|
||||
|
||||
/datum/disease/critical/stage_act() //overriden to ensure unique behavior
|
||||
stage = min(stage, max_stages)
|
||||
|
||||
if(prob(stage_prob))
|
||||
stage = min(stage + 1, max_stages)
|
||||
|
||||
for(var/C_id in cures)
|
||||
if(affected_mob.reagents.has_reagent(C_id))
|
||||
if(prob(cure_chance))
|
||||
cure()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/disease/critical/shock
|
||||
name = "Shock"
|
||||
form = "Medical Emergency"
|
||||
spread_text = "The patient is in shock"
|
||||
max_stages = 3
|
||||
spread_flags = SPECIAL
|
||||
cure_text = "Saline Solution"
|
||||
cures = list("salglu_solution")
|
||||
cure_chance = 10
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
stage_prob = 6
|
||||
severity = DANGEROUS
|
||||
disease_flags = CURABLE
|
||||
bypasses_immunity = TRUE
|
||||
virus_heal_resistant = TRUE
|
||||
|
||||
/datum/disease/critical/shock/stage_act()
|
||||
if(..())
|
||||
if(affected_mob.health >= 25)
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(prob(1) && prob(10))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("shiver", "pale", "moan"))
|
||||
if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel weak!</span>")
|
||||
if(2)
|
||||
if(prob(1) && prob(10))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("shiver", "pale", "moan", "shudder", "tremble"))
|
||||
if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel absolutely terrible!</span>")
|
||||
if(prob(5))
|
||||
affected_mob.emote("faint", "collapse", "groan")
|
||||
if(3)
|
||||
if(prob(1) && prob(10))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("shudder", "pale", "tremble", "groan", "bshake"))
|
||||
if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel horrible!</span>")
|
||||
if(prob(5))
|
||||
affected_mob.emote(pick("faint", "collapse", "groan"))
|
||||
if(prob(7))
|
||||
to_chat(affected_mob, "<span class='danger'>You can't breathe!</span>")
|
||||
affected_mob.AdjustLoseBreath(1)
|
||||
if(prob(5))
|
||||
var/datum/disease/D = new /datum/disease/critical/heart_failure
|
||||
affected_mob.ForceContractDisease(D)
|
||||
|
||||
/datum/disease/critical/heart_failure
|
||||
name = "Cardiac Failure"
|
||||
form = "Medical Emergency"
|
||||
spread_text = "The patient is having a cardiac emergency"
|
||||
max_stages = 3
|
||||
spread_flags = SPECIAL
|
||||
cure_text = "Cardiac Stimulants"
|
||||
cures = list("atropine", "epinephrine")
|
||||
cure_chance = 10
|
||||
needs_all_cures = FALSE
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
stage_prob = 5
|
||||
severity = DANGEROUS
|
||||
disease_flags = CURABLE
|
||||
required_organs = list(/obj/item/organ/internal/heart)
|
||||
bypasses_immunity = TRUE
|
||||
virus_heal_resistant = TRUE
|
||||
|
||||
/datum/disease/critical/heart_failure/stage_act()
|
||||
if(..())
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(prob(1) && prob(10))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("pale", "shudder"))
|
||||
if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>Your arm hurts!</span>")
|
||||
else if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>Your chest hurts!</span>")
|
||||
if(2)
|
||||
if(prob(1) && prob(10))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
cure()
|
||||
return
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("pale", "groan"))
|
||||
if(prob(5))
|
||||
to_chat(affected_mob, "<span class='danger'>Your heart lurches in your chest!</span>")
|
||||
affected_mob.AdjustLoseBreath(1)
|
||||
if(prob(3))
|
||||
to_chat(affected_mob, "<span class='danger'>Your heart stops beating!</span>")
|
||||
affected_mob.AdjustLoseBreath(3)
|
||||
if(prob(5))
|
||||
affected_mob.emote(pick("faint", "collapse", "groan"))
|
||||
if(3)
|
||||
affected_mob.adjustOxyLoss(1)
|
||||
if(prob(8))
|
||||
affected_mob.emote(pick("twitch", "gasp"))
|
||||
if(prob(5) && ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H.set_heartattack(TRUE)
|
||||
@@ -14,20 +14,12 @@
|
||||
disease_flags = CURABLE
|
||||
spread_flags = NON_CONTAGIOUS
|
||||
virus_heal_resistant = TRUE
|
||||
var/remissive = 0
|
||||
|
||||
/datum/disease/food_poisoning/stage_act()
|
||||
if(!remissive)
|
||||
..()
|
||||
if(affected_mob.sleeping && prob(33))
|
||||
to_chat(affected_mob, "<span class='notice'>You feel better.</span>")
|
||||
remissive = 1
|
||||
if(remissive)
|
||||
if(prob(stage_prob))
|
||||
stage--
|
||||
if(stage == 0)
|
||||
cure()
|
||||
return
|
||||
cure()
|
||||
return
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(prob(5))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
else if(amt_dam_fire <= 0)
|
||||
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
|
||||
target.adjustToxLoss(amt_dam_tox)
|
||||
target.oxyloss += amt_dam_oxy
|
||||
target.adjustOxyLoss(amt_dam_oxy)
|
||||
//disabling
|
||||
target.Weaken(amt_weakened)
|
||||
target.Paralyse(amt_paralysis)
|
||||
|
||||
@@ -680,10 +680,10 @@ var/list/blood_splatter_icons = list()
|
||||
return pass_flags&passflag
|
||||
|
||||
/atom/proc/isinspace()
|
||||
if(istype(get_turf(src), /turf/space))
|
||||
return 1
|
||||
if(isspaceturf(get_turf(src)))
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/atom/proc/handle_fall()
|
||||
return
|
||||
|
||||
@@ -78,10 +78,11 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//helper for getting the appropriate health status UPDATED BY PUCKABOO2 TO INCLUDE NEGATIVES.
|
||||
//helper for getting the appropriate health status
|
||||
/proc/RoundHealth(mob/living/M)
|
||||
if(M.stat == DEAD || (M.status_flags & FAKEDEATH))
|
||||
return "health-100" //what's our health? it doesn't matter, we're dead, or faking
|
||||
return "health-100-dead" //what's our health? it doesn't matter, we're dead, or faking
|
||||
|
||||
var/maxi_health = M.maxHealth
|
||||
if(iscarbon(M) && M.health < 0)
|
||||
maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit.
|
||||
@@ -91,7 +92,7 @@
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
if(95 to 100)
|
||||
return "health95" //For telling patients to eat a warm donk pocket and go on with their shift.
|
||||
return "health95"
|
||||
if(90 to 95)
|
||||
return "health90"
|
||||
if(80 to 90)
|
||||
@@ -127,13 +128,13 @@
|
||||
if(-70 to -60)
|
||||
return "health-60"
|
||||
if(-80 to -70)
|
||||
return "health-70" //Doc?
|
||||
return "health-70"
|
||||
if(-90 to -80)
|
||||
return "health-80" //Hey, doc?
|
||||
return "health-80"
|
||||
if(-100 to -90)
|
||||
return "health-90" //HURRY UP, DOC!
|
||||
return "health-90"
|
||||
else
|
||||
return "health-100" //doc u had 1 job
|
||||
return "health-100" //past this point, you're just in trouble
|
||||
return "0"
|
||||
|
||||
|
||||
@@ -438,4 +439,4 @@
|
||||
if(weedlevel < 1) // You don't want to see these icons if the value is small
|
||||
holder.icon_state = ""
|
||||
return
|
||||
holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]"
|
||||
holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]"
|
||||
@@ -537,7 +537,7 @@
|
||||
occupantData["isViableSubject"] = 0
|
||||
occupantData["health"] = connected.occupant.health
|
||||
occupantData["maxHealth"] = connected.occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD
|
||||
occupantData["uniqueEnzymes"] = connected.occupant.dna.unique_enzymes
|
||||
occupantData["uniqueIdentity"] = connected.occupant.dna.uni_identity
|
||||
occupantData["structuralEnzymes"] = connected.occupant.dna.struc_enzymes
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
// The healing itself - doesn't heal toxin damage
|
||||
// (that's anatomic panacea) and the effectiveness decreases with
|
||||
// each use in a short timespan
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.shock_stage = 0
|
||||
for(var/i in 1 to healing_ticks)
|
||||
if(user)
|
||||
var/healpertick = -(total_healing / healing_ticks)
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.restore_blood()
|
||||
H.traumatic_shock = 0
|
||||
H.shock_stage = 0
|
||||
H.next_pain_time = 0
|
||||
H.dna.species.create_organs(H)
|
||||
// Now that recreating all organs is necessary, the rest of this organ stuff probably
|
||||
@@ -51,6 +49,8 @@
|
||||
IO.rejuvenate()
|
||||
IO.trace_chemicals.Cut()
|
||||
H.remove_all_embedded_objects()
|
||||
for(var/datum/disease/critical/C in user.viruses)
|
||||
C.cure()
|
||||
user.status_flags &= ~(FAKEDEATH)
|
||||
user.updatehealth("revive sting")
|
||||
user.update_blind_effects()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(summoner)
|
||||
var/resulthealth
|
||||
if(iscarbon(summoner))
|
||||
resulthealth = round((abs(config.health_threshold_dead - summoner.health) / abs(config.health_threshold_dead - summoner.maxHealth)) * 100)
|
||||
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - summoner.health) / abs(HEALTH_THRESHOLD_DEAD - summoner.maxHealth)) * 100)
|
||||
else
|
||||
resulthealth = round((summoner.health / summoner.maxHealth) * 100)
|
||||
if(hud_used)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
score_richestjob = E.job
|
||||
score_richestkey = E.key
|
||||
|
||||
dmg_score = E.bruteloss + E.fireloss + E.toxloss + E.oxyloss
|
||||
dmg_score = E.getBruteLoss() + E.getFireLoss() + E.getToxLoss() + E.getOxyLoss()
|
||||
if(dmg_score > score_dmgestdamage)
|
||||
score_dmgestdamage = dmg_score
|
||||
score_dmgestname = E.real_name
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
occupantData["stat"] = occupant.stat
|
||||
occupantData["health"] = occupant.health
|
||||
occupantData["maxHealth"] = occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD
|
||||
occupantData["bruteLoss"] = occupant.getBruteLoss()
|
||||
occupantData["oxyLoss"] = occupant.getOxyLoss()
|
||||
occupantData["toxLoss"] = occupant.getToxLoss()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
var/obj/effect/countdown/clonepod/countdown
|
||||
|
||||
var/list/brine_types = list("corazone", "salbutamol", "hydrocodone")
|
||||
var/list/brine_types = list("corazone", "salbutamol", "epinephrine", "salglu_solution") //stops heart attacks, heart failure, shock, and keeps their O2 levels normal
|
||||
var/list/missing_organs
|
||||
var/organs_number = 0
|
||||
|
||||
@@ -479,7 +479,6 @@
|
||||
occupant.forceMove(get_turf(src))
|
||||
occupant.update_body()
|
||||
domutcheck(occupant) //Waiting until they're out before possible notransform.
|
||||
occupant.shock_stage = 0 //Reset Shock
|
||||
occupant.special_post_clone_handling()
|
||||
occupant = null
|
||||
update_icon()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
occupantData["stat"] = occupant.stat
|
||||
occupantData["health"] = occupant.health
|
||||
occupantData["maxHealth"] = occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD
|
||||
occupantData["bruteLoss"] = occupant.getBruteLoss()
|
||||
occupantData["oxyLoss"] = occupant.getOxyLoss()
|
||||
occupantData["toxLoss"] = occupant.getToxLoss()
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
occupantData["stat"] = occupant.stat
|
||||
occupantData["health"] = occupant.health
|
||||
occupantData["maxHealth"] = occupant.maxHealth
|
||||
occupantData["minHealth"] = config.health_threshold_dead
|
||||
occupantData["minHealth"] = HEALTH_THRESHOLD_DEAD
|
||||
occupantData["bruteLoss"] = occupant.getBruteLoss()
|
||||
occupantData["oxyLoss"] = occupant.getOxyLoss()
|
||||
occupantData["toxLoss"] = occupant.getToxLoss()
|
||||
@@ -378,9 +378,9 @@
|
||||
occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency))
|
||||
if(air_contents.oxygen > 2)
|
||||
if(occupant.getOxyLoss())
|
||||
occupant.adjustOxyLoss(-10)
|
||||
occupant.adjustOxyLoss(-6)
|
||||
else
|
||||
occupant.adjustOxyLoss(-2)
|
||||
occupant.adjustOxyLoss(-1.2)
|
||||
if(beaker && next_trans == 0)
|
||||
var/proportion = 10 * min(1/beaker.volume, 1)
|
||||
// Yes, this means you can get more bang for your buck with a beaker of SF vs a patch
|
||||
@@ -388,7 +388,7 @@
|
||||
beaker.reagents.reaction(occupant, TOUCH, proportion)
|
||||
beaker.reagents.trans_to(occupant, 1, 10)
|
||||
next_trans++
|
||||
if(next_trans == 10)
|
||||
if(next_trans == 17)
|
||||
next_trans = 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
|
||||
|
||||
@@ -1015,13 +1015,16 @@
|
||||
icon_deny = "med-deny"
|
||||
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
|
||||
req_access_txt = "5"
|
||||
products = list(/obj/item/reagent_containers/glass/bottle/charcoal = 4,/obj/item/reagent_containers/glass/bottle/morphine = 4,/obj/item/reagent_containers/glass/bottle/ether = 4,/obj/item/reagent_containers/glass/bottle/epinephrine = 4,
|
||||
/obj/item/reagent_containers/glass/bottle/toxin = 4,/obj/item/reagent_containers/syringe/antiviral = 6,/obj/item/reagent_containers/syringe/insulin = 4,
|
||||
/obj/item/reagent_containers/syringe = 12,/obj/item/healthanalyzer = 5,/obj/item/healthupgrade = 5,/obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/hypospray/safety = 2,
|
||||
/obj/item/reagent_containers/dropper = 2,/obj/item/stack/medical/bruise_pack/advanced = 3, /obj/item/stack/medical/ointment/advanced = 3,
|
||||
/obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 4, /obj/item/sensor_device = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4,
|
||||
/obj/item/pinpointer/crew = 2)
|
||||
contraband = list(/obj/item/reagent_containers/glass/bottle/pancuronium = 1,/obj/item/reagent_containers/glass/bottle/sulfonal = 1)
|
||||
products = list(/obj/item/reagent_containers/syringe = 12, /obj/item/reagent_containers/food/pill/patch/styptic = 10, /obj/item/reagent_containers/food/pill/patch/silver_sulf = 10,
|
||||
/obj/item/reagent_containers/glass/bottle/charcoal = 4, /obj/item/reagent_containers/glass/bottle/epinephrine = 4, /obj/item/reagent_containers/glass/bottle/diphenhydramine = 4,
|
||||
/obj/item/reagent_containers/glass/bottle/salicylic = 4, /obj/item/reagent_containers/glass/bottle/potassium_iodide =3, /obj/item/reagent_containers/glass/bottle/saline = 5,
|
||||
/obj/item/reagent_containers/glass/bottle/morphine = 4, /obj/item/reagent_containers/glass/bottle/ether = 4, /obj/item/reagent_containers/glass/bottle/atropine = 3,
|
||||
/obj/item/reagent_containers/glass/bottle/oculine = 2, /obj/item/reagent_containers/glass/bottle/toxin = 4, /obj/item/reagent_containers/syringe/antiviral = 6,
|
||||
/obj/item/reagent_containers/syringe/insulin = 6, /obj/item/reagent_containers/syringe/calomel = 10, /obj/item/reagent_containers/hypospray/autoinjector = 5, /obj/item/reagent_containers/food/pill/salbutamol = 10,
|
||||
/obj/item/reagent_containers/food/pill/mannitol = 10, /obj/item/reagent_containers/food/pill/mutadone = 5, /obj/item/stack/medical/bruise_pack/advanced = 4, /obj/item/stack/medical/ointment/advanced = 4, /obj/item/stack/medical/bruise_pack = 4,
|
||||
/obj/item/stack/medical/splint = 4, /obj/item/reagent_containers/glass/beaker = 4, /obj/item/reagent_containers/dropper = 4, /obj/item/healthanalyzer = 4,
|
||||
/obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2)
|
||||
contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
//This one's from bay12
|
||||
@@ -1041,7 +1044,7 @@
|
||||
icon_deny = "wallmed-deny"
|
||||
req_access_txt = "5"
|
||||
density = 0 //It is wall-mounted, and thus, not dense. --Superxpdude
|
||||
products = list(/obj/item/stack/medical/bruise_pack = 2,/obj/item/stack/medical/ointment = 2,/obj/item/reagent_containers/hypospray/autoinjector = 4,/obj/item/healthanalyzer = 1)
|
||||
products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, /obj/item/healthanalyzer = 1)
|
||||
contraband = list(/obj/item/reagent_containers/syringe/charcoal = 4,/obj/item/reagent_containers/syringe/antiviral = 4,/obj/item/reagent_containers/food/pill/tox = 1)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/obj/item/handheld_defibrillator
|
||||
name = "handheld defibrillator"
|
||||
desc = "Used to restart stopped hearts."
|
||||
icon = 'icons/goonstation/objects/objects.dmi'
|
||||
lefthand_file = 'icons/goonstation/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/goonstation/mob/inhands/items_righthand.dmi'
|
||||
icon_state = "defib-on"
|
||||
item_state = "defib"
|
||||
|
||||
var/icon_base = "defib"
|
||||
var/cooldown = FALSE
|
||||
var/charge_time = 100
|
||||
var/emagged = FALSE
|
||||
|
||||
/obj/item/handheld_defibrillator/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
emagged = TRUE
|
||||
desc += " The screen only shows the word KILL flashing over and over."
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>you short out the safeties on [src]</span>")
|
||||
else
|
||||
emagged = FALSE
|
||||
desc = "Used to restart stopped hearts."
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You restore the safeties on [src]</span>")
|
||||
|
||||
/obj/item/handheld_defibrillator/emp_act(severity)
|
||||
if(emagged)
|
||||
emagged = FALSE
|
||||
desc = "Used to restart stopped hearts."
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_saftyon.ogg', 50, 0)
|
||||
else
|
||||
emagged = TRUE
|
||||
desc += " The screen only shows the word KILL flashing over and over."
|
||||
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_saftyoff.ogg', 50, 0)
|
||||
|
||||
/obj/item/handheld_defibrillator/attack(mob/living/carbon/human/H, mob/user)
|
||||
if(!istype(H))
|
||||
return ..()
|
||||
|
||||
if(cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] is still charging!</span>")
|
||||
return
|
||||
|
||||
if(emagged || (H.health <= HEALTH_THRESHOLD_CRIT) || (H.undergoing_cardiac_arrest()))
|
||||
user.visible_message("<span class='notice'>[user] shocks [H] with [src].</span>", "<span class='notice'>You shock [H] with [src].</span>")
|
||||
add_attack_logs(user, H, "defibrillated with [src]")
|
||||
playsound(user.loc, "sound/weapons/Egloves.ogg", 75, 1)
|
||||
|
||||
if(H.stat == DEAD)
|
||||
to_chat(user, "<span class='danger'>[H] doesn't respond at all!</span>")
|
||||
else
|
||||
H.set_heartattack(FALSE)
|
||||
var/total_damage = H.getBruteLoss() + H.getFireLoss() + H.getToxLoss()
|
||||
if(H.health <= HEALTH_THRESHOLD_CRIT)
|
||||
if(total_damage >= 90)
|
||||
to_chat(user, "<span class='danger'>[H] looks horribly injured. Resuscitation alone may not help revive them.</span>")
|
||||
if(prob(66))
|
||||
to_chat(user, "<span class='notice'>[H] inhales deeply!</span>")
|
||||
H.adjustOxyLoss(-50)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>[H] doesn't respond!</span>")
|
||||
|
||||
H.AdjustParalysis(3)
|
||||
H.AdjustStunned(5)
|
||||
H.AdjustWeakened(5)
|
||||
H.AdjustStuttering(10)
|
||||
to_chat(H, "<span class='danger'>You feel a powerful jolt!</span>")
|
||||
H.shock_internal_organs(100)
|
||||
|
||||
if(emagged && prob(10))
|
||||
to_chat(user, "<span class='danger'>[src]'s on board scanner indicates that the target is undergoing a cardiac arrest!</span>")
|
||||
H.set_heartattack(TRUE)
|
||||
|
||||
cooldown = TRUE
|
||||
icon_state = "[icon_base]-shock"
|
||||
addtimer(CALLBACK(src, .proc/short_charge), 10)
|
||||
addtimer(CALLBACK(src, .proc/recharge), charge_time)
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src]'s on board medical scanner indicates that no shock is required.</span>")
|
||||
|
||||
/obj/item/handheld_defibrillator/proc/short_charge()
|
||||
icon_state = "[icon_base]-off"
|
||||
|
||||
/obj/item/handheld_defibrillator/proc/recharge()
|
||||
cooldown = FALSE
|
||||
icon_state = "[icon_base]-on"
|
||||
playsound(loc, "sound/weapons/flash.ogg", 75, 1)
|
||||
@@ -125,8 +125,8 @@ REAGENT SCANNER
|
||||
var/mode = 1;
|
||||
|
||||
|
||||
/obj/item/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
|
||||
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/user)
|
||||
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
|
||||
to_chat(user, text("<span class='warning'>You try to analyze the floor's vitals!</span>"))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("<span class='warning'>[user] has analyzed the floor's vitals!</span>"), 1)
|
||||
@@ -137,7 +137,7 @@ REAGENT SCANNER
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>","<span class='notice'> You have analyzed [M]'s vitals.</span>")
|
||||
|
||||
if(!istype(M,/mob/living/carbon/human) || M.isSynthetic())
|
||||
if(!ishuman(M) || M.isSynthetic())
|
||||
//these sensors are designed for organic life
|
||||
user.show_message("<span class='notice'>Analyzing Results for ERROR:\n\t Overall Status: ERROR</span>")
|
||||
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
|
||||
@@ -147,122 +147,132 @@ REAGENT SCANNER
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='red'>-- bpm.</font></span>")
|
||||
return
|
||||
|
||||
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
|
||||
var/OX = M.getOxyLoss() > 50 ? "<b>[M.getOxyLoss()]</b>" : M.getOxyLoss()
|
||||
var/TX = M.getToxLoss() > 50 ? "<b>[M.getToxLoss()]</b>" : M.getToxLoss()
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/fake_oxy = max(rand(1,40), H.getOxyLoss(), (300 - (H.getToxLoss() + H.getFireLoss() + H.getBruteLoss())))
|
||||
var/OX = H.getOxyLoss() > 50 ? "<b>[H.getOxyLoss()]</b>" : H.getOxyLoss()
|
||||
var/TX = H.getToxLoss() > 50 ? "<b>[H.getToxLoss()]</b>" : H.getToxLoss()
|
||||
var/BU = H.getFireLoss() > 50 ? "<b>[H.getFireLoss()]</b>" : H.getFireLoss()
|
||||
var/BR = H.getBruteLoss() > 50 ? "<b>[H.getBruteLoss()]</b>" : H.getBruteLoss()
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
OX = fake_oxy > 50 ? "<b>[fake_oxy]</b>" : fake_oxy
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: dead</span>")
|
||||
user.show_message("<span class='notice'>Analyzing Results for [H]:\n\t Overall Status: dead</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"]</span>")
|
||||
user.show_message("<span class='notice'>Analyzing Results for [H]:\n\t Overall Status: [H.stat > 1 ? "dead" : "[H.health]% healthy"]</span>")
|
||||
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='blue'>[OX]</font> - <font color='green'>[TX]</font> - <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
|
||||
var/tdelta = round(world.time - M.timeofdeath)
|
||||
user.show_message("<span class='notice'>Body Temperature: [H.bodytemperature-T0C]°C ([H.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(H.timeofdeath && (H.stat == DEAD || (H.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death: [station_time_timestamp("hh:mm:ss", H.timeofdeath)]</span>")
|
||||
var/tdelta = round(world.time - H.timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
user.show_message("<span class='danger'>Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!</span>")
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(mode == 1)
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
if(length(damaged) > 0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message("\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
|
||||
|
||||
OX = M.getOxyLoss() > 50 ? "<font color='blue'><b>Severe oxygen deprivation detected</b></font>" : "Subject bloodstream oxygen level normal"
|
||||
TX = M.getToxLoss() > 50 ? "<font color='green'><b>Dangerous amount of toxins detected</b></font>" : "Subject bloodstream toxin level minimal"
|
||||
BU = M.getFireLoss() > 50 ? "<font color='#FFA500'><b>Severe burn damage detected</b></font>" : "Subject burn injury status O.K"
|
||||
BR = M.getBruteLoss() > 50 ? "<font color='red'><b>Severe anatomical damage detected</b></font>" : "Subject brute-force injury status O.K"
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
OX = H.getOxyLoss() > 50 ? "<font color='blue'><b>Severe oxygen deprivation detected</b></font>" : "Subject bloodstream oxygen level normal"
|
||||
TX = H.getToxLoss() > 50 ? "<font color='green'><b>Dangerous amount of toxins detected</b></font>" : "Subject bloodstream toxin level minimal"
|
||||
BU = H.getFireLoss() > 50 ? "<font color='#FFA500'><b>Severe burn damage detected</b></font>" : "Subject burn injury status O.K"
|
||||
BR = H.getBruteLoss() > 50 ? "<font color='red'><b>Severe anatomical damage detected</b></font>" : "Subject brute-force injury status O.K"
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
OX = fake_oxy > 50 ? "<span class='danger'>Severe oxygen deprivation detected</span>" : "<span class='notice'>Subject bloodstream oxygen level normal</span>"
|
||||
user.show_message("[OX] | [TX] | [BU] | [BR]")
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(upgraded)
|
||||
chemscan(user, M)
|
||||
for(var/thing in M.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
user.show_message("<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
|
||||
if(M.getStaminaLoss())
|
||||
|
||||
if(upgraded)
|
||||
chemscan(user, H)
|
||||
for(var/thing in H.viruses)
|
||||
var/datum/disease/D = thing
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
user.show_message("<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
|
||||
if(H.undergoing_cardiac_arrest())
|
||||
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
|
||||
if(heart && !(heart.status & ORGAN_DEAD))
|
||||
user.show_message("<span class='alert'><b>Warning: Medical Emergency detected</b>\nName: Cardiac Arrest.\nType: The patient's heart has stopped.\nStage: 1/1.\nPossible Cure: Electric Shock</span>")
|
||||
else if(heart && (heart.status & ORGAN_DEAD))
|
||||
user.show_message("<span class='alert'><b>Subject's heart is necrotic.</b></span>")
|
||||
else if(!heart)
|
||||
user.show_message("<span class='alert'><b>Subject has no heart.</b></span>")
|
||||
|
||||
if(H.getStaminaLoss())
|
||||
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>")
|
||||
if(M.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if(M.has_brain_worms())
|
||||
if(H.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have [H.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if(H.has_brain_worms())
|
||||
user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
|
||||
else if(M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
|
||||
user.show_message("<span class='warning'>Subject is brain dead.</span>")
|
||||
else if(M.getBrainLoss() >= 60)
|
||||
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if(M.getBrainLoss() >= 10)
|
||||
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>")
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
var/limb = e.name
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED))
|
||||
user.show_message("<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>")
|
||||
if(e.has_infected_wound())
|
||||
user.show_message("<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>")
|
||||
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
for(var/obj/item/organ/external/e in H.bodyparts)
|
||||
if(e.internal_bleeding)
|
||||
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
var/blood_id = H.get_blood_id()
|
||||
if(blood_id)
|
||||
if(H.bleed_rate)
|
||||
user.show_message("<span class='danger'>Subject is bleeding!</span>")
|
||||
var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)
|
||||
var/blood_type = H.b_type
|
||||
if(blood_id != "blood")//special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
else
|
||||
blood_type = blood_id
|
||||
if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
user.show_message("<span class='danger'>LOW blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else if(H.blood_volume <= BLOOD_VOLUME_OKAY)
|
||||
user.show_message("<span class='danger'>CRITICAL blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
if(H.get_int_organ(/obj/item/organ/internal/brain))
|
||||
if(H.getBrainLoss() >= 100)
|
||||
user.show_message("<span class='warning'>Subject is brain dead.</span>")
|
||||
else if(H.getBrainLoss() >= 60)
|
||||
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if(H.getBrainLoss() >= 10)
|
||||
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>")
|
||||
else
|
||||
user.show_message("<span class='warning'>Subject has no brain.</span>")
|
||||
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
var/limb = e.name
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED))
|
||||
user.show_message("<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>")
|
||||
if(e.has_infected_wound())
|
||||
user.show_message("<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>")
|
||||
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
for(var/obj/item/organ/external/e in H.bodyparts)
|
||||
if(e.internal_bleeding)
|
||||
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
var/blood_id = H.get_blood_id()
|
||||
if(blood_id)
|
||||
if(H.bleed_rate)
|
||||
user.show_message("<span class='danger'>Subject is bleeding!</span>")
|
||||
var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)
|
||||
var/blood_type = H.b_type
|
||||
if(blood_id != "blood")//special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
else
|
||||
user.show_message("<span class='info'>Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]</span>")
|
||||
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
user.show_message("<span class='userdanger'>Subject suffering from heart attack: Apply defibrillator immediately.</span>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
var/implant_detect
|
||||
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
|
||||
if(CI.is_robotic())
|
||||
implant_detect += "[H.name] is modified with a [CI.name].<br>"
|
||||
if(implant_detect)
|
||||
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
|
||||
user.show_message("<span class='notice'>[implant_detect]</span>")
|
||||
if(H.gene_stability < 40)
|
||||
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
|
||||
else if(H.gene_stability < 70)
|
||||
user.show_message("<span class='danger'>Subject's genes are showing signs of spontaneous breakdown.</span>")
|
||||
else if(H.gene_stability < 85)
|
||||
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
|
||||
blood_type = blood_id
|
||||
if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY)
|
||||
user.show_message("<span class='danger'>LOW blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else if(H.blood_volume <= BLOOD_VOLUME_OKAY)
|
||||
user.show_message("<span class='danger'>CRITICAL blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>Subject's genes are stable.</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
user.show_message("<span class='info'>Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]</span>")
|
||||
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
var/implant_detect
|
||||
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
|
||||
if(CI.is_robotic())
|
||||
implant_detect += "[H.name] is modified with a [CI.name].<br>"
|
||||
if(implant_detect)
|
||||
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
|
||||
user.show_message("<span class='notice'>[implant_detect]</span>")
|
||||
if(H.gene_stability < 40)
|
||||
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
|
||||
else if(H.gene_stability < 70)
|
||||
user.show_message("<span class='danger'>Subject's genes are showing signs of spontaneous breakdown.</span>")
|
||||
else if(H.gene_stability < 85)
|
||||
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>Subject's genes are stable.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
/obj/item/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
@@ -275,19 +285,21 @@ REAGENT SCANNER
|
||||
if(0)
|
||||
to_chat(usr, "The scanner no longer shows limb damage.")
|
||||
|
||||
/obj/item/healthanalyzer/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/healthupgrade))
|
||||
/obj/item/healthanalyzer/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/healthupgrade))
|
||||
if(upgraded)
|
||||
to_chat(user, "<span class='notice'>You have already installed an upgraded in the [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
|
||||
overlays += "advanced"
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
upgraded = 1
|
||||
qdel(W)
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
upgraded = TRUE
|
||||
qdel(I)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/healthanalyzer/advanced
|
||||
upgraded = 1
|
||||
upgraded = TRUE
|
||||
|
||||
/obj/item/healthanalyzer/advanced/New()
|
||||
overlays += "advanced"
|
||||
@@ -834,4 +846,4 @@ REAGENT SCANNER
|
||||
if(target.disabilities & NEARSIGHTED)
|
||||
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
|
||||
|
||||
return dat
|
||||
return dat
|
||||
@@ -313,7 +313,7 @@
|
||||
|
||||
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
|
||||
var/tobehealed
|
||||
var/threshold = -config.health_threshold_dead
|
||||
var/threshold = -HEALTH_THRESHOLD_DEAD
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(busy)
|
||||
@@ -472,7 +472,7 @@
|
||||
|
||||
/obj/item/borg_defib/attack(mob/M, mob/user)
|
||||
var/tobehealed
|
||||
var/threshold = -config.health_threshold_dead
|
||||
var/threshold = -HEALTH_THRESHOLD_DEAD
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(busy)
|
||||
|
||||
@@ -176,10 +176,6 @@
|
||||
affected_mob.SetSleeping(0)
|
||||
affected_mob.SetSlowed(0)
|
||||
affected_mob.SetConfused(0)
|
||||
if(ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
if(H.traumatic_shock < 100)
|
||||
H.shock_stage = 0
|
||||
stage = 1
|
||||
switch(progenitor.hunger)
|
||||
if(10 to 60)
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
icon_state = "medicalbelt"
|
||||
item_state = "medical"
|
||||
use_item_overlays = 1
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(
|
||||
/obj/item/healthanalyzer,
|
||||
/obj/item/dnainjector,
|
||||
@@ -133,6 +134,7 @@
|
||||
/obj/item/rad_laser,
|
||||
/obj/item/sensor_device,
|
||||
/obj/item/wrench/medical,
|
||||
/obj/item/handheld_defibrillator
|
||||
)
|
||||
|
||||
/obj/item/storage/belt/medical/surgery
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
new /obj/item/radio/headset/headset_med(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/clothing/glasses/hud/health(src)
|
||||
new /obj/item/clothing/shoes/sandal/white(src)
|
||||
@@ -184,6 +185,7 @@
|
||||
new /obj/item/radio/headset/heads/cmo(src)
|
||||
new /obj/item/clothing/gloves/color/latex/nitrile(src)
|
||||
new /obj/item/defibrillator/compact/loaded(src)
|
||||
new /obj/item/handheld_defibrillator(src)
|
||||
new /obj/item/storage/belt/medical(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/reagent_containers/hypospray/CMO(src)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/var/suiciding = 0
|
||||
|
||||
/mob/living/carbon/human/proc/do_suicide(damagetype, byitem)
|
||||
var/threshold = (config.health_threshold_crit + config.health_threshold_dead) / 2
|
||||
var/threshold = check_death_method() ? ((HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) / 2) : (HEALTH_THRESHOLD_DEAD - 50)
|
||||
var/dmgamt = maxHealth - threshold
|
||||
|
||||
var/damage_mod = 1
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
### HEALTH ###
|
||||
## level of health at which a mob becomes unconscious (crit)
|
||||
HEALTH_THRESHOLD_CRIT -50
|
||||
|
||||
## level of health at which a mob becomes dead
|
||||
HEALTH_THRESHOLD_DEAD -100
|
||||
|
||||
## Determines whether bones can be broken through excessive damage to the organ
|
||||
## 0 means bones can't break, 1 means they can
|
||||
BONES_CAN_BREAK 1
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1002 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 142 KiB |
@@ -278,6 +278,7 @@
|
||||
#include "code\datums\diseases\brainrot.dm"
|
||||
#include "code\datums\diseases\cold.dm"
|
||||
#include "code\datums\diseases\cold9.dm"
|
||||
#include "code\datums\diseases\critical.dm"
|
||||
#include "code\datums\diseases\fake_gbs.dm"
|
||||
#include "code\datums\diseases\flu.dm"
|
||||
#include "code\datums\diseases\fluspanish.dm"
|
||||
@@ -830,6 +831,7 @@
|
||||
#include "code\game\objects\items\devices\flash.dm"
|
||||
#include "code\game\objects\items\devices\flashlight.dm"
|
||||
#include "code\game\objects\items\devices\floor_painter.dm"
|
||||
#include "code\game\objects\items\devices\handheld_defib.dm"
|
||||
#include "code\game\objects\items\devices\instruments.dm"
|
||||
#include "code\game\objects\items\devices\laserpointer.dm"
|
||||
#include "code\game\objects\items\devices\lightreplacer.dm"
|
||||
@@ -1734,7 +1736,6 @@
|
||||
#include "code\modules\mob\living\carbon\human\logout.dm"
|
||||
#include "code\modules\mob\living\carbon\human\npcs.dm"
|
||||
#include "code\modules\mob\living\carbon\human\say.dm"
|
||||
#include "code\modules\mob\living\carbon\human\shock.dm"
|
||||
#include "code\modules\mob\living\carbon\human\status_procs.dm"
|
||||
#include "code\modules\mob\living\carbon\human\update_icons.dm"
|
||||
#include "code\modules\mob\living\carbon\human\update_stat.dm"
|
||||
|
||||
@@ -468,6 +468,7 @@
|
||||
"prions",
|
||||
"spidereggs",
|
||||
"concentrated_initro",
|
||||
"heartworms"
|
||||
"heartworms",
|
||||
"bacon_grease"
|
||||
]
|
||||
}
|
||||
|
||||