Persistent clients and body recovery (#29974)

* Persistent clients and body recovery

* Update code/_globalvars/lists/mob_lists.dm

Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>

---------

Signed-off-by: Charlie Nolan <funnyman3595@gmail.com>
Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
This commit is contained in:
Charlie Nolan
2025-08-19 13:42:43 +00:00
committed by GitHub
co-authored by PollardTheDragon
parent e43a88de5b
commit 1d068fe25c
25 changed files with 128 additions and 93 deletions
+18 -7
View File
@@ -1746,18 +1746,29 @@
to_chat(usr, "<span class='warning'>This will only work on /mob/dead/observer</span>")
return
var/posttransformoutfit = usr.client.robust_dress_shop()
var/list/potential_minds = list()
for(var/datum/mind/mind in G.client.persistent.minds)
if(ckey(mind.key) == G.ckey && isnull(mind.current) && mind.destroyed_body_json)
potential_minds += mind
var/outfit = usr.client.robust_dress_shop(potential_minds)
if(!posttransformoutfit)
if(!outfit)
return
var/mob/living/carbon/human/H = G.incarnate_ghost()
var/mob/M
if(istype(outfit, /datum/mind))
M = G.incarnate_ghost(outfit)
if(posttransformoutfit && istype(H))
H.equipOutfit(posttransformoutfit)
log_admin("[key_name(M)] was rebuilt from a mind backup by [key_name(owner)]")
message_admins("[key_name_admin(M)] was rebuilt from a mind backup by [key_name_admin(owner)]")
else
M = G.incarnate_ghost()
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.equipOutfit(outfit)
log_admin("[key_name(G)] was incarnated by [key_name(owner)]")
message_admins("[key_name_admin(G)] was incarnated by [key_name_admin(owner)]")
log_admin("[key_name(M)] was incarnated by [key_name(owner)]")
message_admins("[key_name_admin(M)] was incarnated by [key_name_admin(owner)]")
else if(href_list["togmutate"])
if(!check_rights(R_SPAWN)) return