summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-12-29 23:31:30 +0000
committerubq323 <ubq323@ubq323.website>2022-12-29 23:31:30 +0000
commitc5b14b892066ec31ee9e7f49f608f9b530b00c5b (patch)
treecde4588cabfe63fea4d16dfb8f24ab513e2b2313
parenta41145dfddb684958b0e5f2441a6f1fdaa7fe156 (diff)
shop
-rw-r--r--shop.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/shop.lua b/shop.lua
index 590a1de..772e93b 100644
--- a/shop.lua
+++ b/shop.lua
@@ -128,6 +128,31 @@ function run_topdisp()
end
end
-parallel.waitForAny(run_shop, run_topdisp)
+function run_sidedisp()
+ local m = peripheral.wrap("left")
+ local function printseq(q)
+ for _,v in ipairs(q) do
+ if type(v) == "number" then
+ m.setTextColor(m)
+ elseif type(v) == "table" then
+ m.setCursorPos(v[1],v[2])
+ else -- str
+ m.write(v)
+ end
+ end
+ end
+ while true do
+ printseq {
+ {1,1}, colors.red, "UBQ323 DIAMOND STORE!!!",
+ {1,2}, colors.white, "Stock: ", colors.yellow, stock_amt(),
+ {1,3}, colors.white, "Price: ", colors.yellow, PRICE.."kst/item",
+ {1,6}, colors.green, "--> /pay d@ac.kst "..PRICE.." <--"
+ }
+ os.sleep(5)
+
+ end
+end
+
+parallel.waitForAny(run_shop, run_topdisp, run_sidedisp)
-- end