summaryrefslogtreecommitdiff
path: root/shop2/stock.lua
diff options
context:
space:
mode:
Diffstat (limited to 'shop2/stock.lua')
-rw-r--r--shop2/stock.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/shop2/stock.lua b/shop2/stock.lua
index 71a6844..fb7ab1b 100644
--- a/shop2/stock.lua
+++ b/shop2/stock.lua
@@ -24,7 +24,13 @@ local function item_desc_matches(idesc,itemdetail)
-- idesc is an entry from ITEMS
-- itemdetail is something returned from getItemDetail on the chest
-- if you were wondering
- return idesc.itname == itemdetail.name
+
+ if idesc.itname == itemdetail.name then
+ if idesc.check then return idesc.check(itemdetail) end
+ return true
+ end
+ return false
+
end
local function amt_of(stockinfo,idesc)