[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>
This commit is contained in:
SkyratBot
2022-09-13 21:43:47 +02:00
committed by GitHub
parent 2d72fdda89
commit bbd7797dd2
+2 -1
View File
@@ -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)