Skip to content

Commit

Permalink
[MIRROR] Calls Allocate on the spawn humans unit test humans [MDB IGN…
Browse files Browse the repository at this point in the history
…ORE] (#25128)

* 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 <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 19, 2023
1 parent 53a5d04 commit 6291203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/unit_tests/spawn_humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var/locs = block(run_loc_floor_bottom_left, run_loc_floor_top_right)

for(var/I in 1 to 5)
new /mob/living/carbon/human/consistent(pick(locs))
allocate(/mob/living/carbon/human/consistent, pick(locs))

sleep(5 SECONDS)

Expand Down

0 comments on commit 6291203

Please sign in to comment.