From 85d3dfa5a3c22886b7966b1a492f8f244e4b5a96 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 8 Jan 2023 16:08:18 +0000 Subject: shop2 --- shop2/disp.lua | 4 ++-- shop2/items.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shop2') diff --git a/shop2/disp.lua b/shop2/disp.lua index 8dcee89..58389a0 100644 --- a/shop2/disp.lua +++ b/shop2/disp.lua @@ -59,8 +59,8 @@ local function disp_shopscreen(items) {1,2}, colors.lightGray, "Stock Price Adr. Name", } - local function fmt_row(y, idesc, amt, colour) - colour = colour or colors.cyan + local function fmt_row(y, idesc, amt) + colour = idesc.colour or colors.white printseq(mon) { {1,y}, colors.white, pad(amt,5), {8,y}, colors.yellow, pad(idesc.price,3), colors.lightGray, "kst", diff --git a/shop2/items.lua b/shop2/items.lua index 20e8a93..d110a67 100644 --- a/shop2/items.lua +++ b/shop2/items.lua @@ -1,6 +1,6 @@ local items = {} -local function i(adr,itname,hname,price) - items[adr]={itname=itname,hname=hname,price=price,adr=adr} +local function i(adr,itname,hname,price,colour) + items[adr]={itname=itname,hname=hname,price=price,adr=adr,colour=colour or colors.white} end i("dmn","minecraft:diamond","Diamond",5) i("blz","minecraft:blaze_rod","Blaze Rod",10) -- cgit v1.2.3