proc/Human_Village_Generator()
for(var/obj/Emblems/Human/Village_1/V in world)
if(V.Population < V.Population_Max)
var/list/L = list()
for(var/turf/T in locate(/area/Villages/Humans/Village_1/))
if(!T.Occupied)
L += T
if(L.len)
var/turf/T = pick(L)
T.Occupied = 1
V.Population ++
spawn(1)
Human_Village_Generator()
var/mob/Computer/Human/H = new /mob/Computer/Human(locate(T.x,T.y,T.z))
H.Village = 1
Problem description:
It seems the the proc always stops once it creates the new mob, so therefore the Village for the new mob isn't set. I've also tried multiple other scenarios using while, but the same thing happens everytime, the proc immediately stops once the mob has been created. Can anyone assist me with some help?
Untested but give it a go..