Skip to content

Commit

Permalink
Port of a Port for Matrix Logging (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurrain committed Apr 20, 2024
1 parent 25454d9 commit 0d5573a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0d5573a

Please sign in to comment.