Module:Items/SourceTables: Difference between revisions

_getItemUpgradeTable: Prevent GP being shown if upgrade GP cost is zero or less (e.g. Water Chest)
(_getCreationTable: Fix recipe quantity & account for GP/SC costs for alterative cost recipes (example: Arrow Shafts); buildCreationTable: Support SC cost)
(_getItemUpgradeTable: Prevent GP being shown if upgrade GP cost is zero or less (e.g. Water Chest))
Line 876: Line 876:
table.insert(materials, Icons.Icon({mat.name, type='item', qty=row[2]}))
table.insert(materials, Icons.Icon({mat.name, type='item', qty=row[2]}))
end
end
if item.trimmedGPCost ~= nil then
if type(item.trimmedGPCost) == 'number' and item.trimmedGPCost > 0 then
table.insert(materials, Icons.GP(item.trimmedGPCost))
table.insert(materials, Icons.GP(item.trimmedGPCost))
end
end