Well it compiles; just synthtissue and TongueLoss now.

This commit is contained in:
Fermi
2019-09-19 01:14:12 +01:00
parent dfa40a4b22
commit 107dd67cbe
29 changed files with 107 additions and 106 deletions
+16 -12
View File
@@ -7,7 +7,7 @@
layer = ABOVE_MOB_LAYER
zone = BODY_ZONE_HEAD
slot = ORGAN_SLOT_BRAIN
organ_flags |= ORGAN_VITAL
organ_flags = ORGAN_VITAL
attack_verb = list("attacked", "slapped", "whacked")
///The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth
decay_factor = STANDARD_ORGAN_DECAY / 2 //30 minutes of decaying to result in a fully damaged brain, since a fast decay rate would be unfun gameplay-wise
@@ -16,7 +16,7 @@
low_threshold = 45
high_threshold = 120
var/mob/living/brain/brainmob = null
var/organ_flags & ORGAN_FAILING = FALSE //whether the brain organ is damaged.
var/brain_death = FALSE //if the brainmob was intentionally killed by attacking the brain after removal, or by severe braindamage
var/decoy_override = FALSE //I apologize to the security players, and myself, who abused this, but this is going to go.
//two variables necessary for calculating whether we get a brain trauma or not
var/damage_delta = 0
@@ -103,16 +103,16 @@
if((organ_flags & ORGAN_FAILING) && O.is_drainable() && O.reagents.has_reagent("neurine")) //Neurine fixes dead brains
. = TRUE //don't do attack animation.
var/cached_Bdamage = brainmob?.health
var/cached_Bdamage = brainmob?.health
var/datum/reagent/medicine/neurine/N = reagents.has_reagent("neurine")
if(O.reagents.has_reagent("mannitol")//Just a quick way to bolster the effects if someone mixes up a batch.
if(O.reagents.has_reagent("mannitol"))//Just a quick way to bolster the effects if someone mixes up a batch.
N.volume *= 1.5
if(!O.reagents.has_reagent("neurine", 10))
to_chat(user, "<span class='warning'>There's not enough neurine in [O] to restore [src]!</span>")
return
user.visible_message("<span class='notice'>[user] starts to pour the contents of [O] onto [src].</span>", "<span class='notice'>You start to slowly pour the contents of [O] onto [src].</span>")
if(!do_after(user, 60, TRUE, src))
to_chat(user, "<span class='warning'>You failed to pour [O] onto [src]!</span>")
@@ -123,10 +123,10 @@
O.reagents.clear_reagents()
if(cached_Bdamage) //Fixing dead brains yeilds a trauma
if(cached_Bdamage <= HEALTH_THRESHOLD_DEAD && brainmob.health > HEALTH_THRESHOLD_DEAD)
if((cached_Bdamage <= HEALTH_THRESHOLD_DEAD) && (brainmob.health > HEALTH_THRESHOLD_DEAD))
if(prob(90))
gain_trauma_type(BRAIN_TRAUMA_MILD)
if else(prob(50))
else if(prob(50))
gain_trauma_type(BRAIN_TRAUMA_SEVERE)
else
gain_trauma_type(BRAIN_TRAUMA_SPECIAL)
@@ -136,8 +136,8 @@
. = TRUE //don't do attack animation.
var/datum/reagent/medicine/mannitol/M = reagents.has_reagent("mannitol")
if(brain_death || brainmob?.health <= HEALTH_THRESHOLD_DEAD) //if the brain is fucked anyway, do nothing
to_chat(user, "<span class='warning'>[src] is far too damaged, you'll have to use neurine on it!</span>")
return
to_chat(user, "<span class='warning'>[src] is far too damaged, you'll have to use neurine on it!</span>")
return
if(!O.reagents.has_reagent("mannitol", 10))
to_chat(user, "<span class='warning'>There's not enough mannitol in [O] to restore [src]!</span>")
@@ -152,13 +152,13 @@
setOrganDamage((damage - (0.05 * maxHealth)*M.volume)) //heals a small amount, and by using "setorgandamage", we clear the failing variable if that was up
O.reagents.clear_reagents()
return
/obj/item/organ/brain/examine(mob/user)//BUG_PROBABLE_CAUSE to_chats changed to . +=
/obj/item/organ/brain/examine(mob/user)//BUG_PROBABLE_CAUSE to_chats changed to . +=
. = ..()
if(suicided)
if(user.suiciding)
. += "<span class='info'>It's started turning slightly grey. They must not have been able to handle the stress of it all.</span>"
else if(brainmob)
if(brainmob.get_ghost(FALSE, TRUE))
@@ -247,6 +247,10 @@
owner.death()
brain_death = TRUE
/obj/item/organ/brain/on_death()
if(damage <= BRAIN_DAMAGE_DEATH) //rip
brain_death = FALSE
/obj/item/organ/brain/process() //needs to run in life AND death
..()
//if we're not more injured than before, return without gambling for a trauma
+1 -1
View File
@@ -20,7 +20,7 @@
else if(istype(loc, /obj/item/organ/brain))
BR = loc
if(BR)
BR.organ_flags & ORGAN_FAILING = 1 //beaten to a pulp
BR.brain_death = TRUE
/mob/living/brain/proc/handle_emp_damage()
if(emp_damage)