Skip to content

Commit

Permalink
tweak to test, only fail if only 1 inhand is missing cause then its c…
Browse files Browse the repository at this point in the history
…learly a mistake
  • Loading branch information
FalloutFalcon committed Sep 19, 2024
1 parent 0b8b15f commit 85117b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions code/modules/unit_tests/icons/inhands.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions code/modules/unit_tests/icons/missing_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/unit_tests/outfit_sanity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 85117b8

Please sign in to comment.