Diona Overhaul - SEP2016 (#442)

This commit is contained in:
NanakoAC
2016-09-09 23:55:48 +03:00
committed by skull132
parent a65c4290d6
commit 804851f6f6
83 changed files with 2597 additions and 442 deletions
+1 -1
View File
@@ -275,11 +275,11 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
var/obj/effect/decal/cleanable/blood/B
var/decal_type = /obj/effect/decal/cleanable/blood/splatter
var/turf/T = get_turf(target)
if(istype(source,/mob/living/carbon/human))
var/mob/living/carbon/human/M = source
source = M.get_blood(M.vessel)
// Are we dripping or splattering?
var/list/drips = list()
// Only a certain number of drips (or one large splatter) can be on a given turf.
+14
View File
@@ -82,6 +82,11 @@ var/list/organ_cache = list()
if(istype(loc,/obj/item/device/mmi) || istype(loc,/obj/item/bodybag/cryobag) || istype(loc,/obj/structure/closet/crate/freezer))
return
//Set/remove bad organ status, only every 10 ticks to reduce processing
//Unfortunately internal organs aren't a special subclass so this runs on every organ
if (owner && owner.life_tick % 10 == 0)
internal_set_bad()
//Process infections
if (robotic >= 2 || (owner && owner.species && (owner.species.flags & IS_PLANT)))
germ_level = 0
@@ -99,12 +104,21 @@ var/list/organ_cache = list()
if(damage >= max_damage)
die()
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
//** Handle antibiotics and curing infections
handle_antibiotics()
handle_rejection()
handle_germ_effects()
/obj/item/organ/proc/internal_set_bad()
if(!istype(src, /obj/item/organ/external))//if the organ is an internal one
if (damage)
if (!(src in owner.bad_internal_organs))
owner.bad_internal_organs.Add(src)
else
owner.bad_internal_organs.Remove(src)
/obj/item/organ/proc/handle_germ_effects()
//** Handle the effects of infections
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
+17 -11
View File
@@ -22,6 +22,7 @@
amputation_point = "branch"
joint = "structural ligament"
dislocated = -1
status = ORGAN_PLANT
/obj/item/organ/external/diona/chest
name = "core trunk"
@@ -136,27 +137,39 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
if(prob(50) && spawn_diona_nymph_from_organ(src))
qdel(src)
/obj/item/organ/diona/process()
return
if(loc != owner)
owner = null
//Set/remove bad organ status, only every 10 ticks to reduce processing
//Unfortunately internal organs aren't a special subclass so this runs on every organ
if (owner && owner.life_tick % 10 == 0)
internal_set_bad()
germ_level = 0//Diona don't get infections or organ decay
/obj/item/organ/diona/strata
name = "neural strata"
parent_organ = "chest"
organ_tag = "neural strata"
/obj/item/organ/diona/bladder
name = "gas bladder"
parent_organ = "head"
organ_tag = "gas bladder"
/obj/item/organ/diona/polyp
name = "polyp segment"
parent_organ = "groin"
organ_tag = "polyp segment"
/obj/item/organ/diona/ligament
name = "anchoring ligament"
parent_organ = "groin"
organ_tag = "anchoring ligament"
/obj/item/organ/diona
name = "diona nymph"
@@ -169,8 +182,6 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
if(prob(50) && spawn_diona_nymph_from_organ(src))
qdel(src)
// These are different to the standard diona organs as they have a purpose in other
// species (absorbing radiation and light respectively)
@@ -181,18 +192,13 @@
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
/obj/item/organ/diona/nutrients/removed()
return
/obj/item/organ/diona/node
name = "response node"
parent_organ = "head"
organ_tag = "receptor node"
organ_tag = "response node"
icon = 'icons/mob/alien.dmi'
icon_state = "claw"
/obj/item/organ/diona/node/removed()
return
//CORTICAL BORER ORGANS.
/obj/item/organ/borer
+6 -3
View File
@@ -167,6 +167,9 @@
spawn(1)
get_icon()
if ((status & ORGAN_PLANT))
cannot_break = 1
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
owner = target
if(istype(owner))
@@ -413,7 +416,7 @@ This function completely restores a damaged organ to perfect condition.
//Determines if we even need to process this organ.
/obj/item/organ/external/proc/need_process()
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
if(status && status != ORGAN_ROBOT && status != ORGAN_PLANT) // If it's robotic, that's fine it will have a status.
return 1
if(brute_dam || burn_dam)
return 1
@@ -446,7 +449,7 @@ This function completely restores a damaged organ to perfect condition.
trace_chemicals.Remove(chemID)
//Bone fractures
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
if(config.bones_can_break && !(status & ORGAN_ROBOT) && !(status & ORGAN_PLANT) && brute_dam > min_broken_damage * config.organ_health_multiplier)
src.fracture()
if(!(status & ORGAN_BROKEN))
@@ -557,7 +560,7 @@ Note that amputating the affected organ does in fact remove the infection from t
//Updating wounds. Handles wound natural I had some free spachealing, internal bleedings and infections
/obj/item/organ/external/proc/update_wounds()
if((status & ORGAN_ROBOT) || (status & ORGAN_ADV_ROBOT)) //Robotic limbs don't heal or get worse.
if((status & ORGAN_ROBOT) || (status & ORGAN_ADV_ROBOT) || (status & ORGAN_PLANT)) //Robotic limbs don't heal or get worse. Diona limbs heal using their own mechanic
return
var/updatehud
for(var/datum/wound/W in wounds)