From 7c3f12e5e472a3522568771d491d38bc9f484049 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 5 Oct 2018 09:38:05 -0400 Subject: [PATCH] Merge pull request #40690 from ShizCalev/default-religion-runtime Fixes default religion preference runtime --- code/__DEFINES/jobs.dm | 3 +++ code/modules/client/preferences.dm | 4 ++++ code/modules/jobs/job_types/civilian_chaplain.dm | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index dc4080a789b2..ef3952e7075c 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -48,3 +48,6 @@ #define JOB_UNAVAILABLE_PLAYTIME 3 #define JOB_UNAVAILABLE_ACCOUNTAGE 4 #define JOB_UNAVAILABLE_SLOTFULL 5 + +#define DEFAULT_RELIGION "Christianity" +#define DEFAULT_DEITY "Space Jesus" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e86aecb40f94..5ba0b126189b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1671,6 +1671,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) return pick(GLOB.clown_names) if("mime") return pick(GLOB.mime_names) + if("religion") + return DEFAULT_RELIGION + if("deity") + return DEFAULT_DEITY return random_unique_name() /datum/preferences/proc/ask_for_custom_name(mob/user,name_id) diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/civilian_chaplain.dm index 6a44cd9118e5..12c9d5be391e 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/civilian_chaplain.dm @@ -39,11 +39,11 @@ Chaplain H.put_in_hands(N) return - var/new_religion = "Christianity" + var/new_religion = DEFAULT_RELIGION if(M.client && M.client.prefs.custom_names["religion"]) new_religion = M.client.prefs.custom_names["religion"] - var/new_deity = "Space Jesus" + var/new_deity = DEFAULT_DEITY if(M.client && M.client.prefs.custom_names["deity"]) new_deity = M.client.prefs.custom_names["deity"] @@ -51,7 +51,7 @@ Chaplain switch(lowertext(new_religion)) - if("christianity") + if("christianity") // DEFAULT_RELIGION B.name = pick("The Holy Bible","The Dead Sea Scrolls") if("satanism") B.name = "The Unholy Bible"