mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-14 02:41:03 +01:00
f8333a8d93
* move those to static paths * maps * . * . * ugh * .
20 lines
628 B
Plaintext
20 lines
628 B
Plaintext
/// converted unit test, maybe should be fully refactored
|
|
|
|
/datum/unit_test/emotes_shall_have_unique_keys/Run()
|
|
var/list/keys = list()
|
|
var/list/duplicates = list()
|
|
|
|
var/list/all_emotes = GLOB.decls_repository.get_decls_of_subtype(/datum/decl/emote)
|
|
for(var/etype in all_emotes)
|
|
var/datum/decl/emote/emote = all_emotes[etype]
|
|
if(!emote.key)
|
|
continue
|
|
if(emote.key in keys)
|
|
if(!duplicates[emote.key])
|
|
duplicates[emote.key] = list()
|
|
duplicates[emote.key] += etype
|
|
else
|
|
keys += emote.key
|
|
|
|
TEST_ASSERT(!length(duplicates), "[length(duplicates)] emote\s had overlapping keys: [english_list(duplicates)].")
|