Problem description:
Hey guys. I've been working on a system which manages resources on the map; when it's started it picks out available turfs from a specific area and spawns resources there.
Problem is, what I've written to do that isn't very good. For some reason I can't think of a proper way to efficiently pick a random amount of things out of a list. Anyone have any ideas? This is what I'm trying to do.
populate()
var counter = Tin + Copper + Iron + Silver + Gold
var list/available = list()
var turf/cturf
var runcount = 0
while(runcount < Area.contents.len)
cturf = pick(Area.contents)
if(!cturf.PMade)
if(!available.Find(cturf)) // we don't want duplicates
available += cturf
if(available.len >= counter)
break
runcount++
oresOn(available)