From 76c3436f1ea3fd9f7b9c83c5ea08129abfdf4937 Mon Sep 17 00:00:00 2001 From: Kyep <16434066+Kyep@users.noreply.github.com> Date: Wed, 2 Dec 2020 21:18:27 +0000 Subject: [PATCH] Better "please update byond" prompts (#15014) * Better "please update byond" prompts * AA suggestion, update text, add link, remove space, display after MOTD * space Co-authored-by: Kyep --- code/modules/client/client_procs.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 289aa3ec68f..5caf7eb3359 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -8,7 +8,9 @@ #define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen? #define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing. //I would just like the code ready should it ever need to be used. -#define SUGGESTED_CLIENT_VERSION 511 // only integers (e.g: 510, 511) useful here. Does not properly handle minor versions (e.g: 510.58, 511.848) +#define SUGGESTED_CLIENT_VERSION 513 // only integers (e.g: 513, 514) are useful here. This is the part BEFORE the ".", IE 513 out of 513.1536 +#define SUGGESTED_CLIENT_BUILD 1536 // only integers (e.g: 1536, 1539) are useful here. This is the part AFTER the ".", IE 1536 out of 513.1536 + #define SSD_WARNING_TIMER 30 // cycles, not seconds, so 30=60s #define LIMITER_SIZE 5 @@ -327,8 +329,13 @@ alert(src, "You are using a byond build which is not supported by this server. Please use a build version of atleast [config.minimum_client_build].", "Incorrect build", "OK") qdel(src) return + + var/show_update_prompt = FALSE if(byond_version < SUGGESTED_CLIENT_VERSION) // Update is suggested, but not required. - to_chat(src,"Your BYOND client (v: [byond_version]) is out of date. This can cause glitches. We highly suggest you download the latest client from http://www.byond.com/ before playing. ") + show_update_prompt = TRUE + else if(byond_version == SUGGESTED_CLIENT_VERSION && byond_build < SUGGESTED_CLIENT_BUILD) + show_update_prompt = TRUE + // Actually sent to client much later, so it appears after MOTD. to_chat(src, "If the title screen is black, resources are still downloading. Please be patient until the title screen appears.") @@ -410,6 +417,9 @@ generate_clickcatcher() apply_clickcatcher() + if(show_update_prompt) + to_chat(src, "Your BYOND client (v: [byond_version].[byond_build]) is out of date. This can cause glitches. We highly suggest you download the latest client from Byond.com before playing.") + check_forum_link() if(GLOB.custom_event_msg && GLOB.custom_event_msg != "")