mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Fixes defibbed corpse not getting blind overlay despite being in crit.
Brain mobs that are beaten to death can still be inserted inside a brainless human corpse but defibbing the corpse cannot work (the brain is too damaged). On the other hand cloning that corpse will still work. Deffibing a brainless corpse no longer gives "further attempts may be successful". Fixes brain mob's container var not being nullified on Destroy().
This commit is contained in:
@@ -187,7 +187,7 @@
|
||||
user << "<span class='warning'>The mmi indicates that their mind is currently inactive; it might change!</span>"
|
||||
return
|
||||
|
||||
if(BM.stat == DEAD || BM.health <= config.health_threshold_dead)
|
||||
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
|
||||
user << "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -488,9 +488,12 @@
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return. Further attempts futile.</span>"
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.</span>"
|
||||
else if(H.get_ghost() || !H.getorgan(/obj/item/organ/internal/brain))
|
||||
else if(H.get_ghost())
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
|
||||
|
||||
else
|
||||
var/obj/item/organ/internal/brain/BR = H.getorgan(/obj/item/organ/internal/brain)
|
||||
if(!BR || BR.damaged_brain)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing or damaged beyond point of no return. Further attempts futile.</span>"
|
||||
|
||||
if(failed)
|
||||
user.visible_message(failed)
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
newbrain.brainmob = null
|
||||
brainmob.loc = src
|
||||
brainmob.container = src
|
||||
if(brainmob.health > config.health_threshold_dead)
|
||||
brainmob.stat = CONSCIOUS
|
||||
dead_mob_list -= brainmob //Update dem lists
|
||||
if(!newbrain.damaged_brain) // the brain organ hasn't beaten to death.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
dead_mob_list -= brainmob
|
||||
living_mob_list += brainmob
|
||||
|
||||
brainmob.reset_perspective()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/mob/living/carbon/brain
|
||||
languages = HUMAN
|
||||
var/obj/item/container = null
|
||||
var/obj/item/device/mmi/container = null
|
||||
var/timeofhostdeath = 0
|
||||
var/emp_damage = 0//Handles a type of MMI damage
|
||||
has_limbs = 0
|
||||
@@ -21,6 +21,7 @@
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
container = null
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/update_canmove()
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
origin_tech = "biotech=4"
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
var/mob/living/carbon/brain/brainmob = null
|
||||
var/damaged_brain = 0 //whether the brain organ is damaged.
|
||||
|
||||
/obj/item/organ/internal/brain/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
@@ -58,6 +59,7 @@
|
||||
brainmob << "<span class='notice'>You feel slightly disoriented. That's normal when you're just a brain.</span>"
|
||||
|
||||
/obj/item/organ/internal/brain/attackby(obj/item/O, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(brainmob)
|
||||
O.attack(brainmob, user) //Oh noooeeeee
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
return
|
||||
stat = DEAD
|
||||
|
||||
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
|
||||
if(!gibbed && container)//If not gibbed but in a container.
|
||||
var/obj/item/device/mmi = container
|
||||
mmi.visible_message("<span class='warning'>[src]'s MMI flatlines!</span>", \
|
||||
"<span class='italics'>You hear something flatline.</span>")
|
||||
@@ -12,7 +12,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/gib(animation = 0)
|
||||
if(container && istype(container, /obj/item/device/mmi))
|
||||
if(container)
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/internal/brain))
|
||||
|
||||
@@ -8,15 +8,19 @@
|
||||
/mob/living/carbon/brain/handle_environment(datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/update_stat()
|
||||
if(status_flags & GODMODE)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(health <= config.health_threshold_dead)
|
||||
if(stat != DEAD)
|
||||
death()
|
||||
var/obj/item/organ/internal/brain/BR
|
||||
if(container && container.brain)
|
||||
BR = container.brain
|
||||
else if(istype(loc, /obj/item/organ/internal/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.damaged_brain = 1 //beaten to a pulp
|
||||
|
||||
/* //currently unused feature, since brain outside a mmi is always dead.
|
||||
/mob/living/carbon/brain/proc/handle_brain_revival_life()
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
|
||||
/mob/living/death(gibbed)
|
||||
unset_machine()
|
||||
reset_perspective(null)
|
||||
timeofdeath = world.time
|
||||
tod = worldtime2text()
|
||||
if(mind)
|
||||
@@ -50,7 +49,8 @@
|
||||
stunned = 0
|
||||
weakened = 0
|
||||
sleeping = 0
|
||||
update_sight()
|
||||
blind_eyes(1)
|
||||
reset_perspective(null)
|
||||
hide_fullscreens()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
for(var/t in organs)
|
||||
qdel(t)
|
||||
|
||||
var/mob/living/silicon/robot/R = new /mob/living/silicon/robot( loc )
|
||||
var/mob/living/silicon/robot/R = new /mob/living/silicon/robot(loc)
|
||||
|
||||
// cyborgs produced by Robotize get an automatic power cell
|
||||
R.cell = new(R)
|
||||
|
||||
Reference in New Issue
Block a user