From a2fb4eb5abe34f734547a9622cdf8655a2a8360e Mon Sep 17 00:00:00 2001 From: nevimer <77420409+nevimer@users.noreply.github.com> Date: Mon, 13 Dec 2021 05:43:09 -0500 Subject: [PATCH] [SEMI-MODULAR]Require flavour text to join the round. (#9969) * Place 1 missing distro pipe segment * Revert "[MIRROR] Gasmaks tint and tint calculation update (Oranges approved edition) [MDB IGNORE] (#9817)" This reverts commit d0987f545e035f741e9d7f595636c15797179810. * Revert "Revert "[MIRROR] Gasmaks tint and tint calculation update (Oranges approved edition) [MDB IGNORE] (#9817)"" This reverts commit df2c3caa41f60a6711ff59e290edc835154fcd9f. * Require flavour text to enter the round. * Update code/__DEFINES/jobs.dm Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com> * 150 min * request for unicode Co-authored-by: SkyratBot Co-authored-by: nevimer Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com> --- code/__DEFINES/jobs.dm | 2 +- code/controllers/subsystem/job.dm | 6 ++++++ code/modules/mob/dead/new_player/new_player.dm | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index fea0a1b95f5..881e8967615 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -6,7 +6,7 @@ #define JOB_UNAVAILABLE_SLOTFULL 5 /// Job unavailable due to incompatibility with an antag role. #define JOB_UNAVAILABLE_ANTAG_INCOMPAT 6 - +#define JOB_UNAVAILABLE_FLAVOUR 7 // SKYRAT EDIT ADDITION #define DEFAULT_RELIGION "Christianity" #define DEFAULT_DEITY "Space Jesus" #define DEFAULT_BIBLE "Default Bible Name" diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index a976fe6c20e..3c4efcae17c 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -951,6 +951,12 @@ SUBSYSTEM_DEF(job) if(possible_job.has_banned_species(player.client.prefs)) JobDebug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_SPECIES)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]") return JOB_UNAVAILABLE_SPECIES + + if(length_char(player.client.prefs.read_preference(/datum/preference/text/flavor_text)) <= 150) + JobDebug("[debug_prefix] Error: [get_job_unavailable_error_message(JOB_UNAVAILABLE_FLAVOUR)], Player: [player][add_job_to_log ? ", Job: [possible_job]" : ""]") + return JOB_UNAVAILABLE_FLAVOUR + + //SKYRAT EDIT END // Run this check after is_banned_from since it can query the DB which may sleep. diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index cb3b84cddc2..d5c004709ed 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -161,6 +161,8 @@ return "[jobtitle] is restricted from your languages." if(JOB_UNAVAILABLE_SPECIES) return "[jobtitle] is restricted from your species." + if(JOB_UNAVAILABLE_FLAVOUR) + return "[jobtitle] requires you to have flavour text for your character." //SKYRAT EDIT END if(JOB_UNAVAILABLE_ANTAG_INCOMPAT) return "[jobtitle] is not compatible with some antagonist role assigned to you."