diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index a7a17de8814..c5bd01c196d 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -327,7 +327,6 @@ /datum/asset/spritesheet/decals name = "floor_decals" - cross_round_cachable = TRUE /// The floor icon used for blend_preview_floor() var/preview_floor_icon = 'icons/turf/floors.dmi' diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 52ed5932a70..8512c253bb0 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -26,6 +26,7 @@ GLOBAL_LIST_EMPTY(asset_datums) /// Whether or not this asset can be cached across rounds of the same commit under the `CACHE_ASSETS` config. /// This is not a *guarantee* the asset will be cached. Not all asset subtypes respect this field, and the /// config can, of course, be disabled. + /// Disable this if your asset can change between rounds on the same exact version of the code. var/cross_round_cachable = FALSE /datum/asset/New() @@ -133,6 +134,7 @@ GLOBAL_LIST_EMPTY(asset_datums) /datum/asset/spritesheet _abstract = /datum/asset/spritesheet + cross_round_cachable = TRUE var/name /// List of arguments to pass into queuedInsert /// Exists so we can queue icon insertion, mostly for stuff like preferences @@ -145,6 +147,9 @@ GLOBAL_LIST_EMPTY(asset_datums) /// If this asset should be fully loaded on new /// Defaults to false so we can process this stuff nicely var/load_immediately = FALSE + VAR_PRIVATE + // Kept in state so that the result is the same, even when the files are created, for this run + should_refresh = null /datum/asset/spritesheet/proc/should_load_immediately() #ifdef DO_NOT_DEFER_ASSETS @@ -158,9 +163,6 @@ GLOBAL_LIST_EMPTY(asset_datums) if (..()) return TRUE - // Static so that the result is the same, even when the files are created, for this run - var/static/should_refresh = null - if (isnull(should_refresh)) // `fexists` seems to always fail on static-time should_refresh = !fexists("[ASSET_CROSS_ROUND_CACHE_DIRECTORY]/spritesheet.[name].css") diff --git a/code/modules/asset_cache/assets/emojipedia.dm b/code/modules/asset_cache/assets/emojipedia.dm index 2197f1bff22..200e3770ff4 100644 --- a/code/modules/asset_cache/assets/emojipedia.dm +++ b/code/modules/asset_cache/assets/emojipedia.dm @@ -1,7 +1,5 @@ /datum/asset/spritesheet/emojipedia name = "emojipedia" - cross_round_cachable = TRUE // The Emoji DMI is static and doesn't change without a commit mis-match. /datum/asset/spritesheet/emojipedia/create_spritesheets() InsertAll("", EMOJI_SET) - diff --git a/code/modules/client/preferences/assets.dm b/code/modules/client/preferences/assets.dm index 6fa29b9f90f..a75178cc3e1 100644 --- a/code/modules/client/preferences/assets.dm +++ b/code/modules/client/preferences/assets.dm @@ -2,7 +2,6 @@ /datum/asset/spritesheet/preferences name = "preferences" early = TRUE - cross_round_cachable = TRUE /datum/asset/spritesheet/preferences/create_spritesheets() var/list/to_insert = list() diff --git a/code/modules/client/preferences/middleware/antags.dm b/code/modules/client/preferences/middleware/antags.dm index 52593aad912..3ed69267d75 100644 --- a/code/modules/client/preferences/middleware/antags.dm +++ b/code/modules/client/preferences/middleware/antags.dm @@ -108,7 +108,6 @@ /datum/asset/spritesheet/antagonists name = "antagonists" early = TRUE - cross_round_cachable = TRUE /// Mapping of spritesheet keys -> icons var/list/antag_icons = list() diff --git a/code/modules/client/preferences/middleware/species.dm b/code/modules/client/preferences/middleware/species.dm index 16954cf8bf7..b8c5e000680 100644 --- a/code/modules/client/preferences/middleware/species.dm +++ b/code/modules/client/preferences/middleware/species.dm @@ -9,7 +9,6 @@ /datum/asset/spritesheet/species name = "species" early = TRUE - cross_round_cachable = TRUE /datum/asset/spritesheet/species/create_spritesheets() var/list/to_insert = list()