mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
516 compatibility for browsers (#20652)
this is a bit of https://github.com/cmss13-devs/cmss13/pull/8646 https://github.com/cmss13-devs/cmss13/pull/8875 https://github.com/cmss13-devs/cmss13/pull/8606 https://github.com/cmss13-devs/cmss13/pull/8607 https://github.com/cmss13-devs/cmss13/pull/8359 https://github.com/cmss13-devs/cmss13/pull/7860 ( and thus https://github.com/ParadiseSS13/Paradise/pull/25105 https://github.com/ParadiseSS13/Paradise/pull/25205 https://github.com/ParadiseSS13/Paradise/pull/25363 https://github.com/ParadiseSS13/Paradise/pull/26423 and https://github.com/ParadiseSS13/Paradise/pull/26433 ) https://github.com/tgstation/tgstation/pull/89766 in order to work properly - using the efficient storage method, instead of the byond json method - github pages needs to be enabled and built from the gh-pages branch. because yeah --------- Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
This commit is contained in:
@@ -477,6 +477,8 @@ GLOBAL_LIST_EMPTY(gamemode_cache)
|
||||
var/asset_cdn_webroot = ""
|
||||
var/asset_cdn_url = null
|
||||
|
||||
var/storage_cdn_iframe = "https://aurorastation.github.io/aurora.3/iframe.html"
|
||||
|
||||
GENERAL_PROTECT_DATUM(/datum/configuration)
|
||||
|
||||
/datum/configuration/New()
|
||||
@@ -1087,6 +1089,9 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
|
||||
if("asset_cdn_url")
|
||||
asset_cdn_url = (value[length(value)] != "/" ? (value + "/") : value)
|
||||
|
||||
if("storage_cdn_iframe")
|
||||
storage_cdn_iframe = value
|
||||
|
||||
else
|
||||
log_config("Unknown setting in configuration: '[name]'")
|
||||
|
||||
@@ -1181,6 +1186,8 @@ GENERAL_PROTECT_DATUM(/datum/configuration)
|
||||
load_away_sites_config()
|
||||
load_exoplanets_config()
|
||||
|
||||
Master.OnConfigLoad()
|
||||
|
||||
/datum/configuration/proc/save_logging_config()
|
||||
rustg_file_write(json_encode(GLOB.config.logsettings), "config/logging.json")
|
||||
rustg_file_write(json_encode(GLOB.config.logfiles), "config/logging_files.json")
|
||||
|
||||
@@ -34,6 +34,24 @@ PROCESSING_SUBSYSTEM_DEF(tgui)
|
||||
basehtml = replacetextEx(basehtml, "<!-- tgui:inline-polyfill -->", polyfill)
|
||||
basehtml = replacetextEx(basehtml, "<!-- tgui:nt-copyright -->", "NanoTrasen © 2457-[text2num(time2text(world.realtime, "YYYY")) + 442]")
|
||||
|
||||
/datum/controller/subsystem/processing/tgui/OnConfigLoad()
|
||||
var/storage_iframe = GLOB.config.storage_cdn_iframe
|
||||
if(storage_iframe && storage_iframe != /datum/configuration::storage_cdn_iframe)
|
||||
basehtml = replacetextEx(basehtml, "tgui:storagecdn", storage_iframe)
|
||||
return
|
||||
|
||||
if(GLOB.config.asset_transport == "webroot")
|
||||
var/datum/asset_transport/webroot/webroot = SSassets.transport
|
||||
|
||||
var/datum/asset_cache_item/item = webroot.register_asset("iframe.html", file("tgui/public/iframe.html"))
|
||||
basehtml = replacetext(basehtml, "tgui:storagecdn", webroot.get_asset_url("iframe.html", item))
|
||||
return
|
||||
|
||||
if(!storage_iframe)
|
||||
return
|
||||
|
||||
basehtml = replacetextEx(basehtml, "tgui:storagecdn", storage_iframe)
|
||||
|
||||
/datum/controller/subsystem/processing/tgui/Shutdown()
|
||||
close_all_uis()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user