Skip to content

Commit

Permalink
evil tbh
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Jan 11, 2024
1 parent 98090ac commit 3fa7182
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/datums/outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
/// Set to FALSE if your outfit requires runtime parameters
var/can_be_admin_equipped = TRUE

// Used to determine if it should be ignored in unit tests due to being to dynamic to always spawn backpack contents right
var/random = FALSE

/**
* extra types for chameleon outfit changes, mostly guns
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
/datum/outfit/generic
name = "Generic (Legion)"
box = /obj/item/storage/box/survival
random = TRUE

/datum/outfit/generic/miner/pre_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
Expand Down
6 changes: 5 additions & 1 deletion code/modules/unit_tests/outfit_sanity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
var/number = backpack_contents[path] || 1
for (var/_ in 1 to number)
if (!H.equip_to_slot_or_del(new path(H), ITEM_SLOT_BACKPACK, TRUE))
TEST_FAIL("[outfit.name]'s backpack_contents are invalid! Couldn't add [path] to backpack.")
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.")


#undef CHECK_OUTFIT_SLOT

0 comments on commit 3fa7182

Please sign in to comment.