[RUNTIME] Fixes trying to open the head marking menu for certain IPC heads. (#26701)

* You can no longer attempt to open the head markings menu for certain IPC heads with no possible markings.

* Added a TGUI alert

* Update code/modules/client/preference/link_processing.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Adrer <erwin@lombok.demon.nl>

---------

Signed-off-by: Adrer <erwin@lombok.demon.nl>
Co-authored-by: Adrer <adrermail@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Adrer
2024-09-16 16:54:50 +02:00
committed by GitHub
parent d642cd13f3
commit 2f9182b6a6
@@ -476,6 +476,9 @@
valid_markings += markingstyle
sortTim(valid_markings, GLOBAL_PROC_REF(cmp_text_asc))
if(!length(valid_markings)) // Some IPC head models do have head markings, some don't; This is here to prevent us from attempting to open an empty TGUI list
tgui_alert(user, "No head markings available for this head!", "Character Preference")
return
var/new_marking_style = tgui_input_list(user, "Choose the style of your character's head markings:", "Character Preference", valid_markings)
if(new_marking_style)
active_character.m_styles["head"] = new_marking_style