[EDIT]
Well, I completely revised my code... And once again, it doesn't work. Only this time, if I leave the first FOR LOOP where it's at, it does nothing at all, no message, no lifting, nothing. If I put the first FOR LOOP as the second loop, it gives me the message, but that's no good either because that means it failed, and it always fails the same way -- check 1 = 0, check 2 = 1, check 3 = 0. And finally, if I use the first FOR LOOP as the last, it will lift any block up no matter it's position.
#define BUG(x) src<<x
mob
proc
Pickup()
var/turf
T = get_step(src,NORTH)
Tu = get_step(src,src.dir)
A = get_step(Tu,NORTH)
var/obj/block/B
var
chk=0; chk2=0; chk3=0
if(T.density) return
if(A.density) return
for(var/obj/block/C in Tu) //Is there a block in front of him. FOR loop 1
if(C)
chk=1; B=C; break
for(B in T) //Is the tile above blocked?
if(!B)
chk2=1; break
for(var/obj/block/D in A) //Is there a block above the block in front of him?
if(!D)
chk3=1; break
if(!B) return
if(chk && chk2 && chk3 == 0)
BUG("Error. Check 1: [chk]; Check 2: [chk2]; Check 3: [chk3]"); return
else
src.ac = 1
B.Pickup(T,src)
[/EDIT]
Lummox JR