mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Resolve confusing and conflicting brain and MMI messages due to old oversight in MMIs. SEE FULL CHANGE.
May be controversial as it fixes an old MMI oversight. https://github.com/d3athrow/vgstation13/issues/6138#issuecomment-148282918 Fixes #6138
This commit is contained in:
@@ -74,7 +74,6 @@
|
||||
/datum/mind/New(var/key)
|
||||
src.key = key
|
||||
|
||||
|
||||
/datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/mind/proc/transfer_to() called tick#: [world.time]")
|
||||
if(!istype(new_character))
|
||||
@@ -1454,3 +1453,11 @@ proc/clear_memory(var/silent = 1)
|
||||
..()
|
||||
mind.assigned_role = "Armalis"
|
||||
mind.special_role = "Vox Raider"
|
||||
|
||||
|
||||
/proc/mind_can_reenter(var/datum/mind/mind)
|
||||
if(mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == mind)
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -95,6 +95,7 @@
|
||||
return
|
||||
makeMoMMI(user)
|
||||
|
||||
|
||||
/obj/machinery/mommi_spawner/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(!..())
|
||||
if(istype(O,/obj/item/device/mmi))
|
||||
@@ -105,14 +106,9 @@
|
||||
if(!mmi.brainmob)
|
||||
user << "<span class='warning'>\The [mmi] appears to be devoid of any soul.</span>"
|
||||
return 1
|
||||
|
||||
if(!mmi.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(mmi.brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == mmi.brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
if(!mind_can_reenter(mmi.brainmob.mind))
|
||||
user << "<span class='notice'>\The [src] indicates that their mind is completely unresponsive; there's no point.</span>"
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -169,14 +169,8 @@
|
||||
user << "<span class='warning'>Sticking an empty [W] into the frame would sort of defeat the purpose.</span>"
|
||||
return
|
||||
if(!M.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(M.brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
user << "<span class='notice'>The [W] is completely unresponsive; there's no point.</span>"
|
||||
if(!mind_can_reenter(M.brainmob.mind))
|
||||
user << "<span class='notice'>\The [W] is completely unresponsive; there's no point.</span>"
|
||||
return
|
||||
|
||||
if(M.brainmob.stat == DEAD)
|
||||
|
||||
@@ -49,13 +49,7 @@ obj/item/device/mmi/Destroy()
|
||||
user << "<span class='warning'>What are you doing oh god put the brain back in.</span>"
|
||||
return TRUE
|
||||
if(!brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
if(!mind_can_reenter(brainmob.mind))
|
||||
user << "<span class='notice'>\The [src] indicates that their mind is completely unresponsive; there's no point.</span>"
|
||||
return TRUE
|
||||
if(brainmob.stat == DEAD)
|
||||
@@ -115,13 +109,7 @@ obj/item/device/mmi/Destroy()
|
||||
|
||||
// Checking to see if the ghost has been moused/borer'd/etc since death.
|
||||
var/mob/living/carbon/brain/BM = BO.brainmob
|
||||
var/ghost_can_reenter = 0
|
||||
if(BM.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == BM.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
if(!mind_can_reenter(BM.mind))
|
||||
user << "<span class='notice'>\The [src] indicates that their mind is completely unresponsive; there's no point.</span>"
|
||||
return
|
||||
src.visible_message("<span class='notice'>[user] sticks \a [O] into \the [src].</span>")
|
||||
|
||||
@@ -42,7 +42,11 @@
|
||||
/obj/item/organ/brain/examine(mob/user)
|
||||
..()
|
||||
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
|
||||
user << "<span class='notice'>You can feel the small spark of life still left in this one.</span>"
|
||||
if(mind_can_reenter(brainmob.mind))// This checks if the ghost can re-enter (ghost.can_reenter_corpse)
|
||||
user << "<span class='deadsay'>This one seems unresponsive.</span>" // Should probably make this more realistic,
|
||||
// but this message ties it in with MMI errors.
|
||||
else
|
||||
user << "<span class='notice'>You can feel the small spark of life still left in this one.</span>"
|
||||
else
|
||||
user << "<span class='deadsay'>This one seems particularly lifeless. Perhaps it will regain some of its luster later..</span>"
|
||||
|
||||
|
||||
@@ -53,13 +53,7 @@
|
||||
user << "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose.</span>"
|
||||
return
|
||||
if(!B.brainmob.key)
|
||||
var/ghost_can_reenter = 0
|
||||
if(B.brainmob.mind)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.can_reenter_corpse && G.mind == B.brainmob.mind)
|
||||
ghost_can_reenter = 1
|
||||
break
|
||||
if(!ghost_can_reenter)
|
||||
if(!mind_can_reenter(B.brainmob.mind))
|
||||
user << "<span class='notice'>[O] is completely unresponsive; there's no point.</span>"
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user