mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-03-22 11:43:12 +00:00
* Clothing fallback Makes clothing have a fallback in the event of a custom species file not having the appropriate icon state. * some logging * testing * swap all unit tests to use icon_exists * Update poster_tests.dm * Update clothing_tests.dm * Update cosmetic_tests.dm * Update robot_tests.dm * whoop * upgrades people, upgrades * port these * Update _atom.dm * adjust all these * Update clothing.dm * TRUEFALSE
14 lines
830 B
Plaintext
14 lines
830 B
Plaintext
/// converted unit test, maybe should be fully refactored
|
|
|
|
/datum/unit_test/posters_shall_have_legal_states/Run()
|
|
var/list/all_posters = decls_repository.get_decls_of_type(/decl/poster)
|
|
all_posters -= decls_repository.get_decl(/decl/poster/lewd) // Dumb exclusion for now. This really needs to become a valid poster instead of an illegaly made base type
|
|
|
|
for(var/path in all_posters)
|
|
var/decl/poster/D = all_posters[path]
|
|
var/obj/structure/sign/poster/P = /obj/structure/sign/poster // The base poster shows ALL subtypes except /lewd, so all posters should function here regardless!
|
|
var/icon/I = initial(P.icon)
|
|
if(D.icon_override)
|
|
I = D.icon_override
|
|
TEST_ASSERT(icon_exists(I, D.icon_state), "[D.type]: Poster - missing icon_state \"[D.icon_state]\" in \"[I]\", as [D.icon_override ? "override" : "base"] dmi.")
|