CODE:
world/proc/GenerateField(var/density, var/list/tiles = list(), var/turf/picked)
set background = 1
if(!density) density = 50
spawn(0)
for(var/turf/T in world)
tiles.Add(T)
while(density > 0)
for(var/turf/TU in tiles)
picked = pick(TU)
for(var/turf/O in orange(rand(2, 4), picked))
if(prob(75))
var/turf/asteroid/AS = new(picked.loc)
AS.desc = AS.desc
density--
There's the code I have right now, when I try this, it tells me I'm using a "Bad loc"..
Any idea what I'm doing wrong here?