diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 0e42740077b..5d82efe3e58 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -760,39 +760,16 @@ GLOBAL_PROTECT(admin_verbs_poll) log_admin("[src] re-adminned themselves.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Readmin") -/client/proc/populate_world(amount = 50 as num) +/client/proc/populate_world(amount = 50) set name = "Populate World" set category = "Debug" set desc = "(\"Amount of mobs to create\") Populate the world with test mobs." - if (amount > 0) - var/area/area - var/list/candidates - var/turf/open/floor/tile - var/j,k - - for (var/i = 1 to amount) - j = 100 - - do - area = pick(GLOB.the_station_areas) - - if (area) - - candidates = get_area_turfs(area) - - if (length(candidates)) - k = 100 - - do - tile = pick(candidates) - while ((!tile || !istype(tile)) && --k > 0) - - if (tile) - var/mob/living/carbon/human/hooman = new(tile) - hooman.equipOutfit(pick(subtypesof(/datum/outfit))) - testing("Spawned test mob at [COORD(tile)]") - while (!area && --j > 0) + for (var/i in 1 to amount) + var/turf/tile = get_safe_random_station_turf() + var/mob/living/carbon/human/hooman = new(tile) + hooman.equipOutfit(pick(subtypesof(/datum/outfit))) + testing("Spawned test mob at [get_area_name(tile, TRUE)] ([tile.x],[tile.y],[tile.z])") /client/proc/toggle_AI_interact() set name = "Toggle Admin AI Interact"