Merge pull request #3022 from VOREStation/infections

Infection code improvement
This commit is contained in:
Anewbe
2017-03-02 19:54:26 -06:00
committed by GitHub
18 changed files with 310 additions and 68 deletions

View File

@@ -333,6 +333,8 @@
organStatus["splinted"] = 1 organStatus["splinted"] = 1
if(E.status & ORGAN_BLEEDING) if(E.status & ORGAN_BLEEDING)
organStatus["bleeding"] = 1 organStatus["bleeding"] = 1
if(E.status & ORGAN_DEAD)
organStatus["dead"] = 1
organData["status"] = organStatus organData["status"] = organStatus
@@ -478,6 +480,7 @@
var/splint = "" var/splint = ""
var/internal_bleeding = "" var/internal_bleeding = ""
var/lung_ruptured = "" var/lung_ruptured = ""
var/o_dead = ""
for(var/datum/wound/W in e.wounds) if(W.internal) for(var/datum/wound/W in e.wounds) if(W.internal)
internal_bleeding = "<br>Internal bleeding" internal_bleeding = "<br>Internal bleeding"
break break
@@ -491,6 +494,8 @@
AN = "[e.broken_description]:" AN = "[e.broken_description]:"
if(e.status & ORGAN_ROBOT) if(e.status & ORGAN_ROBOT)
robot = "Prosthetic:" robot = "Prosthetic:"
if(e.status & ORGAN_DEAD)
o_dead = "Necrotic:"
if(e.open) if(e.open)
open = "Open:" open = "Open:"
switch (e.germ_level) switch (e.germ_level)
@@ -504,10 +509,10 @@
infected = "Acute Infection:" infected = "Acute Infection:"
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
infected = "Acute Infection+:" infected = "Acute Infection+:"
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400) if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_THREE - 50)
infected = "Acute Infection++:" infected = "Acute Infection++:"
if (INFECTION_LEVEL_THREE to INFINITY) if (INFECTION_LEVEL_THREE -49 to INFINITY)
infected = "Septic:" infected = "Gangrene Detected:"
var/unknown_body = 0 var/unknown_body = 0
for(var/I in e.implants) for(var/I in e.implants)
@@ -521,19 +526,22 @@
if(!AN && !open && !infected & !imp) if(!AN && !open && !infected & !imp)
AN = "None:" AN = "None:"
if(!(e.status & ORGAN_DESTROYED)) if(!(e.status & ORGAN_DESTROYED))
dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>" dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured][o_dead]</td>"
else else
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not Found</td>" dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not Found</td>"
dat += "</tr>" dat += "</tr>"
for(var/obj/item/organ/i in occupant.internal_organs) for(var/obj/item/organ/i in occupant.internal_organs)
var/mech = "" var/mech = ""
var/i_dead = ""
if(i.status & ORGAN_ASSISTED) if(i.status & ORGAN_ASSISTED)
mech = "Assisted:" mech = "Assisted:"
if(i.robotic >= ORGAN_ROBOT) if(i.robotic >= ORGAN_ROBOT)
mech = "Mechanical:" mech = "Mechanical:"
if(i.status & ORGAN_DEAD)
i_dead = "Necrotic:"
var/infection = "None" var/infection = "None"
switch (i.germ_level) switch (i.germ_level)
if (1 to INFECTION_LEVEL_ONE + 200) if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
infection = "Mild Infection:" infection = "Mild Infection:"
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
infection = "Mild Infection+:" infection = "Mild Infection+:"
@@ -543,11 +551,13 @@
infection = "Acute Infection:" infection = "Acute Infection:"
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
infection = "Acute Infection+:" infection = "Acute Infection+:"
if (INFECTION_LEVEL_TWO + 300 to INFINITY) if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_THREE - 50)
infection = "Acute Infection++:" infection = "Acute Infection++:"
if (INFECTION_LEVEL_THREE -49 to INFINITY)
infection = "Necrosis Detected:"
dat += "<tr>" dat += "<tr>"
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>" dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech][i_dead]</td><td></td>"
dat += "</tr>" dat += "</tr>"
dat += "</table>" dat += "</table>"
if(occupant.sdisabilities & BLIND) if(occupant.sdisabilities & BLIND)

