Module:Shop: Difference between revisions

349 bytes removed ,  24 October 2022
Remove erroneously pasted code
(getItemSourceArray: Fix handling of itemCharges contents)
(Remove erroneously pasted code)
Line 579: Line 579:


function p.getItemSourceArray(itemID)
function p.getItemSourceArray(itemID)
        if purch.contains.items ~= nil and not Shared.tableIsEmpty(purch.contains.items) then
            item = Items.getItemByID(purch.contains.items[1].id)
        elseif purch.contains.itemCharges ~= nil and not Shared.tableIsEmpty(purch.contains.itemCharges) then
        item = Items.getItemByID(purch.contains.itemCharges.id)
        end
     local purchaseArray = {}
     local purchaseArray = {}
     for i, purchase in ipairs(GameData.rawData.shopPurchases) do
     for i, purchase in ipairs(GameData.rawData.shopPurchases) do