mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 08:34:23 +00:00
## About The Pull Request Fixes annoying roundstart runtimes coming from a wrong deduplication method. `sprites[id]` was empty at the time of the check and only got filled when it started actually building the spritesheet. Now it's tracked in a local variable. No changelog update since it's not visible on the player side.
15 lines
446 B
Plaintext
15 lines
446 B
Plaintext
/datum/asset/spritesheet/seeds
|
|
name = "seeds"
|
|
|
|
/datum/asset/spritesheet/seeds/create_spritesheets()
|
|
var/list/id_list = list()
|
|
for (var/path in subtypesof(/obj/item/seeds))
|
|
var/obj/item/seeds/seed_type = path
|
|
var/icon = initial(seed_type.icon)
|
|
var/icon_state = initial(seed_type.icon_state)
|
|
var/id = sanitize_css_class_name("[icon][icon_state]")
|
|
if(id in id_list) //no dupes
|
|
continue
|
|
id_list += id
|
|
Insert(id, icon, icon_state)
|