mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
513 requirement, user-friendly byond version requirement handling (#15041)
* v1 * docs * AA suggestion Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * MINIMUM VERSION 513 * // => /// Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Kyep <Kyep@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,9 @@
|
||||
// Last world.time that the player tried to request their resources.
|
||||
var/last_ui_resource_send = 0
|
||||
|
||||
/// If true, client cannot ready up, late join, or observe. Used for players with EXTREMELY old byond versions.
|
||||
var/version_blocked = FALSE
|
||||
|
||||
/// Date the client registered their BYOND account on
|
||||
var/byondacc_date
|
||||
/// Days since the client's BYOND account was created
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
|
||||
#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.
|
||||
#define MIN_CLIENT_VERSION 513 // Minimum byond major version required to play.
|
||||
//I would just like the code ready should it ever need to be used.
|
||||
#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
|
||||
@@ -324,11 +324,9 @@
|
||||
if(connection != "seeker") //Invalid connection type.
|
||||
return null
|
||||
if(byond_version < MIN_CLIENT_VERSION) // Too out of date to play at all. Unfortunately, we can't send them a message here.
|
||||
return null
|
||||
version_blocked = TRUE
|
||||
if(byond_build < config.minimum_client_build)
|
||||
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
|
||||
version_blocked = TRUE
|
||||
|
||||
var/show_update_prompt = FALSE
|
||||
if(byond_version < SUGGESTED_CLIENT_VERSION) // Update is suggested, but not required.
|
||||
@@ -418,7 +416,7 @@
|
||||
apply_clickcatcher()
|
||||
|
||||
if(show_update_prompt)
|
||||
to_chat(src, "<span class='userdanger'>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 <a href='https://www.byond.com/download/'>Byond.com</a> before playing.</span>")
|
||||
show_update_notice()
|
||||
|
||||
check_forum_link()
|
||||
|
||||
@@ -1090,6 +1088,8 @@
|
||||
if(notify && (byondacc_age < config.byond_account_age_threshold))
|
||||
message_admins("[key] has just connected for the first time. BYOND account registered on [byondacc_date] ([byondacc_age] days old)")
|
||||
|
||||
/client/proc/show_update_notice()
|
||||
to_chat(src, "<span class='userdanger'>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 <a href='https://www.byond.com/download/'>byond.com</a> before playing. You can also update via the BYOND launcher application.</span>")
|
||||
|
||||
#undef LIMITER_SIZE
|
||||
#undef CURRENT_SECOND
|
||||
|
||||
Reference in New Issue
Block a user