Merge pull request #2005 from Citadel-Station-13/upstream-merge-29223

[MIRROR] Organ Update [Cloning isn't broken edition]
This commit is contained in:
LetterJay
2017-07-15 23:18:53 -05:00
committed by GitHub
24 changed files with 249 additions and 37 deletions

View File

@@ -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()

View File

@@ -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

View File

@@ -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)

View File

@@ -68,6 +68,9 @@
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
var/obj/item/organ/ears/mutantears = /obj/item/organ/ears
var/obj/item/organ/tongue/mutanttongue = /obj/item/organ/tongue
var/obj/item/organ/liver/mutantliver
var/obj/item/organ/stomach/mutantstomach
//Hands
var/obj/item/mutanthands = null
@@ -136,6 +139,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 +155,10 @@
qdel(lungs)
lungs = null
QDEL_NULL(liver)
QDEL_NULL(stomach)
if(C.get_bodypart("head"))
if(eyes)
qdel(eyes)
@@ -170,6 +182,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 +1015,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, "<span class='notice'>You feel fit again!</span>")
H.disabilities &= ~FAT

View File

@@ -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 //

View File

@@ -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)

View File

@@ -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 = ""

View File

@@ -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

View File

@@ -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'

View File

@@ -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, "<span class='notice'>You feel confused and nauseous...</span>")//actual symptoms of liver failure

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)