summaryrefslogtreecommitdiff
path: root/shop2.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-01-02 02:07:39 +0000
committerubq323 <ubq323@ubq323.website>2023-01-02 02:07:39 +0000
commit076f1ee6c8d7501c0f352e3fb7f0ae9ef074cf60 (patch)
treecd467a467d6dc67adbc7489168989132794e5207 /shop2.lua
parent9da76f0a54f195e55062fde9859fdef7cac98cba (diff)
shop2
Diffstat (limited to 'shop2.lua')
-rw-r--r--shop2.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/shop2.lua b/shop2.lua
new file mode 100644
index 0000000..9e0818a
--- /dev/null
+++ b/shop2.lua
@@ -0,0 +1,35 @@
+local ourname = "ac.kst"
+
+local ITEMS = {
+ {"dmn", 5, "minecraft:diamond"},
+ {"blz", 10, "minecraft:blaze_rod"},
+ {"ely", 40, "minecraft:elytra"},
+}
+
+local function printseq(m) return function(q)
+ for _,v in ipairs(q) do
+ if type(v) == "number" then
+ m.setTextColor(v)
+ elseif type(v) == "string" then
+ m.write(v)
+ elseif type(v) == "table" then
+ if #v == 2 then
+ -- position
+ m.setCursorPos(v[1],v[2])
+ else
+ error("unknown format")
+ end
+ end
+ end
+end end
+
+
+local function disp_shopscreen()
+ local m = peripheral.wrap"right"
+ m.clear()
+ printseq(m) {
+ {1,1}, colors.orange, "apionics consortium store !!!"
+ }
+end
+
+disp_shopscreen()