Skip to content

Commit

Permalink
Attempt at fixing the modular persistence runtimes (#3701)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Oct 6, 2024
1 parent fab538a commit 0fa1251
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/datums/mind/_mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@
return martial_art
return FALSE

/datum/mind/proc/get_ghost(even_if_they_cant_reenter, ghosts_with_clients)
/datum/mind/proc/get_ghost(even_if_they_cant_reenter, ghosts_with_clients) as /mob/dead/observer
RETURN_TYPE(/mob/dead/observer)
for(var/mob/dead/observer/G in (ghosts_with_clients ? GLOB.player_list : GLOB.dead_mob_list))
if(G.mind == src)
if(G.can_reenter_corpse || even_if_they_cant_reenter)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ GLOBAL_LIST_INIT(modular_persistence_ignored_vars, list(
WRITE_FILE(json_file, json_encode(json))

/// Saves the persistence data for the owner.
/mob/living/carbon/human/proc/save_individual_persistence(var/ckey)
/mob/living/carbon/human/proc/save_individual_persistence(ckey)
var/obj/item/organ/internal/brain/brain = get_organ_slot(ORGAN_SLOT_BRAIN)

return brain?.modular_persistence?.save_data(ckey)
return brain?.modular_persistence?.save_data(ckey || src.ckey || brain?.brainmob?.ckey || ckey(mind?.key) || mind?.get_ghost(TRUE)?.ckey)

0 comments on commit 0fa1251

Please sign in to comment.