Skip to content

Commit

Permalink
[MIRROR] Monkey Business actually spawns monkeys on the station. [MDB…
Browse files Browse the repository at this point in the history
… IGNORE] (Skyrat-SS13#24589)

* Monkey Business actually spawns monkeys on the station. (#79276)

## About The Pull Request

The monkey business unit test was apparently not actually spawning
monkeys on the station like it was supposed to. It was trying to find
open turfs inside of area _typepaths_, which obviously do not contain
turfs. Functionally, this means it was summoning a number of monkeys
into the same turf of the unit test z-level equal to the number of areas
on the station map. Now it will actually place one monkey in every area
of the station itself.

This was an incidental discovery while trying to diagnose #79147 with
Jacquerel. We still don't know what's causing that one, and I doubt this
will do anything about it, but nonetheless the unit test wasn't working
right.
## Why It's Good For The Game

Makes a unit test do what it was actually intended to do, which is put a
bunch of monkeys all over the station and see if they ruin anything.
This might actually cause _more_ test failures since they're being put
in a less controlled environment, but we'll see.
## Changelog
Nothing player facing.

* Monkey Business actually spawns monkeys on the station.

---------

Co-authored-by: lizardqueenlexi <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2023
1 parent c7149bc commit 24b63d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/unit_tests/monkey_business.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

/datum/unit_test/monkey_business/Run()
for(var/monkey_id in 1 to length(GLOB.the_station_areas))
var/mob/living/carbon/human/monkey = allocate(/mob/living/carbon/human/consistent, get_first_open_turf_in_area(GLOB.the_station_areas[monkey_id]))
var/area/monkey_zone = GLOB.areas_by_type[GLOB.the_station_areas[monkey_id]]
var/mob/living/carbon/human/monkey = allocate(/mob/living/carbon/human/consistent, get_first_open_turf_in_area(monkey_zone))
monkey.set_species(/datum/species/monkey)
monkey.set_name("Monkey [monkey_id]")
if(monkey_id % monkey_angry_nth == 0) // BLOOD FOR THE BLOOD GODS
Expand Down

0 comments on commit 24b63d5

Please sign in to comment.