From 7de7b942a66728f41b6e284a776a4ef537dddb73 Mon Sep 17 00:00:00 2001 From: Segrain Date: Wed, 2 Aug 2023 14:46:27 +0400 Subject: [PATCH] Shuffling checks around. --- code/modules/client/preferences.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f576aa8136f1..4f1161709657 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1943,7 +1943,7 @@ var/const/MAX_SAVE_SLOTS = 10 /// Loads appropriate character slot for the given job as assigned in preferences. -/datum/preferences/proc/find_assigned_slot(job_title, is_late_join = FALSE, check_datacore = FALSE) +/datum/preferences/proc/find_assigned_slot(job_title, is_late_join = FALSE) if(toggle_prefs & (is_late_join ? TOGGLE_LATE_JOIN_CURRENT_SLOT : TOGGLE_START_JOIN_CURRENT_SLOT)) return var/slot_for_job = pref_job_slots[job_title] @@ -1951,22 +1951,21 @@ var/const/MAX_SAVE_SLOTS = 10 if(JOB_SLOT_RANDOMISED_SLOT) be_random_body = TRUE be_random_name = TRUE - check_datacore = FALSE if(1 to MAX_SAVE_SLOTS) load_character(slot_for_job) - if(check_datacore) - for(var/datum/data/record/record as anything in GLOB.data_core.locked) - if(record.fields["name"] == real_name) - be_random_body = TRUE - be_random_name = TRUE - return /// Transfers both physical characteristics and character information to character /datum/preferences/proc/copy_all_to(mob/living/carbon/human/character, job_title, is_late_join = FALSE, check_datacore = FALSE) if(!istype(character)) return - find_assigned_slot(job_title, is_late_join, check_datacore) + find_assigned_slot(job_title, is_late_join) + if(check_datacore && !(be_random_body && be_random_name)) + for(var/datum/data/record/record as anything in GLOB.data_core.locked) + if(record.fields["name"] == real_name) + be_random_body = TRUE + be_random_name = TRUE + break if(be_random_name) real_name = random_name(gender)