mob
proc/get_work(W as turf in mined_walls)
if(mined_walls.len>=1)
if(W in mined_walls)
usr<<"wall found"
if(get_dist(src,W)>=2)
step_towards(src,W)
usr<<"tried to step"
return
else
usr<<"finished pathing,started mining"
sleep(30)
usr<<"finished mining"
var/turf/floor/F= new(W)
dump+= F
dump-= F
return
Problem description:
When this proc is executed, mob moves south once. I try to make mob to move to the wall and then mine. If you want, feel free to make a code from scratch, I already don't remember how many times I edited it while trying to make it work, too bad I couldn't fix it.
EDIT: Damn it, forgot to name topic, now fixed.
Incidental: you're only outputting to usr instead of using it in actual code, but using usr in a proc is a bad, bad idea. It doesn't mean what you think it means.