mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Cleans up populate world code (#69752)
* cleans up populate world * fix debug text * cleanup Co-authored-by: tattle <article.disaster@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user