mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Cleans up observer mind on control transfer, ghosting, DNR, suicide (#47826)
* Fixes admin ghost drag * Covers more cases * And assume control
This commit is contained in:
@@ -906,16 +906,16 @@
|
||||
qdel(C)
|
||||
return kicked_client_names
|
||||
|
||||
//returns 1 to let the dragdrop code know we are trapping this event
|
||||
//returns 0 if we don't plan to trap the event
|
||||
//returns TRUE to let the dragdrop code know we are trapping this event
|
||||
//returns FALSE if we don't plan to trap the event
|
||||
/datum/admins/proc/cmd_ghost_drag(mob/dead/observer/frommob, mob/tomob)
|
||||
|
||||
//this is the exact two check rights checks required to edit a ckey with vv.
|
||||
if (!check_rights(R_VAREDIT,0) || !check_rights(R_SPAWN|R_DEBUG,0))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (!frommob.ckey)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/question = ""
|
||||
if (tomob.ckey)
|
||||
@@ -924,12 +924,18 @@
|
||||
|
||||
var/ask = alert(question, "Place ghost in control of mob?", "Yes", "No")
|
||||
if (ask != "Yes")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
tomob.ghostize(0)
|
||||
// Disassociates observer mind from the body mind
|
||||
if(tomob.client)
|
||||
tomob.ghostize(FALSE)
|
||||
else
|
||||
for(var/mob/dead/observer/ghost in GLOB.dead_mob_list)
|
||||
if(tomob.mind == ghost.mind)
|
||||
ghost.mind = null
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has put [frommob.key] in control of [tomob.name].</span>")
|
||||
log_admin("[key_name(usr)] stuffed [frommob.key] into [tomob.name].")
|
||||
@@ -938,7 +944,7 @@
|
||||
tomob.ckey = frommob.ckey
|
||||
qdel(frommob)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/client/proc/adminGreet(logout)
|
||||
if(SSticker.HasRoundStarted())
|
||||
|
||||
Reference in New Issue
Block a user