From a2007d007bfa469c4027badd320e2698f73fd148 Mon Sep 17 00:00:00 2001 From: Lucy Date: Mon, 8 Jun 2026 01:37:09 -0400 Subject: [PATCH] use the chat spritesheet for byond member ooc icons (#96384) ## About The Pull Request partial port of my fixups from https://github.com/Monkestation/Monkestation2.0/pull/11644 this refactors the byond member icon in OOC use the chat spritesheet, instead of `icon2html`. 2026-06-06 (1780794864) ~
dreamseeker also as a result, this makes the byond member icon align better with the text and be slightly less crunchy. here's how it was before, for reference: image ## Why It's Good For The Game why did this use icon2html that's dumb. better performance i guess. and looks better on the eyes. ## Changelog :cl: fix: Made the BYOND member OOC icon better aligned to the text. /:cl: --- code/modules/asset_cache/assets/chat.dm | 4 ++++ code/modules/client/verbs/ooc.dm | 25 ++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/code/modules/asset_cache/assets/chat.dm b/code/modules/asset_cache/assets/chat.dm index 471e8ce85dc..890f05afe39 100644 --- a/code/modules/asset_cache/assets/chat.dm +++ b/code/modules/asset_cache/assets/chat.dm @@ -11,3 +11,7 @@ if (icon != 'icons/ui/chat/language.dmi') var/icon_state = initial(L.icon_state) insert_icon("language-[icon_state]", uni_icon(icon, icon_state)) + + var/datum/universal_icon/byond_member = uni_icon('icons/ui/chat/member_content.dmi', "blag") + byond_member.scale(16, 16) + insert_icon("byond_member", byond_member) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 7aa9ffd8fb8..cb02dc6d248 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -77,12 +77,27 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8") mob.log_talk(raw_msg, LOG_OOC) var/keyname = key - if(prefs.unlock_content) - if(prefs.toggles & MEMBER_PUBLIC) - keyname = "[icon2html('icons/ui/chat/member_content.dmi', world, "blag")][keyname]" + var/list/key_tags + var/key_prefix = "" + var/visible_unlock = prefs.unlock_content && (prefs.toggles & MEMBER_PUBLIC) + + // heart first lol if(prefs.hearted) - var/datum/asset/spritesheet_batched/sheet = get_asset_datum(/datum/asset/spritesheet_batched/chat) - keyname = "[sheet.icon_tag("emoji-heart")][keyname]" + LAZYADD(key_tags, "emoji-heart") + if(visible_unlock) + LAZYADD(key_tags, "byond_member") + + if(LAZYLEN(key_tags)) + var/datum/asset/spritesheet_batched/chat/sheet = get_asset_datum(/datum/asset/spritesheet_batched/chat) + for(var/icon_name in key_tags) + key_prefix = "[key_prefix][sheet.icon_tag(icon_name)]" + key_prefix = "[key_prefix]" + + keyname = "[key_prefix][keyname]" + + if(visible_unlock) + keyname = "[keyname]" + //The linkify span classes and linkify=TRUE below make ooc text get clickable chat href links if you pass in something resembling a url for(var/client/receiver as anything in GLOB.clients) if(!receiver.prefs) // Client being created or deleted. Despite all, this can be null.