diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 2dd3b5be982..a7928d8a1e3 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -534,6 +534,9 @@ log_manifest(character.mind.key,character.mind,character,latejoin = TRUE) + if(job == src.previous_job) + log_and_message_admins("[ADMIN_TPMONTY(character)] has spawned as a job they've previously matrixed as ([character.job])!") + /mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee) //TODO: figure out a way to exclude wizards/nukeops/demons from this. for(var/C in GLOB.employmentCabinets) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c0608e7289f..ff79e97cbdc 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -269,7 +269,7 @@ Transfer_mind is there to check if mob is being deleted/not going to have a body Works together with spawning an observer, noted above. */ -/mob/proc/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE, voluntary = FALSE) +/mob/proc/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE, voluntary = FALSE, memorize_job = null) var/sig_flags = SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, can_reenter_corpse, special, penalize) SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE_FINAL, can_reenter_corpse, special, penalize) penalize = !(sig_flags & COMPONENT_DO_NOT_PENALIZE_GHOSTING) && (suiciding || penalize) // suicide squad. @@ -286,6 +286,8 @@ Works together with spawning an observer, noted above. transfer_ckey(ghost, FALSE) if(!QDELETED(ghost)) ghost.client.init_verbs() + if(memorize_job) + ghost.previous_job = memorize_job if(penalize) var/penalty = CONFIG_GET(number/suicide_reenter_round_timer) MINUTES var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5509abdd033..52e8c0fa40b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -562,6 +562,9 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA qdel(M) return + if(src.previous_job) + M.previous_job = src.previous_job + M.key = key diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e2dc5afbec2..db95812692d 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -181,6 +181,9 @@ /// D&D-like reach: how far in tiles is considered adjacent to this mob. Euclidean distance. var/reach = 1 + /// Used for tracking what a ghost's last job was + var/previous_job + /// How much DT does the mob ignore? var/damage_threshold_penetration_mob = 0