diff --git a/src/main.lua b/src/main.lua index ec2364b..505dad9 100644 --- a/src/main.lua +++ b/src/main.lua @@ -343,7 +343,7 @@ local function printdes(buf, dimensions) while true do local target = getnearestunplaced(buf, pbuf, cx,cy,cz,nil, dimensions["x"],dimensions["z"], false) if not target then break end - cx,cz = moveto(target[1],target[2],cx,cz,direction) + cx,cz,direction = moveto(target[1],target[2],cx,cz,direction) place("down") pbuf[posasstring(cx,cy,cz)] = true end @@ -375,14 +375,14 @@ local function printdes(buf, dimensions) -- build ceiling/floor for _cz=1,dimensions["z"],1 do for _cx=1,dimensions["x"],1 do - moveto(_cx,_cz,cx,cz,direction) + cx,cz,direction = moveto(_cx,_cz,cx,cz,direction) if buf[posasstring(_cx,cy,_cz)] ~= 2 then place("down") end end end -- return to standard pos but +1 to y - moveto(1,1,cx,cz,direction) + cx,cz,direction = moveto(1,1,cx,cz,direction) move("up") end center(direction)