fix stack printing

This commit is contained in:
Justus Wolff
2026-02-22 20:30:47 +01:00
parent 8b05cf5e67
commit 0a9ef1709e

View File

@@ -883,6 +883,7 @@ while true do
else
local buf,dimensions = load(name)
local stacks = VP_createstack(buf, dimensions)
local height = stacks["height"]
print("Stacks created.")
local code = randomstr(5)
print("Pair code: '"..code.."'")
@@ -939,7 +940,12 @@ while true do
rednet.send(v, {}, "HB_vprint_begin")
end
VP_printstack(stacks[expam+1],dimensions, 1,1,1,0)
local ownstack = {
stacks=stacks[expam+1],
dimensions=dimensions,
height=height
}
VP_printstack(ownstack,dimensions, 1,1,1,0)
end
end
if action == 4 then
@@ -952,6 +958,7 @@ while true do
local masterid = 0
local buf = {}
local dimensions = {}
local height = 0
local cx,cz = 0,0
while true do -- await pairing request and respond
@@ -970,6 +977,7 @@ while true do
until id == masterid
buf = msg["stack"]
dimensions = msg["dimensions"]
height = msg["height"]
break
end
end
@@ -983,7 +991,13 @@ while true do
repeat -- wait until we can begin
id = rednet.receive("HB_vprint_begin")
until id == masterid
VP_printstack(buf,dimensions, cx,1,cz,0)
local ownstack = {
stacks=buf,
dimensions=dimensions,
height=height
}
VP_printstack(ownstack,dimensions, cx,1,cz,0)
end
if action == 5 then
shell.run("rm", "main.lua")