change a few things
This commit is contained in:
10
src/main.lua
10
src/main.lua
@@ -612,12 +612,10 @@ local function VP_moveto(x,z, cx,cz,direction)
|
|||||||
return cx,cz,direction
|
return cx,cz,direction
|
||||||
end
|
end
|
||||||
local function VP_optimizestack(target)
|
local function VP_optimizestack(target)
|
||||||
-- go from top to bottom and erase false entries until we encounter a true one.
|
-- go from bottom to top and erase false entries until we encounter a true one.
|
||||||
local index = #target
|
|
||||||
while #target > 0 do
|
while #target > 0 do
|
||||||
if target[index] then break else
|
if target[1] then break else
|
||||||
table.remove(target, index)
|
table.remove(target, 1)
|
||||||
index = index - 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -719,7 +717,7 @@ local function VP_printstack(buf, dimensions, cx,cy,cz,direction)
|
|||||||
local tempbuf = buf["stacks"][posasstring(x,z)]
|
local tempbuf = buf["stacks"][posasstring(x,z)]
|
||||||
if tempbuf then
|
if tempbuf then
|
||||||
cx,cz,direction = VP_moveto(x,z, cx,cz,direction)
|
cx,cz,direction = VP_moveto(x,z, cx,cz,direction)
|
||||||
for _=1,buf["height"],1 do
|
for _=1,#tempbuf,1 do
|
||||||
move("down", true)
|
move("down", true)
|
||||||
end
|
end
|
||||||
for _,v in pairs(tempbuf) do
|
for _,v in pairs(tempbuf) do
|
||||||
|
|||||||
Reference in New Issue
Block a user