From bbd7797dd2b9107f1a1e9a42cf8bffbbe70355d3 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 13 Sep 2022 21:43:47 +0200 Subject: [PATCH] [MIRROR] Fixes asset caching [MDB IGNORE] (#16189) * Fixes asset caching (#69852) The asset was being loaded, seeing that fully_generated is false, so it attempts to rebuild. The rebuilding clears the existing file cache, and fucks us. Life is pain. * Fixes asset caching Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> --- code/modules/asset_cache/asset_list.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 29811d906d6..2ea1c789d4e 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -159,6 +159,7 @@ GLOBAL_LIST_EMPTY(asset_datums) CRASH("spritesheet [type] cannot register without a name") if (!should_refresh() && read_from_cache()) + fully_generated = TRUE return // If it's cached, may as well load it now, while the loading is cheap @@ -355,7 +356,7 @@ GLOBAL_LIST_EMPTY(asset_datums) size[SPRSZ_STRIPPED] = null sheet_copy.Insert(I, icon_state=sprite_name) size[SPRSZ_ICON] = sheet_copy - + sprites[sprite_name] = list(size_id, position) else sizes[size_id] = size = list(1, I, null)