Skip to content

Commit

Permalink
fixes chat icons and fishing window icons (#3691)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
title
## Changelog

:cl:
fix: chat icons work again
fix: fishing UI has icons again
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
thgvr authored Nov 2, 2024
1 parent c85649f commit b3f1dcd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 0 additions & 2 deletions code/modules/asset_cache/asset_list.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
22 changes: 4 additions & 18 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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(
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion code/modules/tgui_panel/tgui_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b3f1dcd

Please sign in to comment.