Skip to content

Commit

Permalink
combines the two outfit unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 7, 2024
1 parent 3c09854 commit b062d34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion code/modules/unit_tests/_unit_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
#include "keybinding_init.dm"
#include "machine_disassembly.dm"
#include "open_air.dm"
#include "outfit_names.dm"
#include "outfit_sanity.dm"
#include "overmap.dm"
#include "pills.dm"
Expand Down
12 changes: 0 additions & 12 deletions code/modules/unit_tests/outfit_names.dm

This file was deleted.

7 changes: 6 additions & 1 deletion code/modules/unit_tests/outfit_sanity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,20 @@
var/prototype_name = initial(prototype_outfit.name)
var/mob/living/carbon/human/H = allocate(/mob/living/carbon/human)

var/list/outfit_names = list()
for (var/outfit_type in subtypesof(/datum/outfit))
// Only make one human and keep undressing it because it's much faster
for (var/obj/item/I in H.get_equipped_items(include_pockets = TRUE))
qdel(I)

var/datum/outfit/outfit = new outfit_type

if(outfit.name == prototype_name)
var/outfit_name = outfit.name
if(outfit_name == prototype_name)
TEST_FAIL("[outfit.type]'s name is invalid! Uses default outfit name!")
if(outfit_name in outfit_names)
TEST_FAIL("Outfit name [outfit_name] is not unique: [outfit_type], [outfit_names[outfit_name]]")
outfit_names[outfit_name] = outfit_type
outfit.pre_equip(H, TRUE)

CHECK_OUTFIT_SLOT(uniform, ITEM_SLOT_ICLOTHING)
Expand Down

0 comments on commit b062d34

Please sign in to comment.