Files
Bubberstation/code/modules/unit_tests/slime_mood.dm
John Willard d7d12c48b4 Fixes slimes not having a mischievous face (#74483)
## About The Pull Request

The icon state was improperly named, so it didn't actually exist.
This fixes that.

## Why It's Good For The Game

Fixes a bug

## Changelog

🆑
fix: Slimes' mischievous emote now works.
/🆑
2023-04-06 08:26:01 +12:00

13 lines
703 B
Plaintext

///Unit test that tests all types of moods for slimes, to make sure they all have proper icons, excluding moods that intentionally don't have an icon.
/datum/unit_test/slime_mood
/datum/unit_test/slime_mood/Run()
var/mob/living/simple_animal/slime/emoting_slime = allocate(/mob/living/simple_animal/slime)
for(var/key in GLOB.emote_list)
for(var/datum/emote/slime/mood/slime_mood in GLOB.emote_list[key])
var/list/states = icon_states(emoting_slime.icon)
if(!slime_mood.mood_key)
continue
TEST_ASSERT(("aslime-[slime_mood.mood_key]" in states), "[slime_mood] is set to give [emoting_slime] the [slime_mood.mood_key] emote, but the icon state can't be found in [emoting_slime.icon].")