reverted organ refactor #28913

reverts #28913
This commit is contained in:
shizcalev
2017-07-11 22:08:57 -04:00
parent c62f2e0e2d
commit 62b32d3f7a
19 changed files with 32 additions and 221 deletions
@@ -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()
@@ -51,18 +51,6 @@
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
@@ -267,6 +267,13 @@
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)
@@ -71,9 +71,6 @@
var/obj/item/mutanthands = null
var/obj/item/organ/tongue/mutanttongue = /obj/item/organ/tongue
var/obj/item/organ/liver/mutantliver
var/obj/item/organ/stomach/mutantstomach
///////////
// PROCS //
///////////
@@ -132,11 +129,6 @@
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)
@@ -148,10 +140,6 @@
qdel(lungs)
lungs = null
QDEL_NULL(liver)
QDEL_NULL(stomach)
if(C.get_bodypart("head"))
if(eyes)
qdel(eyes)
@@ -175,20 +163,6 @@
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))
@@ -853,10 +827,10 @@
//LIFE//
////////
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
/datum/species/proc/handle_chemicals_in_body(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)//I share your pain, past coder.
if(H.disabilities & FAT)
if(H.overeatduration < 100)
to_chat(H, "<span class='notice'>You feel fit again!</span>")
H.disabilities &= ~FAT
@@ -3,8 +3,6 @@
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)
@@ -7,8 +7,6 @@
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
+4 -42
View File
@@ -22,9 +22,6 @@
//Updates the number of stored chemicals for powers
handle_changeling()
if(stat != DEAD)
handle_liver()
if(stat != DEAD)
return 1
@@ -281,6 +278,10 @@
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
@@ -385,42 +386,3 @@
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", 1) //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
@@ -48,6 +48,10 @@
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)
@@ -43,8 +43,6 @@
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()
+6
View File
@@ -24,6 +24,9 @@
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()
@@ -57,6 +60,9 @@
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)