Module:Items/UseTables: Difference between revisions

_getItemUses: Fix shop icon type derivation
(Fix currency function calls)
(_getItemUses: Fix shop icon type derivation)
Line 2: Line 2:


local Constants = require('Module:Constants')
local Constants = require('Module:Constants')
local Common = require('Module:Common')
local Shared = require('Module:Shared')
local Shared = require('Module:Shared')
local GameData = require('Module:GameData')
local GameData = require('Module:GameData')
Line 527: Line 528:
local purchase = shopUse.purchase
local purchase = shopUse.purchase
local rowReq = Shop.getRequirementString(purchase.purchaseRequirements)
local rowReq = Shop.getRequirementString(purchase.purchaseRequirements)
local iconType = (purchase.contains.items ~= nil and not Shared.tableIsEmpty(purchase.contains.items) and 'item') or 'upgrade'
local iconType = Common.getPurchaseIconType(purchase)
local gpCost = Shop.getCurrencyCostString(purchase.cost, 'gp')
local gpCost = Shop.getCurrencyCostString(purchase.cost, 'gp')
local scCost = Shop.getCurrencyCostString(purchase.cost, 'slayerCoins')
local scCost = Shop.getCurrencyCostString(purchase.cost, 'slayerCoins')