From 601f459f99ef214f1ecd473c15378d417b844a45 Mon Sep 17 00:00:00 2001 From: Kan18 <24967425+Kan18@users.noreply.github.com> Date: Thu, 3 Jun 2021 12:45:25 -0400 Subject: [PATCH] Fix shopView-example.lua --- swshop/shopView-example.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swshop/shopView-example.lua b/swshop/shopView-example.lua index f4ac2a1..2930ace 100644 --- a/swshop/shopView-example.lua +++ b/swshop/shopView-example.lua @@ -23,9 +23,9 @@ local function showListing(node) for k,v in pairs(config) do local item = list[k] - if item and item.count > 0 then + if item and ((item.count and item.count > 0) or node.showOutOfStock) then mon.setCursorPos(1, i) - mon.write(string.format('%d %s: %d kst', v.count, v.displayName, v.price)) + mon.write(string.format('%d %s: %s kst, %s', item.count, item.displayName, v.price, v.name)) mon.setCursorPos(1, i + 1) mon.write(v.info) i = i + 2 @@ -38,7 +38,7 @@ local function startShop(node) if shopTab then multishell.terminate(shopTab) end - shopTab = shell.openTab('/packages/swshop/swshop.lua', node.domain, node.password) + shopTab = shell.openTab('/packages/swshop/swshop.lua', node.name) end -- node has been reconfigured -- 2.49.1