Adds separate MMI/borg messages for damaged brains (#41306)

* Adds separate MMI/borg messages for damaged brains

* better switch toggle msg, M.brain?.damaged_brain

* ree

* thanks helen

* I hate Mondays

* Update code/modules/mob/living/brain/MMI.dm

Co-Authored-By: 81Denton <32391752+81Denton@users.noreply.github.com>

* condenses vars
This commit is contained in:
81Denton
2018-11-10 01:34:49 +01:00
committed by yogstation13-bot
parent dd7e51cddd
commit 6877c7a609
2 changed files with 11 additions and 2 deletions

View File

@@ -254,10 +254,14 @@
to_chat(user, "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>")
return
if(BM.stat == DEAD || BM.suiciding || (M.brain && (M.brain.brain_death || M.brain.damaged_brain || M.brain.suicided)))
if(BM.stat == DEAD || BM.suiciding || (M.brain && (M.brain.brain_death || M.brain.suicided)))
to_chat(user, "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>")
return
if(M.brain?.damaged_brain)
to_chat(user, "<span class='warning'>The MMI indicates that the brain is damaged!</span>")
return
if(jobban_isbanned(BM, "Cyborg") || QDELETED(src) || QDELETED(BM) || QDELETED(user) || QDELETED(M) || !Adjacent(user))
if(!QDELETED(M))
to_chat(user, "<span class='warning'>This [M.name] does not seem to fit!</span>")

View File

@@ -57,10 +57,14 @@
newbrain.brainmob = null
brainmob.forceMove(src)
brainmob.container = src
if(!newbrain.brain_death && !newbrain.damaged_brain && !newbrain.suicided && !brainmob.suiciding) // the brain organ hasn't been beaten to death, nor was from a suicider.
var/fubar_brain = newbrain.brain_death && newbrain.suicided && brainmob.suiciding //brain is damaged beyond repair or from a suicider
if(!fubar_brain && !newbrain.damaged_brain) // the brain organ hasn't been beaten to death, nor was from a suicider.
brainmob.stat = CONSCIOUS //we manually revive the brain mob
GLOB.dead_mob_list -= brainmob
GLOB.alive_mob_list += brainmob
else if(!fubar_brain && newbrain.damaged_brain) // the brain is damaged, but not from a suicider
to_chat(user, "<span class='warning'>[src]'s indicator light turns yellow and its brain integrity alarm beeps softly. Perhaps you should check [newbrain] for damage.</span>")
playsound(src, "sound/machines/synth_no.ogg", 5, TRUE)
else
to_chat(user, "<span class='warning'>[src]'s indicator light turns red and its brainwave activity alarm beeps softly. Perhaps you should check [newbrain] again.</span>")
playsound(src, "sound/weapons/smg_empty_alarm.ogg", 5, TRUE)
@@ -190,6 +194,7 @@
/obj/item/mmi/examine(mob/user)
..()
to_chat(user, "<span class='notice'>There is a switch to toggle the radio system [radio.on ? "off" : "on"].[brain ? " It is currently being covered by [brain]." : null]</span>")
if(brainmob)
var/mob/living/brain/B = brainmob
if(!B.key || !B.mind || B.stat == DEAD)