View File

@@ -361,6 +361,11 @@
if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED)) if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] is dented and swollen!</span><br>" wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] is dented and swollen!</span><br>"
if(temp.germ_level > INFECTION_LEVEL_TWO && !(temp.status & ORGAN_DEAD))
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks very infected!</span><br>"
else if(temp.status & ORGAN_DEAD)
wound_flavor_text["[temp.name]"] += "<span class='warning'>[T.His] [temp.name] looks rotten!</span><br>"
if(!wound_flavor_text["[temp.name]"] && (temp.status & ORGAN_BLEEDING)) if(!wound_flavor_text["[temp.name]"] && (temp.status & ORGAN_BLEEDING))
is_bleeding["[temp.name]"] = "<span class='danger'>[T.His] [temp.name] is bleeding!</span><br>" is_bleeding["[temp.name]"] = "<span class='danger'>[T.His] [temp.name] is bleeding!</span><br>"

View File

@@ -17,6 +17,8 @@
var/damage_this_tick = getToxLoss() var/damage_this_tick = getToxLoss()
for(var/obj/item/organ/external/O in organs) for(var/obj/item/organ/external/O in organs)
damage_this_tick += O.burn_dam + O.brute_dam damage_this_tick += O.burn_dam + O.brute_dam
if(O.germ_level)
damage_this_tick += 1 //Just tap it if we have germs so we can process those
if(damage_this_tick > last_dam) if(damage_this_tick > last_dam)
. = TRUE . = TRUE

View File

@@ -24,6 +24,19 @@
/obj/item/organ/internal/brain/digitize() /obj/item/organ/internal/brain/digitize()
replace_self_with(/obj/item/organ/internal/mmi_holder/robot) replace_self_with(/obj/item/organ/internal/mmi_holder/robot)
/obj/item/organ/internal/brain/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Bacterial meningitis (more of a spine thing but 'brain infection' isn't a common thing)
if (. >= 1)
if(prob(1))
owner.custom_pain("Your neck aches, and feels very stiff!",0)
if (. >= 2)
if(prob(1))
owner.custom_pain("Your feel very dizzy for a moment!",0)
owner.confused = max(owner.confused, 2)
/obj/item/organ/internal/brain/proc/replace_self_with(replace_path) /obj/item/organ/internal/brain/proc/replace_self_with(replace_path)
var/mob/living/carbon/human/tmp_owner = owner var/mob/living/carbon/human/tmp_owner = owner
qdel(src) qdel(src)

View File

@@ -67,9 +67,22 @@
/obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var. /obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var.
..() ..()
if(!owner) if(!owner) return
return
if(is_bruised()) if(is_bruised())
owner.eye_blurry = 20 owner.eye_blurry = 20
if(is_broken()) if(is_broken())
owner.eye_blind = 20 owner.eye_blind = 20
/obj/item/organ/internal/eyes/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Conjunctivitis
if (. >= 1)
if(prob(1))
owner.custom_pain("The corners of your eyes itch! It's quite frustrating.",0)
if (. >= 2)
if(prob(1))
owner.custom_pain("Your eyes are watering, making it harder to see clearly for a moment.",1)
owner.eye_blurry += 10

View File

@@ -6,3 +6,17 @@
organ_tag = O_HEART organ_tag = O_HEART
parent_organ = BP_TORSO parent_organ = BP_TORSO
dead_icon = "heart-off" dead_icon = "heart-off"
/obj/item/organ/internal/heart/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Endocarditis (very rare, usually for artificially implanted heart valves/pacemakers)
if (. >= 1)
if(prob(1))
owner.custom_pain("Your chest feels uncomfortably tight!",0)
if (. >= 2)
if(prob(1))
owner.custom_pain("A stabbing pain rolls through your chest!",1)
owner.apply_damage(damage = 25, damagetype = HALLOSS, def_zone = parent_organ)

View File

@@ -8,11 +8,8 @@
parent_organ = BP_GROIN parent_organ = BP_GROIN
/obj/item/organ/internal/kidneys/process() /obj/item/organ/internal/kidneys/process()
..() ..()
if(!owner) return
if(!owner)
return
// Coffee is really bad for you with busted kidneys. // Coffee is really bad for you with busted kidneys.
// This should probably be expanded in some way, but fucked if I know // This should probably be expanded in some way, but fucked if I know
@@ -23,3 +20,17 @@
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
else if(is_broken()) else if(is_broken())
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
/obj/item/organ/internal/kidneys/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Pyelonephritis
if (. >= 1)
if(prob(1))
owner.custom_pain("There's a stabbing pain in your lower back!",1)
if (. >= 2)
if(prob(1))
owner.custom_pain("You feel extremely tired, like you can't move!",1)
owner.m_intent = "walk"
owner.hud_used.move_intent.icon_state = "walking"

View File

@@ -7,18 +7,8 @@
parent_organ = BP_GROIN parent_organ = BP_GROIN
/obj/item/organ/internal/liver/process() /obj/item/organ/internal/liver/process()
..() ..()
if(!owner) return
if(!owner)
return
if (germ_level > INFECTION_LEVEL_ONE)
if(prob(1))
owner << "<span class='danger'>Your skin itches.</span>"
if (germ_level > INFECTION_LEVEL_TWO)
if(prob(1))
spawn owner.vomit()
if(owner.life_tick % PROCESS_ACCURACY == 0) if(owner.life_tick % PROCESS_ACCURACY == 0)
@@ -53,3 +43,16 @@
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY) owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
else else
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them
/obj/item/organ/internal/liver/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Pyogenic Abscess
if (. >= 1)
if(prob(1))
owner.custom_pain("There's a sharp pain in your upper-right abdomen!",1)
if (. >= 2)
if(prob(1) && owner.getToxLoss() < owner.maxHealth*0.3)
//owner << "" //Toxins provide their own messages for pain
owner.adjustToxLoss(5) //Not realistic to PA but there are basically no 'real' liver infections

