ID:261572
 
I been working on the worker codes so it mines crystals so it works now. But there is a problem with the flick(). My code for the crystal mining is bellow.
proc
Mining()
for(var/mob/Worker/M in usr:units)
if(M.action==1)
while(!(src in view(1,M)))
step_towards(M,src)
sleep(M.speed)
flick("cutting",M)
src.crystal-=1
usr:crystal+=1
spawn(M.speed*3) Mining()

And the bellow is the click proc
Click()
for(var/mob/Worker/M in usr:units)
M.action=1
Mining()

Now when you click the crystal it runs the mining proc. then it gets all the workers from the selected units list. Then if the workers arnt 1 space away the step closer to it. Then Its suppose to run the Flick making it look like it cuts the Crystal.

It does do this 1 time but only 1 then it just stays at the origanal icon. Please tell me what the problem is.