Files
Bubberstation/code/modules/asset_cache/assets/fish.dm
disappointedButNotSuprised 5178c35330 Fix roundstart seed and fish asset runtimes (#71452)
## 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.
2022-11-24 20:42:04 +01:00

22 lines
672 B
Plaintext

/datum/asset/spritesheet/fish
name = "fish"
/datum/asset/spritesheet/fish/create_spritesheets()
var/list/id_list = list()
for (var/path in subtypesof(/obj/item/fish))
var/obj/item/fish/fish_type = path
var/fish_icon = initial(fish_type.icon)
var/fish_icon_state = initial(fish_type.icon_state)
var/id = sanitize_css_class_name("[fish_icon][fish_icon_state]")
if(id in id_list) //no dupes
continue
id_list += id
Insert(id, fish_icon, fish_icon_state)
/datum/asset/simple/fishing_minigame
assets = list(
"fishing_background_default" = 'icons/ui_icons/fishing/default.png',
"fishing_background_lavaland" = 'icons/ui_icons/fishing/lavaland.png'
)