mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Fix things breaking in tgui if the asset transport type is changed mid round (#66317)
This bug breaks disabling the cdn mid round if the cdn is broken, as well as enabling it mid round if it started the round disabled. some things fail back to byond transfers, but not all things.
This commit is contained in:
committed by
GitHub
parent
0ad2231d2b
commit
731f8f7f5b
@@ -12,7 +12,8 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
/datum/asset
|
||||
var/_abstract = /datum/asset
|
||||
var/cached_url_mappings
|
||||
var/cached_serialized_url_mappings
|
||||
var/cached_serialized_url_mappings_transport_type
|
||||
|
||||
/// Whether or not this asset should be loaded in the "early assets" SS
|
||||
var/early = FALSE
|
||||
@@ -31,10 +32,11 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
/// Returns a cached tgui message of URL mappings
|
||||
/datum/asset/proc/get_serialized_url_mappings()
|
||||
if (isnull(cached_url_mappings))
|
||||
cached_url_mappings = TGUI_CREATE_MESSAGE("asset/mappings", get_url_mappings())
|
||||
if (isnull(cached_serialized_url_mappings) || cached_serialized_url_mappings_transport_type != SSassets.transport.type)
|
||||
cached_serialized_url_mappings = TGUI_CREATE_MESSAGE("asset/mappings", get_url_mappings())
|
||||
cached_serialized_url_mappings_transport_type = SSassets.transport.type
|
||||
|
||||
return cached_url_mappings
|
||||
return cached_serialized_url_mappings
|
||||
|
||||
/datum/asset/proc/register()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user