Skip to content

Commit

Permalink
Misc titles icons are now shown in ooc, ooc icons for asay and mentor…
Browse files Browse the repository at this point in the history
…say, adding missing icons (#8009)

# About the pull request

This pr does multiple things:

1. Adds missing icons for some ranks like Appeals Overseer and such,
makes icon of them be visible in ooc.


![dreamseeker_iYyPpi9yji](https://github.com/user-attachments/assets/214e03ae-9cbb-4acc-baa3-d7eb9a32e991)

2. Makes those icons near ckey work in asay and mentorsay chats

3. Fixes some incorrect icons for some ranks so they work properly.

# Changelog
:cl:
add: misc ranks are now shown as icons in ooc
add: rank icons now work in asay and mentorsay chats
fix: fixed some broken ranks icons not working
/:cl:

---------

Co-authored-by: harryob <[email protected]>
  • Loading branch information
Blundir and harryob authored Jan 7, 2025
1 parent 82e0209 commit 5c69e78
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
7 changes: 7 additions & 0 deletions code/game/verbs/ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@
var/rankname = admin_holder.rank
if(rankname in rank_icons)
prefix += "[icon2html('icons/ooc.dmi', GLOB.clients, admin_holder.rank)]"
if(admin_holder.extra_titles?.len)
var/list/extra_rank_icons = icon_states('icons/ooc.dmi')
var/ooc_icon_state
for(var/srank in admin_holder.extra_titles)
ooc_icon_state = trim(srank)
if(ooc_icon_state in extra_rank_icons)
prefix += "[icon2html('icons/ooc.dmi', GLOB.clients, ooc_icon_state)]"
if(prefix)
prefix = "[prefix] "
return prefix
Expand Down
7 changes: 4 additions & 3 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@

var/channel = "ADMIN:"
channel = "[admin_holder.rank]:"
var/ooc_prefix = handle_ooc_prefix()
for(var/client/client as anything in GLOB.admins)
if((R_ADMIN|R_MOD) & client.admin_holder.rights)
to_chat(client, "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>")
to_chat(client, "<span class='[color]'><span class='prefix'>[channel]</span> [ooc_prefix]<span class='prefix'><EM>[key_name(src,1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>")

/datum/admins/proc/alertall()
set name = "Alert All"
Expand Down Expand Up @@ -390,10 +391,10 @@
channel = "[admin_holder.rank]:"
if(check_rights(R_MOD|R_ADMIN,0))
color = "mentorstaff"

var/ooc_prefix = handle_ooc_prefix()
for(var/client/C in GLOB.admins)
if((R_ADMIN|R_MOD|R_MENTOR) & C.admin_holder.rights)
to_chat(C, "<span class='[color]'><span class='prefix'>[channel]</span> <EM>([usr.key])</EM>: <span class='message'>[msg]</span></span>")
to_chat(C, "<span class='[color]'><span class='prefix'>[channel]</span> [ooc_prefix]<span class='prefix'><EM><EM>([usr.key])</EM>: <span class='message'>[msg]</span></span>")

/client/proc/get_mentor_say()
var/msg = input(src, null, "mentorsay \"text\"") as text|null
Expand Down
Binary file modified icons/ooc.dmi
Binary file not shown.
5 changes: 5 additions & 0 deletions tgui/packages/tgui-panel/styles/components/Chat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ $color-bg-section: base.$color-bg-section !default;

.ChatMessage {
word-wrap: break-word;

.icon {
-ms-interpolation-mode: bicubic;
image-rendering: auto;
}
}

.ChatMessage--highlighted {
Expand Down

0 comments on commit 5c69e78

Please sign in to comment.