Files
Bubberstation/code/modules/unit_tests/verify_emoji_names.dm
san7890 f45347bff2 NtOS Emojipedia - PDA Emoji Messaging For All (#70829)
An Emojipedia app has been added to tablets, given to Mimes and Curators by default, allowing anyone to know all emojis. Additionally, emojis can be used in tablets by every job now.
2022-11-06 06:06:50 -05:00

11 lines
688 B
Plaintext

/// Apparently, spritesheets (or maybe how the CSS backend works) do not respond well to icon_state names that are just pure numbers (which was a behavior in emoji.dmi).
/// In case we add more emoji, let's just make sure that we don't have any pure numbers in the emoji.dmi file if we ever add more.
/datum/unit_test/verify_emoji_names
/datum/unit_test/verify_emoji_names/Run()
var/static/list/emoji_list = icon_states(icon(EMOJI_SET))
for(var/checkable in emoji_list)
if(isnum(text2num(checkable)))
TEST_FAIL("Emoji name [checkable] in [EMOJI_SET] is a pure number. This will cause issues with the CSS backend via Spritesheets. Please rename it to something else.")
continue