View File

@@ -13,10 +13,6 @@
if(!owner) if(!owner)
return return
if (germ_level > INFECTION_LEVEL_ONE)
if(prob(5))
owner.emote("cough") //respitory tract infection
if(is_bruised()) if(is_bruised())
if(prob(4)) if(prob(4))
spawn owner.emote("me", 1, "coughs up blood!") spawn owner.emote("me", 1, "coughs up blood!")
@@ -30,3 +26,16 @@
if(istype(parent)) if(istype(parent))
owner.custom_pain("You feel a stabbing pain in your [parent.name]!", 1) owner.custom_pain("You feel a stabbing pain in your [parent.name]!", 1)
bruise() bruise()
/obj/item/organ/internal/lungs/handle_germ_effects()
. = ..() //Up should return an infection level as an integer
if(!.) return
//Bacterial pneumonia
if (. >= 1)
if(prob(5))
owner.emote("cough")
if (. >= 2)
if(prob(1))
owner.custom_pain("You suddenly feel short of breath and take a sharp, painful breath!",1)
owner.adjustOxyLoss(30) //Look it's hard to simulate low O2 perfusion okay

View File

@@ -48,3 +48,15 @@
dead_icon = "[initial(dead_icon)]_assisted" dead_icon = "[initial(dead_icon)]_assisted"
// Brain is defined in brain.dm // Brain is defined in brain.dm
/obj/item/organ/internal/handle_germ_effects()
. = ..() //Should be an interger value for infection level
if(!.) return
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
if(. >= 2 && antibiotics < 5) //INFECTION_LEVEL_TWO
if (prob(3))
take_damage(1,silent=prob(30))
//if(. >= 3 && antibiotics < 30) //INFECTION_LEVEL_THREE, others are handled on each specific organ
//Nothing that generic internal organs do for this

