From 85117b86d7551723a6440f1301c9ad4695767645 Mon Sep 17 00:00:00 2001 From: FalloutFalcon Date: Thu, 19 Sep 2024 12:40:28 -0500 Subject: [PATCH] tweak to test, only fail if only 1 inhand is missing cause then its clearly a mistake --- code/modules/unit_tests/icons/inhands.dm | 6 +++--- code/modules/unit_tests/icons/missing_icons.dm | 1 + code/modules/unit_tests/outfit_sanity.dm | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/icons/inhands.dm b/code/modules/unit_tests/icons/inhands.dm index 8e9b82237afe..29fb76561644 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/melee)) + for(var/obj/item/item_path as anything in subtypesof(/obj/item)) if(initial(item_path.item_flags) & ABSTRACT) continue @@ -53,7 +53,7 @@ match_message += (match_message ? " & '[file_place]'" : " - Matching sprite found in: '[file_place]'") if(!(skip_left || skip_right) && !lefthand_file && !righthand_file) - TEST_FAIL("Missing both icon files for [item_path].\n\titem_state = \"[item_state]\"[match_message]") + log_test("Missing both icon files for [item_path].\n\titem_state = \"[item_state]\"[match_message]") continue var/missing_left @@ -80,7 +80,7 @@ if(!match_message && right_fallback && left_fallback) fallback_log_message += "\n\t[item_path] has invalid value, using fallback icon.\n\titem_state = \"[item_state]\"" continue - TEST_FAIL("Missing inhand sprites for [item_path] in both '[lefthand_file]' & '[righthand_file]'.\n\titem_state = \"[item_state]\"[match_message]") + log_test("Missing inhand sprites for [item_path] in both '[lefthand_file]' & '[righthand_file]'.\n\titem_state = \"[item_state]\"[match_message]") else if(missing_left) TEST_FAIL("Missing left inhand sprite for [item_path] in '[lefthand_file]'[left_fallback ? ", using fallback icon" : null].\n\titem_state = \"[item_state]\"[match_message]") else if(missing_right) diff --git a/code/modules/unit_tests/icons/missing_icons.dm b/code/modules/unit_tests/icons/missing_icons.dm index 8e5dd654ec35..2f03f923dabd 100644 --- a/code/modules/unit_tests/icons/missing_icons.dm +++ b/code/modules/unit_tests/icons/missing_icons.dm @@ -38,6 +38,7 @@ search_for_w = TRUE if(melee_item.GetComponent(/datum/component/transforming)) search_for_on = TRUE + qdel(melee_item) var/icon = initial(obj_path.icon) if(isnull(icon)) diff --git a/code/modules/unit_tests/outfit_sanity.dm b/code/modules/unit_tests/outfit_sanity.dm index 4dc12b4dc6e3..9cb87f60ac7a 100644 --- a/code/modules/unit_tests/outfit_sanity.dm +++ b/code/modules/unit_tests/outfit_sanity.dm @@ -67,7 +67,7 @@ if (outfit.random != TRUE) TEST_FAIL("[outfit.name]'s backpack_contents are invalid! Couldn't add [path] to backpack.") else - log_world("[outfit.name]'s backpack_contents are invalid! Couldn't add [path] to backpack.") + log_test("[outfit.name]'s backpack_contents are invalid! Couldn't add [path] to backpack.") #undef CHECK_OUTFIT_SLOT