From e8e476f28df1f585541e127d2b2271d4f55ee33e Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 29 Dec 2022 23:48:42 +0000 Subject: shop --- shop.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/shop.lua b/shop.lua index 3319853..d14aa32 100644 --- a/shop.lua +++ b/shop.lua @@ -80,7 +80,7 @@ function proctrans(tr) else tell("that's the wrong about of money. please send "..PRICE.."kst.") if meta['return'] then - + sendws { type="make_transaction", to=meta['return'], amount=tr.value } end end @@ -130,7 +130,6 @@ function run_sidedisp() m.clear() local function printseq(q) for _,v in ipairs(q) do - print(v,type(v)) if type(v) == "number" then m.setTextColor(v) elseif type(v) == "table" then @@ -142,11 +141,11 @@ function run_sidedisp() end while true do printseq { - {7,1}, colors.orange, "UBQ323", {2,2}, "DIAMOND STORE", - {7,3}, "!!!", + {7,1}, colors.orange, "UBQ323", {3,2}, "DIAMOND STORE", + {9,3}, "!!!", {1,5}, colors.white, "Stock: ", colors.yellow, ""..stock_amt(), {1,6}, colors.white, "Price: ", colors.yellow, ""..PRICE, colors.white, "kst/item", - {1,8}, colors.blue, "/pay d@ac.kst "..PRICE + {2,8}, colors.blue, "/pay d@ac.kst "..PRICE } os.sleep(5) @@ -154,5 +153,5 @@ function run_sidedisp() end parallel.waitForAny(run_shop, run_topdisp, run_sidedisp) - --- end +peripheral.call("top","clear") +peripheral.call("left","clear") -- cgit v1.2.3