diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 4b4e10edd7ac..3c1fb2aba57e 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -66,6 +66,7 @@ #ifdef BASIC_TESTS //#include "icons/inhands.dm" +#include "icons/inhands.dm" #include "icons/missing_icons.dm" #include "icons/spritesheets.dm" #include "icons/worn_icons.dm" diff --git a/code/modules/unit_tests/icons/inhands.dm b/code/modules/unit_tests/icons/inhands.dm index 858c6d2f2840..8e9b82237afe 100644 --- a/code/modules/unit_tests/icons/inhands.dm +++ b/code/modules/unit_tests/icons/inhands.dm @@ -26,7 +26,7 @@ //Add EVEN MORE paths if needed here! //generate_possible_icon_states_list("your/folder/path/inhands/") - for(var/obj/item/item_path as anything in subtypesof(/obj/item)) + for(var/obj/item/item_path as anything in subtypesof(/obj/item/melee)) if(initial(item_path.item_flags) & ABSTRACT) continue diff --git a/code/modules/unit_tests/icons/missing_icons.dm b/code/modules/unit_tests/icons/missing_icons.dm index f548d2844a0f..8e5dd654ec35 100644 --- a/code/modules/unit_tests/icons/missing_icons.dm +++ b/code/modules/unit_tests/icons/missing_icons.dm @@ -26,10 +26,18 @@ //generate_possible_icon_states_list("your/folder/path/") var/list/bad_list = list() for(var/obj/obj_path as anything in subtypesof(/obj)) + var/search_for_w = FALSE + var/search_for_on = FALSE if(ispath(obj_path, /obj/item)) var/obj/item/item_path = obj_path if(initial(item_path.item_flags) & ABSTRACT) continue + if(ispath(obj_path, /obj/item/melee)) + var/obj/item/melee/melee_item = new(item_path) + if(melee_item.GetComponent(/datum/component/two_handed)) + search_for_w = TRUE + if(melee_item.GetComponent(/datum/component/transforming)) + search_for_on = TRUE var/icon = initial(obj_path.icon) if(isnull(icon)) @@ -49,6 +57,11 @@ bad_list[icon] += list(icon_state) + if(search_for_on && icon_exists(icon, "[icon_state]_on")) + TEST_FAIL("Missing on icon_state for [obj_path] in '[icon]'.\n\ticon_state = \"[icon_state]\"") + if(search_for_w && icon_exists(icon, "[icon_state]_on")) + TEST_FAIL("Missing wielded icon_state for [obj_path] in '[icon]'.\n\ticon_state = \"[icon_state]\"") + var/match_message if(icon_state in possible_icon_states) for(var/file_place in possible_icon_states[icon_state]) diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 816d3671a8d9..e213c294d669 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/icons/obj/weapon/axe.dmi b/icons/obj/weapon/axe.dmi index e0a97f17f304..46d9982ab5f2 100644 Binary files a/icons/obj/weapon/axe.dmi and b/icons/obj/weapon/axe.dmi differ