mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
[FIX] Mobs that were offered up to ghosts no longer get taken over by their old owners (#26650)
* Grab_ghost now checks the ckey of the mind * Remove superfluous loops for getting ghosts. * Early return for MMI --------- Co-authored-by: adrermail@gmail.com <adrermail@gmail.com>
This commit is contained in:
co-authored by
adrermail@gmail.com <adrermail@gmail.com>
parent
98912fcea9
commit
8d82546d9d
@@ -221,13 +221,7 @@
|
||||
if(!just_sleeping)
|
||||
msg += "<span class='deadsay'>[p_they(TRUE)] [p_are()] limp and unresponsive; there are no signs of life"
|
||||
if(get_int_organ(/obj/item/organ/internal/brain) && !key)
|
||||
var/foundghost = FALSE
|
||||
if(mind)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.mind == mind && G.can_reenter_corpse)
|
||||
foundghost = TRUE
|
||||
break
|
||||
if(!foundghost)
|
||||
if(!get_ghost())
|
||||
msg += " and [p_their()] soul has departed"
|
||||
msg += "...</span>\n"
|
||||
|
||||
|
||||
@@ -175,7 +175,8 @@
|
||||
theghost = pick(candidates)
|
||||
to_chat(M, "Your mob has been taken over by a ghost!")
|
||||
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)])")
|
||||
M.ghostize()
|
||||
var/mob/dead/observer/ghost = M.ghostize(TRUE) // Keep them respawnable
|
||||
ghost.can_reenter_corpse = FALSE // but keep them out of their old body
|
||||
M.key = theghost.key
|
||||
dust_if_respawnable(theghost)
|
||||
else
|
||||
|
||||
@@ -59,14 +59,7 @@
|
||||
. += "You can feel a bright spark of life in this one!"
|
||||
return
|
||||
if(brainmob?.mind)
|
||||
var/foundghost = FALSE
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.mind == brainmob.mind)
|
||||
foundghost = TRUE
|
||||
if(!G.can_reenter_corpse)
|
||||
foundghost = FALSE
|
||||
break
|
||||
if(foundghost)
|
||||
if(brainmob.get_ghost())
|
||||
. += "You can feel the small spark of life still left in this one."
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user