summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-12-29 23:23:14 +0000
committerubq323 <ubq323@ubq323.website>2022-12-29 23:23:14 +0000
commita41145dfddb684958b0e5f2441a6f1fdaa7fe156 (patch)
treef030b07cac15f5c7c370da2c055a595902383a28
parent67163387857fdcd56e7e286e27bbc079444ff5db (diff)
shop
-rw-r--r--shop.lua47
1 files changed, 24 insertions, 23 deletions
diff --git a/shop.lua b/shop.lua
index 5904dec..590a1de 100644
--- a/shop.lua
+++ b/shop.lua
@@ -87,7 +87,7 @@ function proctrans(tr)
end
-function shop_run()
+function run_shop()
while true do
msgtxt = assert(ws.receive(),"ws error")
msg = textutils.unserializeJSON(msgtxt)
@@ -104,29 +104,30 @@ function shop_run()
end
end
-while true do
- local ty,b=os.pullEvent()
- print(ty,b)
+function run_topdisp()
+
+ local mtop = peripheral.wrap"top"
+ while true do
+ mtop.setTextScale(3.5)
+ mtop.setTextColor(colors.cyan)
+ mtop.setCursorPos(1,1)
+ mtop.write"DIAMONDS"
+
+ os.sleep(0.75)
+ mtop.clear()
+ os.sleep(0.25)
+
+ mtop.setTextScale(3)
+ mtop.setTextColor(colors.white)
+ mtop.setCursorPos(1,1)
+ mtop.write("5KST EACH")
+
+ os.sleep(0.75)
+ mtop.clear()
+ os.sleep(0.25)
+ end
end
--- mtop = peripheral.wrap"top"
--- while true do
--- mtop.setTextScale(3.5)
--- mtop.setTextColor(colors.cyan)
--- mtop.setCursorPos(1,1)
--- mtop.write"DIAMONDS"
-
--- os.sleep(0.75)
--- mtop.clear()
--- os.sleep(0.25)
-
--- mtop.setTextScale(3)
--- mtop.setTextColor(colors.white)
--- mtop.setCursorPos(1,1)
--- mtop.write("5KST EACH")
-
--- os.sleep(0.75)
--- mtop.clear()
--- os.sleep(0.25)
+parallel.waitForAny(run_shop, run_topdisp)
-- end