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
@@ -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
@@ -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
+13 -5
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))