From 5941e802ee8090684c0e1ff336b496859702c73f Mon Sep 17 00:00:00 2001 From: Emmett Gaines Date: Wed, 15 Nov 2017 05:39:25 -0500 Subject: [PATCH] 511 client fix and a config to make the version warning a popup (#32757) * 511 client fix * cache list memes --- .../configuration/entries/config.dm | 2 ++ .../environmental/LINDA_turf_tile.dm | 8 ++++---- code/modules/client/client_procs.dm | 18 +++++++++++++----- config/config.txt | 2 ++ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index 2c7e5c97cfe..39739593fc7 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -318,6 +318,8 @@ CONFIG_DEF(number/client_warn_version) CONFIG_DEF(string/client_warn_message) value = "Your version of byond may have issues or be blocked from accessing this server in the future." +CONFIG_DEF(flag/client_warn_popup) + CONFIG_DEF(number/client_error_version) value = null min_val = 500 diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index b90f27c372c..5ef9469295d 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -106,13 +106,13 @@ #if DM_VERSION >= 512 if (atmos_overlay_types) for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added - vis_contents -= overlay + vars["vis_contents"] -= overlay if (new_overlay_types.len) if (atmos_overlay_types) - vis_contents += new_overlay_types - atmos_overlay_types //don't add overlays that already exist + vars["vis_contents"] += new_overlay_types - atmos_overlay_types //don't add overlays that already exist else - vis_contents += new_overlay_types + vars["vis_contents"] += new_overlay_types #else if (atmos_overlay_types) for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added @@ -126,7 +126,7 @@ #endif UNSETEMPTY(new_overlay_types) - atmos_overlay_types = new_overlay_types + src.atmos_overlay_types = new_overlay_types /turf/open/proc/tile_graphic() . = new /list diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 09dcce52c7c..866dc6c359d 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -255,11 +255,19 @@ GLOBAL_LIST(external_rsc_urls) qdel(src) return 0 else if (byond_version < cwv) //We have words for this client. - to_chat(src, "Your version of byond may be getting out of date:") - to_chat(src, CONFIG_GET(string/client_warn_message)) - to_chat(src, "Your version: [byond_version]") - to_chat(src, "Required version to remove this message: [cwv] or later") - to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.") + if(CONFIG_GET(flag/client_warn_popup)) + var/msg = "Your version of byond may be getting out of date:
" + msg += CONFIG_GET(string/client_warn_message) + "

" + msg += "Your version: [byond_version]
" + msg += "Required version to remove this message: [cwv] or later
" + msg += "Visit http://www.byond.com/download/ to get the latest version of byond.
" + src << browse(msg, "window=warning_popup") + else + to_chat(src, "Your version of byond may be getting out of date:") + to_chat(src, CONFIG_GET(string/client_warn_message)) + to_chat(src, "Your version: [byond_version]") + to_chat(src, "Required version to remove this message: [cwv] or later") + to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.") if (connection == "web" && !holder) if (!CONFIG_GET(flag/allow_webclient)) diff --git a/config/config.txt b/config/config.txt index ba10f04c398..a91aeba6019 100644 --- a/config/config.txt +++ b/config/config.txt @@ -339,7 +339,9 @@ AUTOADMIN_RANK Game Master ## This allows you to configure the minimum required client version, as well as a warning version, and message for both. ## These trigger for any version below (non-inclusive) the given version, so 510 triggers on 509 or lower. ## These messages will be followed by one stating the clients current version and the required version for clarity. +## If CLIENT_WARN_POPUP is uncommented a popup window with the message will be displayed instead #CLIENT_WARN_VERSION 511 +#CLIENT_WARN_POPUP #CLIENT_WARN_MESSAGE Byond released 511 as the stable release. You can set the framerate your client runs at, which makes the game feel very different and cool. Shortly after its release we will end up using 511 client features and you will be forced to update. CLIENT_ERROR_VERSION 511 CLIENT_ERROR_MESSAGE Your version of byond is not supported. Please upgrade.