511 client fix and a config to make the version warning a popup

This commit is contained in:
Emmett Gaines
2017-11-15 05:39:25 -05:00
committed by CitadelStationBot
parent 809951c56c
commit ab21f8d5ed
4 changed files with 36 additions and 6 deletions

View File

@@ -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

View File

@@ -98,6 +98,24 @@
/turf/open/proc/update_visuals()
var/list/new_overlay_types = tile_graphic()
<<<<<<< HEAD
=======
#if DM_VERSION >= 513
#warning 512 is stable now for sure, remove the old code
#endif
#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
vars["vis_contents"] -= overlay
if (new_overlay_types.len)
if (atmos_overlay_types)
vars["vis_contents"] += new_overlay_types - atmos_overlay_types //don't add overlays that already exist
else
vars["vis_contents"] += new_overlay_types
#else
>>>>>>> 5941e80... 511 client fix and a config to make the version warning a popup (#32757)
if (atmos_overlay_types)
for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added
cut_overlay(overlay)
@@ -109,7 +127,7 @@
add_overlay(new_overlay_types)
UNSETEMPTY(new_overlay_types)
atmos_overlay_types = new_overlay_types
src.atmos_overlay_types = new_overlay_types
/turf/open/proc/tile_graphic()
. = new /list

View File

@@ -256,11 +256,19 @@ GLOBAL_LIST(external_rsc_urls)
qdel(src)
return 0
else if (byond_version < cwv) //We have words for this client.
to_chat(src, "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>")
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 = "<b>Your version of byond may be getting out of date:</b><br>"
msg += CONFIG_GET(string/client_warn_message) + "<br><br>"
msg += "Your version: [byond_version]<br>"
msg += "Required version to remove this message: [cwv] or later<br>"
msg += "Visit http://www.byond.com/download/ to get the latest version of byond.<br>"
src << browse(msg, "window=warning_popup")
else
to_chat(src, "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>")
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))

View File

@@ -329,7 +329,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.