From b3f1dcdee8430f0c10486a5aaaef6a2fa9657520 Mon Sep 17 00:00:00 2001 From: thgvr <81882910+thgvr@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:20:19 -0700 Subject: [PATCH] fixes chat icons and fishing window icons (#3691) ## About The Pull Request title ## Changelog :cl: fix: chat icons work again fix: fishing UI has icons again /:cl: --- code/modules/asset_cache/asset_list.dm | 2 -- code/modules/asset_cache/asset_list_items.dm | 22 ++++---------------- code/modules/tgui_panel/tgui_panel.dm | 1 - 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 221febbe14d4..84170c1b78ed 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -124,8 +124,6 @@ GLOBAL_LIST_EMPTY(asset_datums) for(var/size_id in sizes) .["[name]_[size_id].png"] = SSassets.transport.get_asset_url("[name]_[size_id].png") - - /datum/asset/spritesheet/proc/ensure_stripped(sizes_to_strip = sizes) for(var/size_id in sizes_to_strip) var/size = sizes[size_id] diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index d233b74ee69c..8e12d57a05d3 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -162,30 +162,15 @@ ) parents = list("font-awesome.css" = 'html/font-awesome/css/all.min.css') -/datum/asset/simple/namespaced/tgfont - assets = list( - "tgfont.eot" = file("tgui/packages/tgfont/static/tgfont.eot"), - "tgfont.woff2" = file("tgui/packages/tgfont/static/tgfont.woff2"), - ) - parents = list( - "tgfont.css" = file("tgui/packages/tgfont/static/tgfont.css"), - ) - /datum/asset/simple/fonts assets = list( "sga.ttf" = 'html/sga.ttf' ) -/// Override this in order to start the creation of the spritehseet. -/// This is where all your Insert, InsertAll, etc calls should be inside. -/datum/asset/spritesheet/proc/create_spritesheets() - SHOULD_CALL_PARENT(FALSE) - CRASH("create_spritesheets() not implemented for [type]!") - /datum/asset/spritesheet/chat name = "chat" -/datum/asset/spritesheet/chat/create_spritesheets() +/datum/asset/spritesheet/chat/register() InsertAll("emoji", EMOJI_SET) // pre-loading all lanugage icons also helps to avoid meta InsertAll("language", 'icons/misc/language.dmi') @@ -196,6 +181,7 @@ if (icon != 'icons/misc/language.dmi') var/icon_state = initial(L.icon_state) Insert("language-[icon_state]", icon, icon_state=icon_state) + ..() /datum/asset/simple/lobby assets = list( @@ -443,8 +429,8 @@ /datum/asset/spritesheet/fish name = "fish" -/datum/asset/spritesheet/fish/create_spritesheets() - for (var/path in subtypesof(/obj/item/fish)) +/datum/asset/spritesheet/fish/register() + 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) diff --git a/code/modules/tgui_panel/tgui_panel.dm b/code/modules/tgui_panel/tgui_panel.dm index 1a6fcb37e429..44fbffd917ce 100644 --- a/code/modules/tgui_panel/tgui_panel.dm +++ b/code/modules/tgui_panel/tgui_panel.dm @@ -49,7 +49,6 @@ get_asset_datum(/datum/asset/simple/tgui_panel), )) window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome)) - window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/tgfont)) window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat)) request_telemetry() addtimer(CALLBACK(src, PROC_REF(on_initialize_timed_out)), 5 SECONDS)