mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Adds a unit test for species changes keeping clothings (#69788)
* Adds a unit test for species changes keeping clothings Adds a unit test that checks if people who species change into a Lizard keeps their non-digitigrade shoes or not, which will also affect Monkeys.
This commit is contained in:
@@ -151,6 +151,7 @@
|
||||
#include "slips.dm"
|
||||
#include "spawn_humans.dm"
|
||||
#include "spawn_mobs.dm"
|
||||
#include "species_change_clothing.dm"
|
||||
#include "species_config_sanity.dm"
|
||||
#include "species_unique_id.dm"
|
||||
#include "species_whitelists.dm"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
///Gives a Human lizard-incompatible shoes, then changes their species over to see if they drop the now incompatible shoes.
|
||||
/datum/unit_test/species_change_clothing
|
||||
|
||||
/datum/unit_test/species_change_clothing/Run()
|
||||
// Test lizards as their own thing so we can get more coverage on their features
|
||||
var/mob/living/carbon/human/human_to_lizard = allocate(/mob/living/carbon/human/dummy/consistent)
|
||||
human_to_lizard.equipOutfit(/datum/outfit/job/assistant/consistent)
|
||||
human_to_lizard.dna.features["legs"] = DIGITIGRADE_LEGS //you WILL have digitigrade legs
|
||||
|
||||
var/obj/item/human_shoes = human_to_lizard.get_item_by_slot(ITEM_SLOT_FEET)
|
||||
human_shoes.supports_variations_flags = NONE //do not fit lizards at all costs.
|
||||
|
||||
human_to_lizard.set_species(/datum/species/lizard)
|
||||
|
||||
var/obj/item/lizard_shoes = human_to_lizard.get_item_by_slot(ITEM_SLOT_FEET)
|
||||
TEST_ASSERT_NOTEQUAL(human_shoes, lizard_shoes, "Lizard still has shoes after changing species.")
|
||||
Reference in New Issue
Block a user