mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] BYOND 516 Compatibility (#9382)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c5c603926d
commit
111e61a0a3
@@ -185,6 +185,10 @@
|
||||
//CONNECT//
|
||||
///////////
|
||||
/client/New(TopicData)
|
||||
// TODO: Remove version check with 516
|
||||
if(byond_version >= 516) // Enable 516 compat browser storage mechanisms
|
||||
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS]")
|
||||
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(!(connection in list("seeker", "web"))) //Invalid connection type.
|
||||
@@ -314,6 +318,12 @@
|
||||
fully_created = TRUE
|
||||
attempt_auto_fit_viewport()
|
||||
|
||||
// TODO: Remove version check with 516
|
||||
if(byond_version >= 516)
|
||||
// Now that we're fully initialized, use our prefs
|
||||
if(prefs?.read_preference(/datum/preference/toggle/browser_dev_tools))
|
||||
winset(src, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
|
||||
|
||||
//////////////
|
||||
//DISCONNECT//
|
||||
//////////////
|
||||
|
||||
@@ -81,3 +81,15 @@
|
||||
savefile_key = "AutoPunctuation"
|
||||
default_value = FALSE
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/browser_dev_tools
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "BrowserDevTools"
|
||||
default_value = FALSE
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/browser_dev_tools/apply_to_client(client/client, value)
|
||||
if(value)
|
||||
winset(client, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS],devtools")
|
||||
else
|
||||
winset(client, null, "browser-options=[DEFAULT_CLIENT_BROWSER_OPTIONS]")
|
||||
|
||||
Reference in New Issue
Block a user