mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user