Files
00807234b9 refactors asset subsystem (#6459)
refactors the asset subsystem to make it much more managed

adds support for 'deferred' assets for tgui, which will be later used
for things like tgui character setup and admin panels.
deferred means that it'll be 'sent in a timely manner after the ui
opens', as opposed to 'sent before the ui opens'

---------

Co-authored-by: silicons <no@you.cat>
2024-06-01 17:08:13 -06:00

17 lines
515 B
Plaintext

/datum/asset_pack/spritesheet/loadout
name = "loadout"
/datum/asset_pack/spritesheet/loadout/generate()
for(var/name in gear_datums)
var/datum/loadout_entry/entry = gear_datums[name]
var/item_id = entry.legacy_get_id()
if(!item_id)
continue
var/item_path = entry.path
if(!ispath(item_path, /obj/item))
continue
var/obj/item/item_casted = item_path
var/item_icon = initial(item_casted.icon)
var/item_icon_state = initial(item_casted.icon_state)
insert(item_id, item_icon, item_icon_state)