summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-06 23:53:09 +0100
committerubq323 <ubq323@ubq323.website>2024-04-06 23:53:09 +0100
commit6925ea28b3f8bb2e2c6d6ea3cf57406494b34142 (patch)
tree8d807fc929574a8fb2c2fc05195a1ca275af538d
parent6de274674cb6b880b8f9ba57acab08a63783b593 (diff)
launch cactusHEADtrunk
-rw-r--r--cactus.lua1
-rw-r--r--john.lua8
2 files changed, 5 insertions, 4 deletions
diff --git a/cactus.lua b/cactus.lua
index 36eb25d..f8930a9 100644
--- a/cactus.lua
+++ b/cactus.lua
@@ -138,6 +138,7 @@ local datum = vector.new(-18, 128, -1837)
local function setup()
turtle_pos_init()
+ print("i am at",POS,"facing",FACING)
moveto(datum)
turn_to_face(vector.new(0,0,1))
diff --git a/john.lua b/john.lua
index c0a461f..379ff95 100644
--- a/john.lua
+++ b/john.lua
@@ -24,14 +24,14 @@ function main()
local W,H = fb:get_size()
print("img is ",W,H)
- local total_width = 0
+ local screen_width = 0
for ix,iname in ipairs(monitors) do
local mon = peripheral.wrap(iname)
mon.setTextScale(0.5)
- total_width = total_width + (mon.getSize())*2
+ screen_width = screen_width + (mon.getSize())*2
end
- local leftover = total_width - W
- print("mmm",total_width,W,leftover)
+ local leftover = screen_width - W
+ print("mmm",screen_width,W,leftover)
local xoffs = -math.floor(leftover/2)
for ix,iname in ipairs(monitors) do