From 3ee26917bda67ad76cdeece6562cd88eda50a875 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 14 Jul 2017 09:00:36 -0500 Subject: [PATCH] Organ Update [Cloning isn't broken edition] --- code/__DEFINES/DNA.dm.rej | 9 +++ code/game/machinery/cloning.dm | 8 ++- code/game/objects/items/devices/scanners.dm | 12 +++- .../mob/living/carbon/carbon_defines.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 12 ++++ code/modules/mob/living/carbon/human/life.dm | 7 -- .../mob/living/carbon/human/species.dm | 27 +++++++- .../mob/living/carbon/human/species.dm.rej | 12 ++++ .../carbon/human/species_types/flypeople.dm | 2 + .../carbon/human/species_types/jellypeople.dm | 2 +- .../carbon/human/species_types/plasmamen.dm | 2 + .../carbon/human/species_types/podpeople.dm | 2 +- code/modules/mob/living/carbon/life.dm | 46 +++++++++++-- code/modules/mob/living/carbon/monkey/life.dm | 4 -- .../mob/living/carbon/monkey/monkey.dm | 2 + code/modules/mob/living/life.dm | 6 -- .../chemistry/reagents/alcohol_reagents.dm | 2 + .../chemistry/reagents/medicine_reagents.dm | 4 +- code/modules/surgery/organs/heart.dm | 5 +- code/modules/surgery/organs/liver.dm | 66 +++++++++++++++++++ code/modules/surgery/organs/organ_internal.dm | 20 ++++++ code/modules/surgery/organs/stomach.dm | 25 +++++++ tgstation.dme | 2 + 23 files changed, 243 insertions(+), 36 deletions(-) create mode 100644 code/__DEFINES/DNA.dm.rej create mode 100644 code/modules/mob/living/carbon/human/species.dm.rej create mode 100755 code/modules/surgery/organs/liver.dm create mode 100755 code/modules/surgery/organs/stomach.dm diff --git a/code/__DEFINES/DNA.dm.rej b/code/__DEFINES/DNA.dm.rej new file mode 100644 index 0000000000..343dc1f7a0 --- /dev/null +++ b/code/__DEFINES/DNA.dm.rej @@ -0,0 +1,9 @@ +diff a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm (rejected hunks) +@@ -114,4 +114,6 @@ + #define EASYLIMBATTACHMENT 23 + #define TOXINLOVER 24 + #define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi) +-#define NO_UNDERWEAR 26 ++#define NO_UNDERWEAR 26 ++#define NOLIVER 27 ++#define NOSTOMACH 28 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 5e876d3b92..2ba6b733bd 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -3,7 +3,7 @@ //Potential replacement for genetics revives or something I dunno (?) -#define CLONE_INITIAL_DAMAGE 190 //Clones in clonepods start with 190 cloneloss damage and 190 brainloss damage, thats just logical +#define CLONE_INITIAL_DAMAGE 150 //Clones in clonepods start with 150 cloneloss damage and 150 brainloss damage, thats just logical #define MINIMUM_HEAL_LEVEL 40 #define SPEAK(message) radio.talk_into(src, message, radio_channel, get_spans(), get_default_language()) @@ -41,7 +41,7 @@ var/static/list/brine_types = list( "salbutamol", // anti-oxyloss "bicaridine", // NOBREATHE species take brute in crit - "corazone", // prevents cardiac arrest damage + "corazone", // prevents cardiac arrest and liver failure damage "mimesbane") // stops them gasping from lack of air. /obj/machinery/clonepod/Initialize() @@ -474,7 +474,9 @@ // Clones are in a pickled bath of mild chemicals, keeping // them alive, despite their lack of internal organs for(var/bt in brine_types) - if(occupant.reagents.get_reagent_amount(bt) < 1) + if(bt == "corazone" && occupant.reagents.get_reagent_amount(bt) < 2) + occupant.reagents.add_reagent(bt, 2)//pump it full of extra corazone as a safety, you can't OD on corazone. + else if(occupant.reagents.get_reagent_amount(bt) < 1) occupant.reagents.add_reagent(bt, 1) /* diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 5b3dfbb994..30c19cc575 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -118,7 +118,9 @@ MASS SPECTROMETER if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.undergoing_cardiac_arrest() && H.stat != DEAD) - to_chat(user, "Subject suffering from heart attack: Apply defibrillator immediately!") + to_chat(user, "Subject suffering from heart attack: apply defibrillator immediately!") + if(H.undergoing_liver_failure() && H.stat != DEAD) + to_chat(user, "Subject suffering from liver failure: apply corazone and begin a liver transplant immediately!") to_chat(user, "Analyzing results for [M]:\n\tOverall status: [mob_status]") @@ -144,7 +146,13 @@ MASS SPECTROMETER else if (M.getBrainLoss() >= 10) to_chat(user, "\tBrain damage detected. Subject may have had a concussion.") - // Organ damage report + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/ldamage = H.return_liver_damage() + if(ldamage > 10) + to_chat(user, "\t[ldamage > 45 ? "severe" : "minor"] liver damage detected.") + + // Body part damage report if(iscarbon(M) && mode == 1) var/mob/living/carbon/C = M var/list/damaged = C.get_damaged_bodyparts(1,1) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index f447261dd5..fec1422ff1 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -47,4 +47,4 @@ var/list/hand_bodyparts = list() //a collection of arms (or actually whatever the fug /bodyparts you monsters use to wreck my systems) var/icon_render_key = "" - var/static/list/limb_icon_cache = list() + var/static/list/limb_icon_cache = list() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 09486cce18..fb6dcc7959 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -51,6 +51,18 @@ if(!(NOBLOOD in dna.species.species_traits)) internal_organs += new /obj/item/organ/heart + if(!(NOLIVER in dna.species.species_traits)) + if(dna.species.mutantliver) + internal_organs += new dna.species.mutantliver() + else + internal_organs += new /obj/item/organ/liver() + + if(!(NOSTOMACH in dna.species.species_traits)) + if(dna.species.mutantstomach) + internal_organs += new dna.species.mutantstomach() + else + internal_organs += new /obj/item/organ/stomach() + internal_organs += new dna.species.mutanteyes internal_organs += new dna.species.mutantears internal_organs += new dna.species.mutanttongue diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 4e80873e5c..cefb77e248 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -271,13 +271,6 @@ return min(1,thermal_protection) - -/mob/living/carbon/human/handle_chemicals_in_body() - if(reagents) - reagents.metabolize(src, can_overdose=1) - dna.species.handle_chemicals_in_body(src) - - /mob/living/carbon/human/handle_random_events() //Puke if toxloss is too high if(!stat) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 6083cfd5dc..6cdd49e483 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -136,6 +136,11 @@ var/obj/item/organ/ears/ears = C.getorganslot("ears") var/obj/item/organ/tongue/tongue = C.getorganslot("tongue") + var/obj/item/organ/liver/liver = C.getorganslot("liver") + var/obj/item/organ/stomach/stomach = C.getorganslot("stomach") + + + if((NOBLOOD in species_traits) && heart) heart.Remove(C) qdel(heart) @@ -147,6 +152,10 @@ qdel(lungs) lungs = null + QDEL_NULL(liver) + + QDEL_NULL(stomach) + if(C.get_bodypart("head")) if(eyes) qdel(eyes) @@ -170,6 +179,20 @@ lungs = new() lungs.Insert(C) + if((!(NOLIVER in species_traits)) && (!liver)) + if(mutantliver) + liver = new mutantliver() + else + liver = new() + liver.Insert(C) + + if((!(NOSTOMACH in species_traits)) && (!stomach)) + if(mutantstomach) + stomach = new mutantstomach() + else + stomach = new() + stomach.Insert(C) + if((NOHUNGER in species_traits) && appendix) qdel(appendix) else if((!(NOHUNGER in species_traits)) && (!appendix)) @@ -989,10 +1012,10 @@ //LIFE// //////// -/datum/species/proc/handle_chemicals_in_body(mob/living/carbon/human/H) +/datum/species/proc/handle_digestion(mob/living/carbon/human/H) //The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with - if(H.disabilities & FAT) + if(H.disabilities & FAT)//I share your pain, past coder. if(H.overeatduration < 100) to_chat(H, "You feel fit again!") H.disabilities &= ~FAT diff --git a/code/modules/mob/living/carbon/human/species.dm.rej b/code/modules/mob/living/carbon/human/species.dm.rej new file mode 100644 index 0000000000..e10962105a --- /dev/null +++ b/code/modules/mob/living/carbon/human/species.dm.rej @@ -0,0 +1,12 @@ +diff a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm (rejected hunks) +@@ -71,8 +71,8 @@ + var/obj/item/mutanthands = null + var/obj/item/organ/tongue/mutanttongue = /obj/item/organ/tongue + +- var/obj/item/organ/liver/mutantliver = null +- var/obj/item/organ/stomach/mutantstomach = null ++ var/obj/item/organ/liver/mutantliver ++ var/obj/item/organ/stomach/mutantstomach + + /////////// + // PROCS // diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index e1b9f0b86c..6331d15789 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -3,6 +3,8 @@ id = "fly" say_mod = "buzzes" mutanttongue = /obj/item/organ/tongue/fly + mutantliver = /obj/item/organ/liver/fly + mutantstomach = /obj/item/organ/stomach/fly meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/fly /datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index a06943e1cd..59bf481369 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -4,7 +4,7 @@ id = "jelly" default_color = "00FF90" say_mod = "chirps" - species_traits = list(MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER) + species_traits = list(MUTCOLORS,EYECOLOR,NOBLOOD,VIRUSIMMUNE,TOXINLOVER) meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/slime exotic_blood = "slimejelly" damage_overlay_type = "" diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm index 664eabefcd..6ac2934ea4 100644 --- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm +++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm @@ -7,6 +7,8 @@ species_traits = list(NOBLOOD,RESISTCOLD,RADIMMUNE,NOTRANSSTING,VIRUSIMMUNE,NOHUNGER) mutantlungs = /obj/item/organ/lungs/plasmaman mutanttongue = /obj/item/organ/tongue/bone/plasmaman + mutantliver = /obj/item/organ/liver/plasmaman + mutantstomach = /obj/item/organ/stomach/plasmaman dangerous_existence = 1 //So so much blacklisted = 1 //See above burnmod = 1.5 diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 8f18698c0d..cdfa938456 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -3,7 +3,7 @@ name = "Podperson" id = "pod" default_color = "59CE00" - species_traits = list(MUTCOLORS,EYECOLOR) + species_traits = list(MUTCOLORS,EYECOLOR) attack_verb = "slash" attack_sound = 'sound/weapons/slice.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index e50997f634..1d60ae4982 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -22,6 +22,9 @@ //Updates the number of stored chemicals for powers handle_changeling() + if(stat != DEAD) + handle_liver() + if(stat != DEAD) return 1 @@ -279,10 +282,6 @@ radiation = max(radiation-3,0) adjustToxLoss(3) -/mob/living/carbon/handle_chemicals_in_body() - if(reagents) - reagents.metabolize(src) - /mob/living/carbon/handle_stomach() set waitfor = 0 @@ -387,3 +386,42 @@ if(360.15 to INFINITY) //360.15 is 310.15 + 50, the temperature where you start to feel effects. //We totally need a sweat system cause it totally makes sense...~ bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers +///////// +//LIVER// +///////// + +/mob/living/carbon/proc/handle_liver() + var/obj/item/organ/liver/liver = getorganslot("liver") + if(liver) + if(liver.damage >= 100) + liver.failing = TRUE + liver_failure() + else + liver.failing = FALSE + + if(((!(NOLIVER in dna.species.species_traits)) && (!liver))) + liver_failure() + +/mob/living/carbon/proc/undergoing_liver_failure() + var/obj/item/organ/liver/liver = getorganslot("liver") + if(liver && liver.failing) + return TRUE + +/mob/living/carbon/proc/return_liver_damage() + var/obj/item/organ/liver/liver = getorganslot("liver") + if(liver) + return liver.damage + +/mob/living/carbon/proc/applyLiverDamage(var/d) + var/obj/item/organ/liver/L = getorganslot("liver") + if(L) + L.damage += d + +/mob/living/carbon/proc/liver_failure() + if(reagents.get_reagent_amount("corazone"))//corazone is processed here an not in the liver because a failing liver can't metabolize reagents + reagents.remove_reagent("corazone", 0.4) //corazone slowly deletes itself. + return + adjustToxLoss(8) + if(prob(30)) + to_chat(src, "You feel confused and nauseous...")//actual symptoms of liver failure + diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 5ad976fa85..a9eddc6dd0 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -48,10 +48,6 @@ domutcheck() ..() -/mob/living/carbon/monkey/handle_chemicals_in_body() - if(reagents) - reagents.metabolize(src, can_overdose=1) - /mob/living/carbon/monkey/handle_breath_temperature(datum/gas_mixture/breath) if(abs(310.15 - breath.temperature) > 50) switch(breath.temperature) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index bce620d633..f57a48b5c6 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -43,6 +43,8 @@ internal_organs += new /obj/item/organ/tongue internal_organs += new /obj/item/organ/eyes internal_organs += new /obj/item/organ/ears + internal_organs += new /obj/item/organ/liver + internal_organs += new /obj/item/organ/stomach ..() /mob/living/carbon/monkey/movement_delay() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 2df4c83b85..28a6bb5dd4 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -24,9 +24,6 @@ if(stat != DEAD) //Mutations and radiation handle_mutations_and_radiation() - if(stat != DEAD) - //Chemicals in the body - handle_chemicals_in_body() if(stat != DEAD) //Random events (vomiting etc) handle_random_events() @@ -63,9 +60,6 @@ radiation = 0 //so radiation don't accumulate in simple animals return -/mob/living/proc/handle_chemicals_in_body() - return - /mob/living/proc/handle_diginvis() if(!digitaldisguise) src.digitaldisguise = image(loc = src) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 85729df022..944e03190f 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -38,6 +38,8 @@ All effects don't start immediately, but rather get worse over time; the rate is var/mob/living/carbon/human/H = M if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk + var/obj/item/organ/liver/L = H.getorganslot("liver") + H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10) return ..() || . /datum/reagent/consumable/ethanol/reaction_obj(obj/O, reac_volume) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index a59af94aee..56922316f5 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -686,7 +686,7 @@ taste_description = "dull toxin" /datum/reagent/medicine/oculine/on_mob_life(mob/living/M) - var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight") + var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight") if (!eyes) return if(M.disabilities & BLIND) @@ -1129,7 +1129,7 @@ ..() /datum/reagent/medicine/corazone - // Heart attack code will not do as damage if corazone is present + // Heart attack code will not do damage if corazone is present // because it's SPACE MAGIC ASPIRIN name = "Corazone" id = "corazone" diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 726131d12e..9c19826fc5 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -28,9 +28,8 @@ /obj/item/organ/heart/attack_self(mob/user) ..() if(!beating) - visible_message("[user] squeezes [src] to \ - make it beat again!", "You squeeze \ - [src] to make it beat again!") + user.visible_message("[user] squeezes [src] to \ + make it beat again!","You squeeze [src] to make it beat again!") Restart() addtimer(CALLBACK(src, .proc/stop_if_unowned), 80) diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm new file mode 100755 index 0000000000..a1cdd40bfc --- /dev/null +++ b/code/modules/surgery/organs/liver.dm @@ -0,0 +1,66 @@ +#define LIVER_DEFAULT_HEALTH 100 //amount of damage required for liver failure +#define LIVER_DEFAULT_TOX_TOLERANCE 3 //amount of toxins the liver can filter out +#define LIVER_DEFAULT_TOX_LETHALITY 0.5 //lower values lower how harmful toxins are to the liver + +/obj/item/organ/liver + name = "liver" + icon_state = "liver" + origin_tech = "biotech=3" + w_class = WEIGHT_CLASS_NORMAL + zone = "chest" + slot = "liver" + desc = "Pairing suggestion: chianti and fava beans." + var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure + var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol + var/failing //is this liver failing? + var/maxHealth = LIVER_DEFAULT_HEALTH + var/toxTolerance = LIVER_DEFAULT_TOX_TOLERANCE//maximum amount of toxins the liver can just shrug off + var/toxLethality = LIVER_DEFAULT_TOX_LETHALITY//affects how much damage toxins do to the liver + var/filterToxins = TRUE //whether to filter toxins + +/obj/item/organ/liver/on_life() + var/mob/living/carbon/C = owner + + //slowly heal liver damage + damage = max(0, damage - 0.1) + if(damage > maxHealth)//cap liver damage + damage = maxHealth + + if(istype(C)) + if(!failing)//can't process reagents with a failing liver + if(filterToxins) + //handle liver toxin filtration + var/toxamount + var/static/list/listOfToxinsInThisBitch = typesof(/datum/reagent/toxin) + for(var/datum/reagent/toxin/toxin in listOfToxinsInThisBitch) + toxamount += C.reagents.get_reagent_amount(initial(toxin.id)) + + if(toxamount <= toxTolerance && toxamount > 0) + for(var/datum/reagent/toxin/toxin in listOfToxinsInThisBitch) + C.reagents.remove_reagent(initial(toxin.id), 1) + else if(toxamount > toxTolerance) + damage += toxamount*toxLethality + + + //metabolize reagents + C.reagents.metabolize(C, can_overdose=TRUE) + + if(damage > 10 && prob(damage/3))//the higher the damage the higher the probability + to_chat(C, "You feel [pick("nauseous", "dull pain in your lower body", "confused")].") + +/obj/item/organ/liver/prepare_eat() + var/obj/S = ..() + S.reagents.add_reagent("iron", 5) + return S + +/obj/item/organ/liver/fly + name = "insectoid liver" + icon_state = "liver-x" //xenomorph liver? It's just a black liver so it fits. + desc = "A mutant liver designed to handle the unique diet of a flyperson." + alcohol_tolerance = 0.007 //flies eat vomit, so a lower alcohol tolerance is perfect! + +/obj/item/organ/liver/plasmaman + name = "reagent processing crystal" + icon_state = "pliver" + desc = "A large crystal that is somehow capable of metabolizing chemicals, these are found in plasmamen." + diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index e27337a813..12fdadaeb1 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -113,6 +113,26 @@ breathes = FALSE if(NOBLOOD in dna.species.species_traits) blooded = FALSE + var/has_liver = (!(NOLIVER in dna.species.species_traits)) + var/has_stomach = (!(NOSTOMACH in dna.species.species_traits)) + + if(has_liver && !getorganslot("liver")) + var/obj/item/organ/liver/LI + + if(dna.species.mutantliver) + LI = new dna.species.mutantliver() + else + LI = new() + LI.Insert(src) + + if(has_stomach && !getorganslot("stomach")) + var/obj/item/organ/stomach/S + + if(dna.species.mutantstomach) + S = new dna.species.mutantstomach() + else + S = new() + S.Insert(src) if(breathes && !getorganslot("lungs")) var/obj/item/organ/lungs/L = new() diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm new file mode 100755 index 0000000000..74bc7821b0 --- /dev/null +++ b/code/modules/surgery/organs/stomach.dm @@ -0,0 +1,25 @@ +/obj/item/organ/stomach + name = "stomach" + icon_state = "stomach" + origin_tech = "biotech=4" + w_class = WEIGHT_CLASS_NORMAL + zone = "chest" + slot = "stomach" + attack_verb = list("gored", "squished", "slapped", "digested") + desc = "Onaka ga suite imasu." + +/obj/item/organ/stomach/on_life() + var/mob/living/carbon/human/H = owner + + if(istype(H)) + H.dna.species.handle_digestion(H) + +/obj/item/organ/stomach/fly + name = "insectoid stomach" + icon_state = "stomach-x" //xenomorph liver? It's just a black liver so it fits. + desc = "A mutant stomach designed to handle the unique diet of a flyperson." + +/obj/item/organ/stomach/plasmaman + name = "digestive crystal" + icon_state = "pstomach" + desc = "A strange crystal that is responsible for metabolizing the unseen energy force that feeds plasmamen." diff --git a/tgstation.dme b/tgstation.dme index 1daecfda5c..9dafca1869 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2161,8 +2161,10 @@ #include "code\modules\surgery\organs\eyes.dm" #include "code\modules\surgery\organs\heart.dm" #include "code\modules\surgery\organs\helpers.dm" +#include "code\modules\surgery\organs\liver.dm" #include "code\modules\surgery\organs\lungs.dm" #include "code\modules\surgery\organs\organ_internal.dm" +#include "code\modules\surgery\organs\stomach.dm" #include "code\modules\surgery\organs\tails.dm" #include "code\modules\surgery\organs\tongue.dm" #include "code\modules\surgery\organs\vocal_cords.dm"