mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
* Calls Allocate on the spawn humans unit test humans (#79827) ## About The Pull Request I have found a unit test that spawn instances of `/mob/living/carbon/human/consistent`, without using `allocate`, so they won't get into the list of things to be deleted when CI finishes running. This PR ensures that they won't stick around after the unit test has finished. I kept them picking a random tile from the unit test room, instead of going with `allocate`'s default of the test area's bottom left corner. Could have maybe swapped it to pick_n_take so there is no chance of them piling up, but that is not relevant to the CI issue. ## Why It's Good For The Game Maybe this will stop the random CI failures where `/mob/living/carbon/human/consistent` fails to be deleted. ## Changelog Nothing player facing * Calls Allocate on the spawn humans unit test humans --------- Co-authored-by: Profakos <profakos@gmail.com>
16 lines
786 B
Plaintext
16 lines
786 B
Plaintext
/datum/unit_test/spawn_humans/Run()
|
|
var/locs = block(run_loc_floor_bottom_left, run_loc_floor_top_right)
|
|
|
|
for(var/I in 1 to 5)
|
|
allocate(/mob/living/carbon/human/consistent, pick(locs))
|
|
|
|
sleep(5 SECONDS)
|
|
|
|
/// Tests [/mob/living/carbon/human/proc/setup_organless_effects], specifically that they aren't applied when init is done
|
|
/datum/unit_test/human_default_traits
|
|
|
|
/datum/unit_test/human_default_traits/Run()
|
|
var/mob/living/carbon/human/consistent/dummy = allocate(/mob/living/carbon/human/consistent)
|
|
TEST_ASSERT(!HAS_TRAIT_FROM(dummy, TRAIT_AGEUSIA, NO_TONGUE_TRAIT), "Dummy has ageusia on init, when it should've been removed by its default tongue.")
|
|
TEST_ASSERT(!dummy.is_blind_from(NO_EYES), "Dummy is blind on init, when it should've been removed by its default eyes.")
|