mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Splits organs into organ/internal (#7441)
This commit is contained in:
@@ -72,8 +72,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
B.volume += chem_effects[CE_BLOODRESTORE]
|
||||
|
||||
//The heartfix to end all heartfixes
|
||||
if(species && species.has_organ["heart"])
|
||||
var/obj/item/organ/heart/heart = internal_organs_by_name["heart"]
|
||||
if(species && species.has_organ[BP_HEART])
|
||||
var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART]
|
||||
// Before we do that, we check for lifesupport.
|
||||
var/onlifesupport = 0
|
||||
if (buckled && istype(buckled, /obj/machinery/optable/lifesupport))
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/****************************************************
|
||||
INTERNAL ORGANS DEFINES
|
||||
****************************************************/
|
||||
/obj/item/organ/internal
|
||||
var/dead_icon // Icon to use when the organ has died.
|
||||
var/damage_reduction = 0.5 //modifier for internal organ injury
|
||||
|
||||
min_broken_damage = 10 //Internal organs are frail, man.
|
||||
|
||||
/obj/item/organ/internal/Destroy()
|
||||
if(owner)
|
||||
owner.internal_organs.Remove(src)
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
while(null in owner.internal_organs)
|
||||
owner.internal_organs -= null
|
||||
var/obj/item/organ/external/E = owner.organs_by_name[parent_organ]
|
||||
if(istype(E)) E.internal_organs -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target, var/obj/item/organ/external/affected)
|
||||
if(!istype(target))
|
||||
return 0
|
||||
|
||||
if(status & ORGAN_CUT_AWAY)
|
||||
return 0 //organs don't work very well in the body when they aren't properly attached
|
||||
|
||||
// robotic organs emulate behavior of the equivalent flesh organ of the species
|
||||
if(BP_IS_ROBOTIC(src) || !species)
|
||||
species = target.species
|
||||
|
||||
..()
|
||||
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
target.internal_organs |= src
|
||||
affected.internal_organs |= src
|
||||
target.internal_organs_by_name[organ_tag] = src
|
||||
return 1
|
||||
|
||||
/obj/item/organ/internal/die()
|
||||
..()
|
||||
if((status & ORGAN_DEAD) && dead_icon)
|
||||
icon_state = dead_icon
|
||||
|
||||
/obj/item/organ/internal/proc/is_usable()
|
||||
return ..() && !is_broken()
|
||||
|
||||
/obj/item/organ/internal/robotize()
|
||||
..()
|
||||
min_bruised_damage += 5
|
||||
min_broken_damage += 10
|
||||
|
||||
/obj/item/organ/internal/proc/getToxLoss()
|
||||
if(BP_IS_ROBOTIC(src))
|
||||
return damage * 0.5
|
||||
return damage
|
||||
|
||||
/obj/item/organ/internal/proc/set_max_damage(var/ndamage)
|
||||
max_damage = Floor(ndamage)
|
||||
min_broken_damage = Floor(0.75 * max_damage)
|
||||
min_bruised_damage = Floor(0.25 * max_damage)
|
||||
|
||||
/obj/item/organ/internal/proc/take_internal_damage(amount, var/silent=0)
|
||||
if(BP_IS_ROBOTIC(src))
|
||||
damage = between(0, src.damage + (amount * 0.8), max_damage)
|
||||
else
|
||||
damage = between(0, src.damage + amount, max_damage)
|
||||
|
||||
//only show this if the organ is not robotic
|
||||
if(owner && can_feel_pain() && parent_organ && (amount > 5 || prob(10)))
|
||||
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
||||
if(parent && !silent)
|
||||
var/degree = ""
|
||||
if(is_bruised())
|
||||
degree = " a lot"
|
||||
if(damage < 5)
|
||||
degree = " a bit"
|
||||
owner.custom_pain("Something inside your [parent.name] hurts[degree].", amount, affecting = parent)
|
||||
|
||||
/obj/item/organ/internal/proc/get_visible_state()
|
||||
if(damage > max_damage)
|
||||
. = "bits and pieces of a destroyed "
|
||||
else if(is_broken())
|
||||
. = "broken "
|
||||
else if(is_bruised())
|
||||
. = "badly damaged "
|
||||
else if(damage > 5)
|
||||
. = "damaged "
|
||||
if(status & ORGAN_DEAD)
|
||||
if(can_recover())
|
||||
. = "decaying [.]"
|
||||
else
|
||||
. = "necrotic [.]"
|
||||
. = "[.][name]"
|
||||
|
||||
/obj/item/organ/internal/process()
|
||||
..()
|
||||
handle_regeneration()
|
||||
|
||||
/obj/item/organ/internal/proc/heal_damage(amount)
|
||||
if (can_recover())
|
||||
damage = between(0, damage - round(amount, 0.1), max_damage)
|
||||
|
||||
/obj/item/organ/internal/proc/handle_regeneration()
|
||||
if(!damage || BP_IS_ROBOTIC(src) || !owner || owner.chem_effects[CE_TOXIN])
|
||||
return
|
||||
if(damage < 0.1*max_damage)
|
||||
heal_damage(0.02)
|
||||
@@ -0,0 +1,17 @@
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
parent_organ = BP_GROIN
|
||||
organ_tag = "appendix"
|
||||
|
||||
/obj/item/organ/appendix/removed()
|
||||
if(owner)
|
||||
var/inflamed = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
||||
inflamed = 1
|
||||
appendicitis.cure()
|
||||
owner.resistances += appendicitis
|
||||
if(inflamed)
|
||||
icon_state = "appendixinflamed"
|
||||
name = "inflamed appendix"
|
||||
..()
|
||||
@@ -0,0 +1,37 @@
|
||||
/obj/item/organ/internal/eyes
|
||||
name = "eyeballs"
|
||||
icon_state = "eyes"
|
||||
gender = PLURAL
|
||||
organ_tag = BP_EYES
|
||||
parent_organ = BP_HEAD
|
||||
robotic_name = "visual prosthesis"
|
||||
robotic_sprite = "eyes-prosthetic"
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
var/singular_name = "eye"
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
eye_colour = list(
|
||||
owner.r_eyes ? owner.r_eyes : 0,
|
||||
owner.g_eyes ? owner.g_eyes : 0,
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
/obj/item/organ/internal/eyes/take_damage(amount, var/silent=0)
|
||||
var/oldbroken = is_broken()
|
||||
..()
|
||||
if(is_broken() && !oldbroken && owner && !owner.stat)
|
||||
to_chat(owner, "<span class='danger'>You go blind!</span>")
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/flash_act()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
if(!owner)
|
||||
return
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
@@ -0,0 +1,15 @@
|
||||
/obj/item/organ/internal/heart
|
||||
name = "heart"
|
||||
icon_state = "heart-on"
|
||||
organ_tag = BP_HEART
|
||||
parent_organ = BP_CHEST
|
||||
dead_icon = "heart-off"
|
||||
robotic_name = "circulatory pump"
|
||||
robotic_sprite = "heart-prosthetic"
|
||||
|
||||
/obj/item/organ/internal/heart/process()
|
||||
//Check if we're on lifesupport, and whether or not organs should be processing.
|
||||
if(owner && owner.isonlifesupport())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -0,0 +1,25 @@
|
||||
/obj/item/organ/internal/kidneys
|
||||
name = "kidneys"
|
||||
icon_state = "kidneys"
|
||||
gender = PLURAL
|
||||
organ_tag = BP_KIDNEYS
|
||||
parent_organ = BP_GROIN
|
||||
robotic_name = "prosthetic kidneys"
|
||||
robotic_sprite = "kidneys-prosthetic"
|
||||
|
||||
/obj/item/organ/internal/kidneys/process()
|
||||
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
// Coffee is really bad for you with busted kidneys.
|
||||
// This should probably be expanded in some way, but fucked if I know
|
||||
// what else kidneys can process in our reagent list.
|
||||
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list
|
||||
if(coffee)
|
||||
if(is_bruised())
|
||||
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
||||
else if(is_broken())
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
@@ -0,0 +1,78 @@
|
||||
/obj/item/organ/internal/liver
|
||||
name = "liver"
|
||||
icon_state = "liver"
|
||||
organ_tag = BP_LIVER
|
||||
parent_organ = BP_GROIN
|
||||
robotic_name = "toxin filter"
|
||||
robotic_sprite = "liver-prosthetic"
|
||||
var/tolerance = 5
|
||||
|
||||
/obj/item/organ/internal/liver/process()
|
||||
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
to_chat(owner, "<span class='warning'>Your skin itches.</span>")
|
||||
if (germ_level > INFECTION_LEVEL_TWO)
|
||||
if(prob(1))
|
||||
spawn owner.delayed_vomit()
|
||||
|
||||
if(owner.life_tick % PROCESS_ACCURACY == 0)
|
||||
|
||||
//A liver's duty is to get rid of toxins
|
||||
if(owner.getToxLoss() > 0 && owner.getToxLoss() <= tolerance)
|
||||
owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out
|
||||
else if(owner.getToxLoss() > tolerance)
|
||||
if(is_bruised())
|
||||
//damaged liver works less efficiently
|
||||
owner.adjustToxLoss(-0.5)
|
||||
if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.1 * PROCESS_ACCURACY
|
||||
else if(is_broken())
|
||||
//non-functioning liver ADDS toxins
|
||||
owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho
|
||||
else
|
||||
//functioning liver removes toxins at a cost
|
||||
owner.adjustToxLoss(-1)
|
||||
if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.05 * PROCESS_ACCURACY
|
||||
|
||||
|
||||
//High toxins levels are super dangerous
|
||||
if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin"))
|
||||
//Healthy liver suffers on its own
|
||||
if (src.damage < min_broken_damage)
|
||||
src.damage += 0.2 * PROCESS_ACCURACY
|
||||
//Damaged one shares the fun
|
||||
else
|
||||
var/obj/item/organ/O = pick(owner.internal_organs)
|
||||
if(O)
|
||||
O.damage += 0.2 * PROCESS_ACCURACY
|
||||
|
||||
//Detox can heal small amounts of damage
|
||||
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin"))
|
||||
src.damage -= 0.2 * PROCESS_ACCURACY
|
||||
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
|
||||
var/filter_strength = INTOX_FILTER_HEALTHY
|
||||
if(is_bruised())
|
||||
filter_strength = INTOX_FILTER_BRUISED
|
||||
if(is_broken())
|
||||
filter_strength = INTOX_FILTER_DAMAGED
|
||||
|
||||
if (owner.intoxication > 0)
|
||||
owner.intoxication -= filter_strength*PROCESS_ACCURACY
|
||||
owner.intoxication = max(owner.intoxication, 0)
|
||||
if (!owner.intoxication)
|
||||
owner.handle_intoxication()
|
||||
|
||||
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
|
||||
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1))
|
||||
if(is_damaged())
|
||||
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
|
||||
@@ -0,0 +1,33 @@
|
||||
/obj/item/organ/internal/lungs
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
gender = PLURAL
|
||||
organ_tag = BP_LUNGS
|
||||
parent_organ = BP_CHEST
|
||||
robotic_name = "gas exchange system"
|
||||
robotic_sprite = "lungs-prosthetic"
|
||||
var/rescued = FALSE // whether or not a collapsed lung has been rescued with a syringe
|
||||
|
||||
/obj/item/organ/internal/lungs/process()
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(5))
|
||||
owner.emote("cough") //Respiratory tract infection
|
||||
|
||||
if(is_broken() || (is_bruised() && !rescued)) // a thoracostomy can only help with a collapsed lung, not a mangled one
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
owner.drip(10)
|
||||
if(prob(4))
|
||||
spawn owner.emote("me", 1, "gasps for air!")
|
||||
owner.losebreath += 15
|
||||
|
||||
if(is_bruised() && rescued)
|
||||
if(prob(4))
|
||||
to_chat(owner, span("warning", "It feels hard to breathe..."))
|
||||
if (owner.losebreath < 5)
|
||||
owner.losebreath = min(owner.losebreath + 1, 5) // it's still not good, but it's much better than an untreated collapsed lung
|
||||
@@ -25,9 +25,9 @@
|
||||
name = "cortical borer"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "borer"
|
||||
organ_tag = "brain"
|
||||
organ_tag = BP_BRAIN
|
||||
desc = "A disgusting space slug."
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
vital = 1
|
||||
|
||||
/obj/item/organ/borer/removed(var/mob/living/user)
|
||||
@@ -47,7 +47,7 @@
|
||||
name = "cortical stack"
|
||||
icon_state = "brain-prosthetic"
|
||||
organ_tag = "stack"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
robotic = 2
|
||||
vital = 1
|
||||
var/backup_time = 0
|
||||
|
||||
@@ -3,38 +3,43 @@
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
drop_sound = 'sound/items/drop/flesh.ogg'
|
||||
default_action_type = /datum/action/item_action/organ
|
||||
var/dead_icon
|
||||
germ_level = 0
|
||||
|
||||
var/mob/living/carbon/human/owner = null
|
||||
|
||||
//Organ stats.
|
||||
var/status = 0
|
||||
var/vital //Lose a vital limb, die immediately.
|
||||
var/damage = 0 // amount of damage to the organ
|
||||
|
||||
var/min_bruised_damage = 10
|
||||
var/min_broken_damage = 30
|
||||
var/max_damage
|
||||
var/organ_tag = "organ"
|
||||
|
||||
var/parent_organ = "chest"
|
||||
var/robotic = 0 //For being a robot
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
|
||||
var/list/transplant_data
|
||||
var/list/datum/autopsy_data/autopsy_data = list()
|
||||
var/list/trace_chemicals = list() // traces of chemicals in the organ,
|
||||
// links chemical IDs to number of ticks for which they'll stay in the blood
|
||||
germ_level = 0
|
||||
var/datum/dna/dna
|
||||
var/datum/species/species
|
||||
var/emp_coeff = 1 //coefficient for damages taken by EMP, if the organ is robotic.
|
||||
//Organ damage stats.
|
||||
var/damage = 0 // amount of damage to the organ
|
||||
var/min_broken_damage = 30
|
||||
var/min_bruised_damage = 10 // Damage before considered bruised
|
||||
var/max_damage
|
||||
|
||||
var/force_skintone = FALSE // If true, icon generation will skip is-robotic checks. Used for synthskin limbs.
|
||||
|
||||
var/list/organ_verbs //verb that are added when you gain the organ
|
||||
//Strings.
|
||||
var/organ_tag = "organ"
|
||||
var/parent_organ = BP_CHEST
|
||||
|
||||
//Robot organ stuff.
|
||||
var/robotic = 0 //For being a robot
|
||||
var/robotize_type // If set, this organ type will automatically be roboticized with this manufacturer.
|
||||
var/robotic_name
|
||||
var/robotic_sprite
|
||||
|
||||
var/robotize_type // If set, this organ type will automatically be roboticized with this manufacturer.
|
||||
var/emp_coeff = 1 //coefficient for damages taken by EMP, if the organ is robotic.
|
||||
|
||||
//Lists.
|
||||
var/list/transplant_data
|
||||
var/list/datum/autopsy_data/autopsy_data = list()
|
||||
var/list/organ_verbs //verb that are added when you gain the organ
|
||||
var/list/trace_chemicals = list() // traces of chemicals in the organ,
|
||||
// links chemical IDs to number of ticks for which they'll stay in the blood
|
||||
|
||||
//DNA stuff.
|
||||
var/datum/dna/dna
|
||||
var/datum/species/species
|
||||
var/force_skintone = FALSE // If true, icon generation will skip is-robotic checks. Used for synthskin limbs.
|
||||
|
||||
/obj/item/organ/New(loc, ...)
|
||||
..()
|
||||
@@ -113,11 +118,24 @@
|
||||
damage = max_damage
|
||||
status |= ORGAN_DEAD
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
if(dead_icon && !robotic)
|
||||
icon_state = dead_icon
|
||||
if(owner && vital)
|
||||
owner.death()
|
||||
|
||||
/obj/item/organ/proc/is_damaged()
|
||||
return damage > 1
|
||||
|
||||
/obj/item/organ/proc/is_bruised()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
/obj/item/organ/proc/bruise()
|
||||
damage = max(damage, min_bruised_damage)
|
||||
|
||||
/obj/item/organ/proc/can_feel_pain()
|
||||
return (!BP_IS_ROBOTIC(src) && (!species || !(species.flags & NO_PAIN)))
|
||||
|
||||
/obj/item/organ/proc/can_recover()
|
||||
return (max_damage > 0) && !(status & ORGAN_DEAD)
|
||||
|
||||
/obj/item/organ/process()
|
||||
|
||||
if(loc != owner)
|
||||
@@ -228,12 +246,6 @@
|
||||
/obj/item/organ/proc/rejuvenate()
|
||||
damage = 0
|
||||
|
||||
/obj/item/organ/proc/is_damaged()
|
||||
return damage >= 1 // Not zero because honestly who gives a shit about 0.01 organ damage
|
||||
|
||||
/obj/item/organ/proc/is_bruised()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
/obj/item/organ/proc/is_broken()
|
||||
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN))
|
||||
|
||||
@@ -276,9 +288,6 @@
|
||||
if(parent && !silent)
|
||||
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
|
||||
|
||||
/obj/item/organ/proc/bruise()
|
||||
damage = max(damage, min_bruised_damage)
|
||||
|
||||
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
|
||||
robotic = 2
|
||||
src.status &= ~ORGAN_BROKEN
|
||||
@@ -383,7 +392,7 @@
|
||||
robotize()
|
||||
owner.update_action_buttons()
|
||||
|
||||
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
|
||||
/obj/item/organ/internal/eyes/replaced(var/mob/living/carbon/human/target)
|
||||
|
||||
// Apply our eye colour to the target.
|
||||
if(istype(target) && eye_colour)
|
||||
|
||||
@@ -1153,6 +1153,19 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
wound_descriptors[this_wound_desc] += W.amount
|
||||
else
|
||||
wound_descriptors[this_wound_desc] = W.amount
|
||||
|
||||
if(open > 1)
|
||||
var/bone = encased ? encased : "bone"
|
||||
if(status & ORGAN_BROKEN)
|
||||
bone = "broken [bone]"
|
||||
wound_descriptors["[bone] exposed"] = 1
|
||||
|
||||
if(!encased || open > 1)
|
||||
var/list/bits = list()
|
||||
for(var/obj/item/organ/internal/organ in internal_organs)
|
||||
bits += organ.get_visible_state()
|
||||
if(bits.len)
|
||||
wound_descriptors["[english_list(bits)] visible in the wounds"] = 1
|
||||
|
||||
if(wound_descriptors.len)
|
||||
var/list/flavor_text = list()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||
..()
|
||||
var/obj/item/organ/eyes/eyes = owner.get_eyes()
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_eyes()
|
||||
if(eyes)
|
||||
eyes.update_colour()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!owner || !owner.species)
|
||||
return
|
||||
if(owner.species.has_organ[owner.species.vision_organ])
|
||||
var/obj/item/organ/eyes/eyes = owner.get_eyes()
|
||||
var/obj/item/organ/internal/eyes/eyes = owner.get_eyes()
|
||||
if(eyes && species.eyes)
|
||||
var/eyecolor
|
||||
if (eyes.eye_colour)
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
#define PROCESS_ACCURACY 10
|
||||
|
||||
/****************************************************
|
||||
INTERNAL ORGANS DEFINES
|
||||
****************************************************/
|
||||
|
||||
|
||||
// Brain is defined in brain_item.dm.
|
||||
/obj/item/organ/heart
|
||||
name = "heart"
|
||||
icon_state = "heart-on"
|
||||
organ_tag = "heart"
|
||||
parent_organ = "chest"
|
||||
dead_icon = "heart-off"
|
||||
robotic_name = "circulatory pump"
|
||||
robotic_sprite = "heart-prosthetic"
|
||||
|
||||
/obj/item/organ/heart/process()
|
||||
//Check if we're on lifesupport, and whether or not organs should be processing.
|
||||
if(owner && owner.isonlifesupport())
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/organ/lungs
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
gender = PLURAL
|
||||
organ_tag = "lungs"
|
||||
parent_organ = "chest"
|
||||
robotic_name = "gas exchange system"
|
||||
robotic_sprite = "lungs-prosthetic"
|
||||
var/rescued = FALSE // whether or not a collapsed lung has been rescued with a syringe
|
||||
|
||||
/obj/item/organ/lungs/process()
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(5))
|
||||
owner.emote("cough") //Respiratory tract infection
|
||||
|
||||
if(is_broken() || (is_bruised() && !rescued)) // a thoracostomy can only help with a collapsed lung, not a mangled one
|
||||
if(prob(2))
|
||||
spawn owner.emote("me", 1, "coughs up blood!")
|
||||
owner.drip(10)
|
||||
if(prob(4))
|
||||
spawn owner.emote("me", 1, "gasps for air!")
|
||||
owner.losebreath += 15
|
||||
|
||||
if(is_bruised() && rescued)
|
||||
if(prob(4))
|
||||
to_chat(owner, span("warning", "It feels hard to breathe..."))
|
||||
if (owner.losebreath < 5)
|
||||
owner.losebreath = min(owner.losebreath + 1, 5) // it's still not good, but it's much better than an untreated collapsed lung
|
||||
|
||||
/obj/item/organ/kidneys
|
||||
name = "kidneys"
|
||||
icon_state = "kidneys"
|
||||
gender = PLURAL
|
||||
organ_tag = "kidneys"
|
||||
parent_organ = "groin"
|
||||
robotic_name = "prosthetic kidneys"
|
||||
robotic_sprite = "kidneys-prosthetic"
|
||||
|
||||
/obj/item/organ/kidneys/process()
|
||||
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
// Coffee is really bad for you with busted kidneys.
|
||||
// This should probably be expanded in some way, but fucked if I know
|
||||
// what else kidneys can process in our reagent list.
|
||||
var/datum/reagent/coffee = locate(/datum/reagent/drink/coffee) in owner.reagents.reagent_list
|
||||
if(coffee)
|
||||
if(is_bruised())
|
||||
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
||||
else if(is_broken())
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
|
||||
/obj/item/organ/eyes
|
||||
name = "eyeballs"
|
||||
icon_state = "eyes"
|
||||
gender = PLURAL
|
||||
organ_tag = "eyes"
|
||||
parent_organ = "head"
|
||||
robotic_name = "visual prosthesis"
|
||||
robotic_sprite = "eyes-prosthetic"
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
var/singular_name = "eye"
|
||||
|
||||
/obj/item/organ/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
eye_colour = list(
|
||||
owner.r_eyes ? owner.r_eyes : 0,
|
||||
owner.g_eyes ? owner.g_eyes : 0,
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
/obj/item/organ/eyes/take_damage(amount, var/silent=0)
|
||||
var/oldbroken = is_broken()
|
||||
..()
|
||||
if(is_broken() && !oldbroken && owner && !owner.stat)
|
||||
to_chat(owner, "<span class='danger'>You go blind!</span>")
|
||||
|
||||
/obj/item/organ/eyes/proc/flash_act()
|
||||
return
|
||||
|
||||
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
if(!owner)
|
||||
return
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
|
||||
/obj/item/organ/liver
|
||||
name = "liver"
|
||||
icon_state = "liver"
|
||||
organ_tag = "liver"
|
||||
parent_organ = "groin"
|
||||
robotic_name = "toxin filter"
|
||||
robotic_sprite = "liver-prosthetic"
|
||||
var/tolerance = 5
|
||||
|
||||
/obj/item/organ/liver/process()
|
||||
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
if (germ_level > INFECTION_LEVEL_ONE)
|
||||
if(prob(1))
|
||||
to_chat(owner, "<span class='warning'>Your skin itches.</span>")
|
||||
if (germ_level > INFECTION_LEVEL_TWO)
|
||||
if(prob(1))
|
||||
spawn owner.delayed_vomit()
|
||||
|
||||
if(owner.life_tick % PROCESS_ACCURACY == 0)
|
||||
|
||||
//A liver's duty is to get rid of toxins
|
||||
if(owner.getToxLoss() > 0 && owner.getToxLoss() <= tolerance)
|
||||
owner.adjustToxLoss(-0.2) //there isn't a lot of toxin damage, so we're going to be chill and slowly filter it out
|
||||
else if(owner.getToxLoss() > tolerance)
|
||||
if(is_bruised())
|
||||
//damaged liver works less efficiently
|
||||
owner.adjustToxLoss(-0.5)
|
||||
if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.1 * PROCESS_ACCURACY
|
||||
else if(is_broken())
|
||||
//non-functioning liver ADDS toxins
|
||||
owner.adjustToxLoss(-0.1) //roughly 33 minutes to kill someone straight out, stacks with 60+ tox proc tho
|
||||
else
|
||||
//functioning liver removes toxins at a cost
|
||||
owner.adjustToxLoss(-1)
|
||||
if(!owner.reagents.has_reagent("anti_toxin")) //no damage to liver if anti-toxin is present
|
||||
src.damage += 0.05 * PROCESS_ACCURACY
|
||||
|
||||
|
||||
//High toxins levels are super dangerous
|
||||
if(owner.getToxLoss() >= 60 && !owner.reagents.has_reagent("anti_toxin"))
|
||||
//Healthy liver suffers on its own
|
||||
if (src.damage < min_broken_damage)
|
||||
src.damage += 0.2 * PROCESS_ACCURACY
|
||||
//Damaged one shares the fun
|
||||
else
|
||||
var/obj/item/organ/O = pick(owner.internal_organs)
|
||||
if(O)
|
||||
O.damage += 0.2 * PROCESS_ACCURACY
|
||||
|
||||
//Detox can heal small amounts of damage
|
||||
if (src.damage && src.damage < src.min_bruised_damage && owner.reagents.has_reagent("anti_toxin"))
|
||||
src.damage -= 0.2 * PROCESS_ACCURACY
|
||||
|
||||
if(src.damage < 0)
|
||||
src.damage = 0
|
||||
|
||||
var/filter_strength = INTOX_FILTER_HEALTHY
|
||||
if(is_bruised())
|
||||
filter_strength = INTOX_FILTER_BRUISED
|
||||
if(is_broken())
|
||||
filter_strength = INTOX_FILTER_DAMAGED
|
||||
|
||||
if (owner.intoxication > 0)
|
||||
owner.intoxication -= filter_strength*PROCESS_ACCURACY
|
||||
owner.intoxication = max(owner.intoxication, 0)
|
||||
if (!owner.intoxication)
|
||||
owner.handle_intoxication()
|
||||
|
||||
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
|
||||
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1))
|
||||
if(is_damaged())
|
||||
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
|
||||
|
||||
/obj/item/organ/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
parent_organ = "groin"
|
||||
organ_tag = "appendix"
|
||||
|
||||
/obj/item/organ/appendix/removed()
|
||||
if(owner)
|
||||
var/inflamed = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
||||
inflamed = 1
|
||||
appendicitis.cure()
|
||||
owner.resistances += appendicitis
|
||||
if(inflamed)
|
||||
icon_state = "appendixinflamed"
|
||||
name = "inflamed appendix"
|
||||
..()
|
||||
@@ -67,29 +67,29 @@
|
||||
|
||||
//internal organs
|
||||
|
||||
/obj/item/organ/kidneys/autakh
|
||||
/obj/item/organ/internal/kidneys/autakh
|
||||
name = "toxin screen"
|
||||
icon_state = "screen"
|
||||
robotic = 1
|
||||
robotic_name = null
|
||||
robotic_sprite = null
|
||||
|
||||
/obj/item/organ/kidneys/autakh/Initialize()
|
||||
/obj/item/organ/internal/kidneys/autakh/Initialize()
|
||||
mechassist()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/anchor
|
||||
/obj/item/organ/internal/anchor
|
||||
name = "soul anchor"
|
||||
icon_state = "anchor"
|
||||
organ_tag = "anchor"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
robotic = 2
|
||||
|
||||
/obj/item/organ/anchor/Initialize()
|
||||
/obj/item/organ/internal/anchor/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/eyes/autakh
|
||||
/obj/item/organ/internal/eyes/autakh
|
||||
name = "bionic eyeballs"
|
||||
icon_state = "mk1eyes"
|
||||
singular_name = "bionic eye"
|
||||
@@ -106,18 +106,18 @@
|
||||
var/selected_hud = "Disabled"
|
||||
var/disabled = FALSE
|
||||
|
||||
/obj/item/organ/eyes/autakh/Initialize()
|
||||
/obj/item/organ/internal/eyes/autakh/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/eyes/autakh/refresh_action_button()
|
||||
/obj/item/organ/internal/eyes/autakh/refresh_action_button()
|
||||
. = ..()
|
||||
if(.)
|
||||
action.button_icon_state = "mk1eyes"
|
||||
if(action.button)
|
||||
action.button.UpdateIcon()
|
||||
|
||||
/obj/item/organ/eyes/autakh/attack_self(var/mob/user)
|
||||
/obj/item/organ/internal/eyes/autakh/attack_self(var/mob/user)
|
||||
. = ..()
|
||||
|
||||
if(.)
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
selected_hud = choice
|
||||
|
||||
/obj/item/organ/eyes/autakh/process()
|
||||
/obj/item/organ/internal/eyes/autakh/process()
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
@@ -160,7 +160,7 @@
|
||||
if(allowed(owner))
|
||||
process_med_hud(owner, 1)
|
||||
|
||||
/obj/item/organ/eyes/autakh/flash_act()
|
||||
/obj/item/organ/internal/eyes/autakh/flash_act()
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='notice'>Your [singular_name]'s retinal overlays are overloaded by the strong light!</span>")
|
||||
owner.eye_blind = 5
|
||||
@@ -171,13 +171,13 @@
|
||||
addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS)
|
||||
return
|
||||
|
||||
/obj/item/organ/eyes/autakh/emp_act(severity)
|
||||
/obj/item/organ/internal/eyes/autakh/emp_act(severity)
|
||||
..()
|
||||
disabled = TRUE
|
||||
selected_hud = "Disabled"
|
||||
addtimer(CALLBACK(src, .proc/rearm), 40 SECONDS)
|
||||
|
||||
/obj/item/organ/eyes/autakh/proc/rearm()
|
||||
/obj/item/organ/internal/eyes/autakh/proc/rearm()
|
||||
if(!disabled)
|
||||
return
|
||||
disabled = FALSE
|
||||
@@ -185,26 +185,26 @@
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='notice'>\The [singular_name]'s retinal overlays clicks and shifts!</span>")
|
||||
|
||||
/obj/item/organ/adrenal
|
||||
/obj/item/organ/internal/adrenal
|
||||
name = "adrenal management system"
|
||||
icon_state = "ams"
|
||||
organ_tag = "adrenal"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
robotic = 2
|
||||
action_button_name = "Activate Adrenal Management System"
|
||||
|
||||
/obj/item/organ/adrenal/Initialize()
|
||||
/obj/item/organ/internal/adrenal/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/adrenal/refresh_action_button()
|
||||
/obj/item/organ/internal/adrenal/refresh_action_button()
|
||||
. = ..()
|
||||
if(.)
|
||||
action.button_icon_state = "ams"
|
||||
if(action.button)
|
||||
action.button.UpdateIcon()
|
||||
|
||||
/obj/item/organ/adrenal/attack_self(var/mob/user)
|
||||
/obj/item/organ/internal/adrenal/attack_self(var/mob/user)
|
||||
. = ..()
|
||||
|
||||
if(.)
|
||||
@@ -233,30 +233,30 @@
|
||||
owner.reagents.add_reagent("paracetamol", 5)
|
||||
owner.reagents.add_reagent("inaprovaline", 5)
|
||||
|
||||
/obj/item/organ/haemodynamic
|
||||
/obj/item/organ/internal/haemodynamic
|
||||
name = "haemodynamic control system"
|
||||
icon_state = "stabilizer"
|
||||
organ_tag = "haemodynamic"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
robotic = 1
|
||||
action_button_name = "Activate Haemodynamic Control System"
|
||||
|
||||
/obj/item/organ/haemodynamic/Initialize()
|
||||
/obj/item/organ/internal/haemodynamic/Initialize()
|
||||
mechassist()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/haemodynamic/Initialize()
|
||||
/obj/item/organ/internal/haemodynamic/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/haemodynamic/refresh_action_button()
|
||||
/obj/item/organ/internal/haemodynamic/refresh_action_button()
|
||||
. = ..()
|
||||
if(.)
|
||||
action.button_icon_state = "stabilizer"
|
||||
if(action.button)
|
||||
action.button.UpdateIcon()
|
||||
|
||||
/obj/item/organ/haemodynamic/attack_self(var/mob/user)
|
||||
/obj/item/organ/internal/haemodynamic/attack_self(var/mob/user)
|
||||
. = ..()
|
||||
|
||||
if(.)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
min_broken_damage = 50
|
||||
w_class = 4
|
||||
body_part = LOWER_TORSO
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
joint = "structural ligament"
|
||||
@@ -63,7 +63,7 @@
|
||||
min_broken_damage = 20
|
||||
w_class = 3
|
||||
body_part = ARM_LEFT
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
can_grasp = 1
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
@@ -89,7 +89,7 @@
|
||||
w_class = 3
|
||||
body_part = LEG_LEFT
|
||||
icon_position = LEFT
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
can_stand = 1
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
@@ -116,7 +116,7 @@
|
||||
w_class = 2
|
||||
body_part = FOOT_LEFT
|
||||
icon_position = LEFT
|
||||
parent_organ = "l_leg"
|
||||
parent_organ = BP_L_LEG
|
||||
can_stand = 1
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
@@ -129,7 +129,7 @@
|
||||
icon_name = "r_foot"
|
||||
body_part = FOOT_RIGHT
|
||||
icon_position = RIGHT
|
||||
parent_organ = "r_leg"
|
||||
parent_organ = BP_R_LEG
|
||||
joint = "right ankle"
|
||||
amputation_point = "right ankle"
|
||||
cannot_break = 1
|
||||
@@ -145,7 +145,7 @@
|
||||
min_broken_damage = 15
|
||||
w_class = 2
|
||||
body_part = HAND_LEFT
|
||||
parent_organ = "l_arm"
|
||||
parent_organ = BP_L_ARM
|
||||
can_grasp = 1
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
@@ -157,7 +157,7 @@
|
||||
limb_name = "r_hand"
|
||||
icon_name = "r_hand"
|
||||
body_part = HAND_RIGHT
|
||||
parent_organ = "r_arm"
|
||||
parent_organ = BP_R_ARM
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
joint = "structural ligament"
|
||||
@@ -166,12 +166,12 @@
|
||||
/obj/item/organ/external/head/diona
|
||||
limb_name = "head"
|
||||
icon_name = "head"
|
||||
name = "head"
|
||||
name = BP_HEAD
|
||||
max_damage = 50
|
||||
min_broken_damage = 25
|
||||
w_class = 3
|
||||
body_part = HEAD
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
cannot_break = 1
|
||||
dislocated = -1
|
||||
joint = "structural ligament"
|
||||
@@ -183,23 +183,23 @@
|
||||
|
||||
/obj/item/organ/diona/strata
|
||||
name = "neural strata"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
organ_tag = "neural strata"
|
||||
|
||||
|
||||
/obj/item/organ/diona/bladder
|
||||
name = "gas bladder"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
organ_tag = "gas bladder"
|
||||
|
||||
/obj/item/organ/diona/polyp
|
||||
name = "polyp segment"
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
organ_tag = "polyp segment"
|
||||
|
||||
/obj/item/organ/diona/ligament
|
||||
name = "anchoring ligament"
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
organ_tag = "anchoring ligament"
|
||||
|
||||
/obj/item/organ/diona
|
||||
@@ -223,7 +223,7 @@
|
||||
// species (absorbing radiation and light respectively)
|
||||
/obj/item/organ/diona/nutrients
|
||||
name = "nutrient channel"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
organ_tag = "nutrient channel"
|
||||
icon = 'icons/mob/npc/alien.dmi'
|
||||
icon_state = "claw"
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
/obj/item/organ/diona/node
|
||||
name = "response node"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
organ_tag = "response node"
|
||||
icon = 'icons/mob/npc/alien.dmi'
|
||||
icon_state = "claw"
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "scell"
|
||||
organ_tag = "cell"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
vital = 1
|
||||
var/emp_counter = 0
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
icon = 'icons/obj/robot_component.dmi'
|
||||
icon_state = "surge_ipc"
|
||||
organ_tag = "surge"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
vital = 0
|
||||
var/surge_left = 0
|
||||
var/broken = 0
|
||||
@@ -122,7 +122,7 @@
|
||||
surge_left += 1
|
||||
stage_interval += 250
|
||||
|
||||
/obj/item/organ/eyes/optical_sensor
|
||||
/obj/item/organ/internal/eyes/optical_sensor
|
||||
name = "optical sensor"
|
||||
singular_name = "optical sensor"
|
||||
organ_tag = "optics"
|
||||
@@ -130,27 +130,27 @@
|
||||
icon_state = "camera"
|
||||
dead_icon = "camera_broken"
|
||||
|
||||
/obj/item/organ/eyes/optical_sensor/Initialize()
|
||||
/obj/item/organ/internal/eyes/optical_sensor/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/ipc_tag
|
||||
/obj/item/organ/internal/ipc_tag
|
||||
name = "identification tag"
|
||||
organ_tag = "ipc tag"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "gps-c"
|
||||
dead_icon = "gps-c"
|
||||
|
||||
/obj/item/organ/ipc_tag/Initialize()
|
||||
/obj/item/organ/internal/ipc_tag/Initialize()
|
||||
robotize()
|
||||
. = ..()
|
||||
|
||||
// Used for an MMI or posibrain being installed into a human.
|
||||
/obj/item/organ/mmi_holder
|
||||
name = "brain"
|
||||
organ_tag = "brain"
|
||||
parent_organ = "head"
|
||||
organ_tag = BP_BRAIN
|
||||
parent_organ = BP_HEAD
|
||||
vital = 1
|
||||
var/obj/item/device/mmi/stored_mmi
|
||||
|
||||
@@ -197,16 +197,16 @@
|
||||
//////////////
|
||||
|
||||
/obj/item/organ/mmi_holder/posibrain/terminator
|
||||
name = "brain"
|
||||
organ_tag = "brain"
|
||||
parent_organ = "chest"
|
||||
name = BP_BRAIN
|
||||
organ_tag = BP_BRAIN
|
||||
parent_organ = BP_CHEST
|
||||
vital = 1
|
||||
emp_coeff = 0.1
|
||||
|
||||
/obj/item/organ/data
|
||||
name = "data core"
|
||||
organ_tag = "data core"
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "harddisk"
|
||||
vital = 0
|
||||
@@ -222,7 +222,7 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "scell"
|
||||
organ_tag = "shielded cell"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
vital = 1
|
||||
emp_coeff = 0.1
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
emp_coeff = 0.5
|
||||
robotize_type = PROSTHETIC_HK
|
||||
|
||||
/obj/item/organ/eyes/optical_sensor/terminator
|
||||
/obj/item/organ/internal/eyes/optical_sensor/terminator
|
||||
emp_coeff = 0.5
|
||||
|
||||
/obj/item/organ/external/chest/terminator
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/organ/parasite
|
||||
/obj/item/organ/internal/parasite
|
||||
name = "parasite"
|
||||
icon = 'icons/mob/npc/alien.dmi'
|
||||
icon_state = "burst_lie"
|
||||
@@ -11,7 +11,7 @@
|
||||
var/stage_interval = 600 //time between stages, in seconds
|
||||
var/subtle = 0 //will the body reject the parasite naturally?
|
||||
|
||||
/obj/item/organ/parasite/process()
|
||||
/obj/item/organ/internal/parasite/process()
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
@@ -24,7 +24,7 @@
|
||||
stage = min(stage+1,max_stage)
|
||||
stage_effect()
|
||||
|
||||
/obj/item/organ/parasite/handle_rejection()
|
||||
/obj/item/organ/internal/parasite/handle_rejection()
|
||||
if(subtle)
|
||||
return ..()
|
||||
else
|
||||
@@ -32,14 +32,14 @@
|
||||
rejecting = 0
|
||||
return
|
||||
|
||||
/obj/item/organ/parasite/proc/stage_effect()
|
||||
/obj/item/organ/internal/parasite/proc/stage_effect()
|
||||
return
|
||||
|
||||
///////////////////
|
||||
///K'ois Mycosis///
|
||||
///////////////////
|
||||
|
||||
/obj/item/organ/parasite/kois
|
||||
/obj/item/organ/internal/parasite/kois
|
||||
name = "k'ois mycosis"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "kois-on"
|
||||
@@ -47,12 +47,12 @@
|
||||
|
||||
organ_tag = "kois"
|
||||
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
stage_interval = 150
|
||||
|
||||
origin_tech = list(TECH_BIO = 3)
|
||||
|
||||
/obj/item/organ/parasite/kois/process()
|
||||
/obj/item/organ/internal/parasite/kois/process()
|
||||
..()
|
||||
|
||||
if (!owner)
|
||||
@@ -108,7 +108,7 @@
|
||||
///Black Mycosis///
|
||||
///////////////////
|
||||
|
||||
/obj/item/organ/parasite/blackkois
|
||||
/obj/item/organ/internal/parasite/blackkois
|
||||
name = "k'ois mycosis"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "black-on"
|
||||
@@ -117,12 +117,12 @@
|
||||
|
||||
organ_tag = "blackkois"
|
||||
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
var/removed_langs = 0
|
||||
stage_interval = 150
|
||||
origin_tech = list(TECH_BIO = 7)
|
||||
|
||||
/obj/item/organ/parasite/blackkois/process()
|
||||
/obj/item/organ/internal/parasite/blackkois/process()
|
||||
..()
|
||||
|
||||
if(prob(10) && (owner.can_feel_pain()))
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
if(stage >= 4)
|
||||
|
||||
var/obj/item/organ/brain/B = owner.internal_organs_by_name["brain"]
|
||||
var/obj/item/organ/internal/brain/B = owner.internal_organs_by_name[BP_BRAIN]
|
||||
|
||||
if(B && !B.lobotomized)
|
||||
to_chat(owner, "<span class='danger'>As the K'ois consumes your mind, you feel your past self, your memories, your very being slip away... only slavery to the swarm remains...</span>")
|
||||
@@ -202,14 +202,14 @@
|
||||
owner.drip(15)
|
||||
owner.delayed_vomit()
|
||||
|
||||
/obj/item/organ/parasite/blackkois/removed(var/mob/living/carbon/human/target)
|
||||
/obj/item/organ/internal/parasite/blackkois/removed(var/mob/living/carbon/human/target)
|
||||
if(all_languages[LANGUAGE_VAURCA] in target.languages && stage >= 3 && !isvaurca(target))
|
||||
target.remove_language(LANGUAGE_VAURCA)
|
||||
to_chat(target, "<span class='warning'>Your mind suddenly grows dark as the unity of the Hive is torn from you.</span>")
|
||||
removed_langs = 0
|
||||
..()
|
||||
|
||||
/obj/item/organ/parasite/zombie
|
||||
/obj/item/organ/internal/parasite/zombie
|
||||
name = "black tumor"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "blacktumor"
|
||||
@@ -217,10 +217,10 @@
|
||||
|
||||
organ_tag = "zombie"
|
||||
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
stage_interval = 150
|
||||
|
||||
/obj/item/organ/parasite/zombie/process()
|
||||
/obj/item/organ/internal/parasite/zombie/process()
|
||||
..()
|
||||
|
||||
if (!owner)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/obj/item/organ/heart/skrell
|
||||
/obj/item/organ/internal/heart/skrell
|
||||
icon_state = "skrell_heart-on"
|
||||
dead_icon = "skrell_heart-off"
|
||||
|
||||
/obj/item/organ/lungs/skrell
|
||||
/obj/item/organ/internal/lungs/skrell
|
||||
icon_state = "lungs_skrell"
|
||||
|
||||
/obj/item/organ/kidneys/skrell
|
||||
/obj/item/organ/internal/kidneys/skrell
|
||||
icon_state = "kidney_skrell"
|
||||
|
||||
/obj/item/organ/eyes/skrell
|
||||
/obj/item/organ/internal/eyes/skrell
|
||||
icon_state = "eyes_skrell"
|
||||
|
||||
/obj/item/organ/liver/skrell
|
||||
/obj/item/organ/internal/liver/skrell
|
||||
icon_state = "liver_skrell"
|
||||
|
||||
/obj/item/organ/brain/skrell
|
||||
/obj/item/organ/internal/brain/skrell
|
||||
icon_state = "brain_skrell"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
w_class = 4
|
||||
body_part = LOWER_TORSO
|
||||
vital = 1
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
amputation_point = "lumbar"
|
||||
joint = "hip"
|
||||
dislocated = -1
|
||||
@@ -44,7 +44,7 @@
|
||||
min_broken_damage = 30
|
||||
w_class = 3
|
||||
body_part = ARM_LEFT
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
joint = "left elbow"
|
||||
amputation_point = "left shoulder"
|
||||
can_grasp = 1
|
||||
@@ -66,7 +66,7 @@
|
||||
w_class = 3
|
||||
body_part = LEG_LEFT
|
||||
icon_position = LEFT
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
joint = "left knee"
|
||||
amputation_point = "left hip"
|
||||
can_stand = 1
|
||||
@@ -89,7 +89,7 @@
|
||||
w_class = 2
|
||||
body_part = FOOT_LEFT
|
||||
icon_position = LEFT
|
||||
parent_organ = "l_leg"
|
||||
parent_organ = BP_L_LEG
|
||||
joint = "left ankle"
|
||||
amputation_point = "left ankle"
|
||||
can_stand = 1
|
||||
@@ -106,7 +106,7 @@
|
||||
icon_name = "r_foot"
|
||||
body_part = FOOT_RIGHT
|
||||
icon_position = RIGHT
|
||||
parent_organ = "r_leg"
|
||||
parent_organ = BP_R_LEG
|
||||
joint = "right ankle"
|
||||
amputation_point = "right ankle"
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
min_broken_damage = 15
|
||||
w_class = 2
|
||||
body_part = HAND_LEFT
|
||||
parent_organ = "l_arm"
|
||||
parent_organ = BP_L_ARM
|
||||
joint = "left wrist"
|
||||
amputation_point = "left wrist"
|
||||
can_grasp = 1
|
||||
@@ -137,20 +137,20 @@
|
||||
name = "right hand"
|
||||
icon_name = "r_hand"
|
||||
body_part = HAND_RIGHT
|
||||
parent_organ = "r_arm"
|
||||
parent_organ = BP_R_ARM
|
||||
joint = "right wrist"
|
||||
amputation_point = "right wrist"
|
||||
|
||||
/obj/item/organ/external/head
|
||||
limb_name = "head"
|
||||
icon_name = "head"
|
||||
name = "head"
|
||||
name = BP_HEAD
|
||||
max_damage = 75
|
||||
min_broken_damage = 35
|
||||
w_class = 3
|
||||
body_part = HEAD | FACE
|
||||
vital = 1
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
joint = "jaw"
|
||||
amputation_point = "neck"
|
||||
gendered_icon = 1
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
/obj/item/organ/heart/left
|
||||
/obj/item/organ/internal/heart/left
|
||||
name = "heart"
|
||||
icon_state = "vaurca_heart_l-on"
|
||||
organ_tag = "left heart"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
dead_icon = "vaurca_heart_l-off"
|
||||
|
||||
/obj/item/organ/heart/right
|
||||
/obj/item/organ/internal/heart/right
|
||||
name = "heart"
|
||||
icon_state = "vaurca_heart_r-on"
|
||||
organ_tag = "right heart"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
dead_icon = "vaurca_heart_r-off"
|
||||
|
||||
/obj/item/organ/lungs/vaurca
|
||||
/obj/item/organ/internal/lungs/vaurca
|
||||
icon_state = "lungs_vaurca"
|
||||
|
||||
/obj/item/organ/kidneys/vaurca
|
||||
/obj/item/organ/internal/kidneys/vaurca
|
||||
icon_state = "kidney_vaurca"
|
||||
|
||||
/obj/item/organ/eyes/vaurca
|
||||
/obj/item/organ/internal/eyes/vaurca
|
||||
icon_state = "eyes_vaurca"
|
||||
|
||||
/obj/item/organ/eyes/vaurca/flash_act()
|
||||
/obj/item/organ/internal/eyes/vaurca/flash_act()
|
||||
if(!owner)
|
||||
return
|
||||
|
||||
@@ -41,14 +41,14 @@
|
||||
owner.disabilities |= NEARSIGHTED
|
||||
addtimer(CALLBACK(owner, /mob/.proc/reset_nearsighted), 100)
|
||||
|
||||
/obj/item/organ/kidneys/vaurca/robo
|
||||
/obj/item/organ/internal/kidneys/vaurca/robo
|
||||
icon_state = "kidney_vaurca"
|
||||
organ_tag = "mechanical kidneys"
|
||||
robotic = 2
|
||||
robotic_name = null
|
||||
robotic_sprite = null
|
||||
|
||||
/obj/item/organ/liver/vaurca/robo
|
||||
/obj/item/organ/internal/liver/vaurca/robo
|
||||
icon_state = "liver_vaurca"
|
||||
organ_tag = "mechanical liver"
|
||||
robotic = 2
|
||||
@@ -56,24 +56,24 @@
|
||||
robotic_sprite = null
|
||||
tolerance = 20
|
||||
|
||||
/obj/item/organ/liver/vaurca
|
||||
/obj/item/organ/internal/liver/vaurca
|
||||
icon_state = "liver_vaurca"
|
||||
tolerance = 20
|
||||
|
||||
/obj/item/organ/brain/vaurca
|
||||
/obj/item/organ/internal/brain/vaurca
|
||||
icon_state = "brain_vaurca"
|
||||
|
||||
/obj/item/organ/vaurca/reservoir
|
||||
name = "phoron reservoir"
|
||||
organ_tag = "phoron reservoir"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
icon_state = "phoron_reservoir"
|
||||
robotic = 1
|
||||
|
||||
/obj/item/organ/vaurca/filtrationbit
|
||||
name = "filtration bit"
|
||||
organ_tag = "filtration bit"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
icon_state = "filter"
|
||||
robotic = 2
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
name = "neural socket"
|
||||
organ_tag = "neural socket"
|
||||
icon_state = "neural_socket"
|
||||
parent_organ = "head"
|
||||
parent_organ = BP_HEAD
|
||||
robotic = 2
|
||||
|
||||
obj/item/organ/vaurca/neuralsocket/process()
|
||||
@@ -110,7 +110,7 @@ obj/item/organ/vaurca/neuralsocket/process()
|
||||
/obj/item/organ/vaurca/preserve
|
||||
name = "phoron reserve tank"
|
||||
organ_tag = "phoron reserve tank"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
icon_state = "breathing_app"
|
||||
robotic = 1
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
|
||||
@@ -37,22 +37,22 @@
|
||||
|
||||
//vox organs
|
||||
|
||||
/obj/item/organ/heart/vox
|
||||
/obj/item/organ/internal/heart/vox
|
||||
icon_state = "vox_heart"
|
||||
dead_icon = "vox_heart"
|
||||
|
||||
/obj/item/organ/lungs/vox
|
||||
/obj/item/organ/internal/lungs/vox
|
||||
name = "air capillary sack"
|
||||
icon_state = "vox_lung"
|
||||
|
||||
/obj/item/organ/kidneys/vox
|
||||
/obj/item/organ/internal/kidneys/vox
|
||||
name = "filtration bladder"
|
||||
icon_state = "lungs"
|
||||
color = "#99ccff"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
|
||||
/obj/item/organ/liver/vox
|
||||
/obj/item/organ/internal/liver/vox
|
||||
name = "waste tract"
|
||||
parent_organ = "chest"
|
||||
parent_organ = BP_CHEST
|
||||
color = "#0033cc"
|
||||
tolerance = 20
|
||||
|
||||
Reference in New Issue
Block a user