View File

@@ -139,8 +139,16 @@ var/list/organ_cache = list()
/obj/item/organ/proc/handle_germ_effects() /obj/item/organ/proc/handle_germ_effects()
//** Handle the effects of infections //** Handle the effects of infections
if(robotic >= ORGAN_ROBOT) //Just in case!
germ_level = 0
return 0
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
if((status & ORGAN_DEAD) && antibiotics < 30) //Sepsis from 'dead' organs
var/sepsis_severity = 1 + round((germ_level - INFECTION_LEVEL_THREE)/200,0.25) //1 Tox plus a little based on germ level
owner.adjustToxLoss(sepsis_severity)
if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30)) if (germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
germ_level-- germ_level--
@@ -150,17 +158,20 @@ var/list/organ_cache = list()
germ_level++ germ_level++
if(germ_level >= INFECTION_LEVEL_ONE) if(germ_level >= INFECTION_LEVEL_ONE)
var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 5)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.species.body_temperature . = 1 //Organ qualifies for effect-specific processing
owner.bodytemperature += between(0, (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature) //var/fever_temperature = (owner.species.heat_level_1 - owner.species.body_temperature - 5)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.species.body_temperature
//owner.bodytemperature += between(0, (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
var/fever_temperature = owner.species.heat_discomfort_level * 1.10 //Heat discomfort level plus 10%
if(owner.bodytemperature < fever_temperature)
owner.bodytemperature += min(0.2,(fever_temperature - owner.bodytemperature) / 10) //Will usually climb by 0.2, else 10% of the difference if less
if (germ_level >= INFECTION_LEVEL_TWO) if (germ_level >= INFECTION_LEVEL_TWO)
var/obj/item/organ/external/parent = owner.get_organ(parent_organ) . = 2 //Organ qualifies for effect-specific processing
//spread germs //No particular effect on the general 'organ' at 3
if (antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
parent.germ_level++
if (prob(3)) //about once every 30 seconds if (germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30)
take_damage(1,silent=prob(30)) . = 3 //Organ qualifies for effect-specific processing
germ_level++ //Germ_level increases without overdose of antibiotics
/obj/item/organ/proc/handle_rejection() /obj/item/organ/proc/handle_rejection()
// Process unsuitable transplants. TODO: consider some kind of // Process unsuitable transplants. TODO: consider some kind of

View File

@@ -622,13 +622,12 @@ Note that amputating the affected organ does in fact remove the infection from t
break //limit increase to a maximum of one per second break //limit increase to a maximum of one per second
/obj/item/organ/external/handle_germ_effects() /obj/item/organ/external/handle_germ_effects()
. = ..() //May be null or an infection level, if null then no specific processing needed here
if(germ_level < INFECTION_LEVEL_TWO) if(!.) return
return ..()
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin") var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
if(germ_level >= INFECTION_LEVEL_TWO) if(. >= 2 && antibiotics < 5) //INFECTION_LEVEL_TWO
//spread the infection to internal organs //spread the infection to internal organs
var/obj/item/organ/target_organ = null //make internal organs become infected one at a time instead of all at once var/obj/item/organ/target_organ = null //make internal organs become infected one at a time instead of all at once
for (var/obj/item/organ/I in internal_organs) for (var/obj/item/organ/I in internal_organs)
@@ -660,14 +659,13 @@ Note that amputating the affected organ does in fact remove the infection from t
if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) if (parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
parent.germ_level++ parent.germ_level++
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections if(. >= 3 && antibiotics < 30) //INFECTION_LEVEL_THREE
if (!(status & ORGAN_DEAD)) if (!(status & ORGAN_DEAD))
status |= ORGAN_DEAD status |= ORGAN_DEAD
owner << "<span class='notice'>You can't feel your [name] anymore...</span>" owner << "<span class='notice'>You can't feel your [name] anymore...</span>"
owner.update_body(1) owner.update_body(1)
for (var/obj/item/organ/external/child in children)
germ_level++ child.germ_level += 110 //Burst of infection from a parent organ becoming necrotic
owner.adjustToxLoss(1)
//Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections //Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections
/obj/item/organ/external/proc/update_wounds() /obj/item/organ/external/proc/update_wounds()

View File

@@ -27,6 +27,7 @@
vital = 1 vital = 1
var/brain_type = /obj/item/device/mmi var/brain_type = /obj/item/device/mmi
var/obj/item/device/mmi/stored_mmi var/obj/item/device/mmi/stored_mmi
robotic = ORGAN_ASSISTED
/obj/item/organ/internal/mmi_holder/Destroy() /obj/item/organ/internal/mmi_holder/Destroy()
if(stored_mmi && (stored_mmi.loc == src)) if(stored_mmi && (stored_mmi.loc == src))
@@ -84,7 +85,7 @@
/obj/item/organ/internal/mmi_holder/posibrain /obj/item/organ/internal/mmi_holder/posibrain
name = "positronic brain interface" name = "positronic brain interface"
brain_type = /obj/item/device/mmi/digital/posibrain brain_type = /obj/item/device/mmi/digital/posibrain
robotic = ORGAN_ROBOT
/obj/item/organ/internal/mmi_holder/posibrain/update_from_mmi() /obj/item/organ/internal/mmi_holder/posibrain/update_from_mmi()
..() ..()
@@ -94,6 +95,7 @@
/obj/item/organ/internal/mmi_holder/robot /obj/item/organ/internal/mmi_holder/robot
name = "digital brain interface" name = "digital brain interface"
brain_type = /obj/item/device/mmi/digital/robot brain_type = /obj/item/device/mmi/digital/robot
robotic = ORGAN_ROBOT
/obj/item/organ/internal/mmi_holder/robot/update_from_mmi() /obj/item/organ/internal/mmi_holder/robot/update_from_mmi()
..() ..()

View File

@@ -28,6 +28,19 @@
// Give them a new cell. // Give them a new cell.
owner.internal_organs_by_name["cell"] = new /obj/item/organ/internal/cell(owner,1) owner.internal_organs_by_name["cell"] = new /obj/item/organ/internal/cell(owner,1)
/obj/item/organ/external/chest/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for CHEST
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
/obj/item/organ/external/groin /obj/item/organ/external/groin
name = "lower body" name = "lower body"
organ_tag = BP_GROIN organ_tag = BP_GROIN
@@ -45,6 +58,19 @@
cannot_amputate = 1 cannot_amputate = 1
organ_rel_size = 30 organ_rel_size = 30
/obj/item/organ/external/groin/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for GROIN
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
/obj/item/organ/external/arm /obj/item/organ/external/arm
organ_tag = "l_arm" organ_tag = "l_arm"
name = "left arm" name = "left arm"
@@ -60,6 +86,23 @@
force = 7 force = 7
throwforce = 10 throwforce = 10
/obj/item/organ/external/arm/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for ARM
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
if(organ_tag == "l_arm") //Specific level 2 'feature
owner.drop_l_hand()
else if(organ_tag == "r_arm")
owner.drop_r_hand()
/obj/item/organ/external/arm/right /obj/item/organ/external/arm/right
organ_tag = "r_arm" organ_tag = "r_arm"
name = "right arm" name = "right arm"
@@ -84,6 +127,20 @@
force = 10 force = 10
throwforce = 12 throwforce = 12
/obj/item/organ/external/leg/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for LEG
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.Weaken(5)
/obj/item/organ/external/leg/right /obj/item/organ/external/leg/right
organ_tag = "r_leg" organ_tag = "r_leg"
name = "right leg" name = "right leg"
@@ -114,6 +171,20 @@
owner.drop_from_inventory(owner.shoes) owner.drop_from_inventory(owner.shoes)
..() ..()
/obj/item/organ/external/foot/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for FOOT
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.Weaken(5)
/obj/item/organ/external/foot/right /obj/item/organ/external/foot/right
organ_tag = "r_foot" organ_tag = "r_foot"
name = "right foot" name = "right foot"
@@ -146,6 +217,23 @@
owner.drop_from_inventory(owner.gloves) owner.drop_from_inventory(owner.gloves)
..() ..()
/obj/item/organ/external/hand/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for HAND
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
if(organ_tag == "l_hand") //Specific level 2 'feature
owner.drop_l_hand()
else if(organ_tag == "r_hand")
owner.drop_r_hand()
/obj/item/organ/external/hand/right /obj/item/organ/external/hand/right
organ_tag = "r_hand" organ_tag = "r_hand"
name = "right hand" name = "right hand"
@@ -202,6 +290,20 @@
if (burn_dam > 40) if (burn_dam > 40)
disfigure("burn") disfigure("burn")
/obj/item/organ/external/head/handle_germ_effects()
. = ..() //Should return an infection level
if(!. || (status & ORGAN_DEAD)) return //If it's already above 2, it's become necrotic and we can just not worry about it.
//Staph infection symptoms for HEAD
if (. >= 1)
if(prob(.))
owner.custom_pain("Your [name] [pick("aches","itches","throbs")]!",0)
if (. >= 2)
if(prob(.))
owner.custom_pain("A jolt of pain surges through your [name]!",1)
owner.eye_blurry += 20 //Specific level 2 'feature
/obj/item/organ/external/head/skrell /obj/item/organ/external/head/skrell
eye_icon = "skrell_eyes_s" eye_icon = "skrell_eyes_s"

View File

@@ -12,13 +12,6 @@
slot_flags = SLOT_EARS slot_flags = SLOT_EARS
volume = 5 volume = 5
/obj/item/weapon/reagent_containers/dropper/do_surgery(mob/living/carbon/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
return ..()
afterattack(M, user, 1)
return 1
/obj/item/weapon/reagent_containers/dropper/afterattack(var/obj/target, var/mob/user, var/proximity) /obj/item/weapon/reagent_containers/dropper/afterattack(var/obj/target, var/mob/user, var/proximity)
if(!target.reagents || !proximity) return if(!target.reagents || !proximity) return

View File

@@ -146,8 +146,6 @@
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
if (trans > 0) if (trans > 0)
if(container.reagents.has_reagent("peridaxon"))
affected.status &= ~ORGAN_DEAD affected.status &= ~ORGAN_DEAD
affected.owner.update_body(1) affected.owner.update_body(1)

View File

@@ -0,0 +1,38 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: Arokha
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Infections now spread and process properly between external organs."
- rscadd: "Infections now have appropriate symptoms that indicate to a player that they have one."
- rscadd: "Infections are now diagnosable more accurately in a medscanner, or visually for high level infections or dead limbs."

View File

@@ -169,13 +169,21 @@ Used In File(s): \code\game\machinery\adv_med.dm
Acute Infection Acute Infection
{{else value.germ_level < 800}} {{else value.germ_level < 800}}
Acute Infection+ Acute Infection+
{{else value.germ_level < 900}} {{else value.germ_level < 950}}
Acute Infection++ Acute Infection++
{{else value.germ_level >= 900}} {{else value.germ_level >= 950}}
Septic Gangrene Detected
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
{{if value.status.dead}}
<div class="itemLabelWide">
&nbsp;Necrosis
</div>
<div class="itemContentNarrow">
Necrotic Tissue Present
</div>
{{/if}}
{{if value.open}} {{if value.open}}
<div class="itemLabelWider"> <div class="itemLabelWider">
&nbsp;Operation Status &nbsp;Operation Status
@@ -225,10 +233,10 @@ Used In File(s): \code\game\machinery\adv_med.dm
Acute Infection Acute Infection
{{else value.germ_level < 800}} {{else value.germ_level < 800}}
Acute Infection+ Acute Infection+
{{else value.germ_level < 900}} {{else value.germ_level < 950}}
Acute Infection++ Acute Infection++
{{else value.germ_level >= 900}} {{else value.germ_level >= 950}}
Septic Necrosis Detected
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}