Module:Shop: Difference between revisions

20 bytes removed ,  19 September 2023
Undo revision 64067 by Auron956 (talk)
(mw.log(p.getShopMiscUpgradeTable()))
Tag: Reverted
(Undo revision 64067 by Auron956 (talk))
Tag: Undo
Line 183: Line 183:
return decorator(cost.initial) .. '<br/>+' .. decorator(cost.scaling) .. ' for each purchase'
return decorator(cost.initial) .. '<br/>+' .. decorator(cost.scaling) .. ' for each purchase'
elseif cost.type == 'Glove' or cost.type == 'Fixed' and cost.cost > 0 then
elseif cost.type == 'Glove' or cost.type == 'Fixed' and cost.cost > 0 then
-- Type Glove exists in game so the Merchant's Permit cost reduction can be applied,
-- Type Glove exists in game so the Merchan's Permit cost reduction can be applied,
-- it makes no difference here
-- it makes no difference here
return decorator(cost.cost)
return decorator(cost.cost)
Line 543: Line 543:


function p.getShopMiscUpgradeTable()
function p.getShopMiscUpgradeTable()
-- All purchases in the general category besides Auto Eat, which is handled by getAutoEatTable()
local purchList = p.getPurchases(function(purch) return (purch.category == 'melvorD:General' and string.find(purch.id, '^melvorD:Auto_Eat') == nil) or Shared.contains({'melvorTotH:SignOfTheStars', 'melvorTotH:SummonersAltar'}, purch.id) end)
local purchList = p.getPurchases(function(purch) return purch.category == 'melvorD:General' and string.find(purch.id, '^melvorD:Auto_Eat') == nil end)


return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost', 'Requirements', 'Buy Limit' }, purchaseHeader = 'Upgrade' })
return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost', 'Requirements' }, purchaseHeader = 'Upgrade' })
end
end


Line 874: Line 873:
{ name = 'increasedSurveyRange', header = 'Increased Survey Range', sign = '+', suffix = ''},
{ name = 'increasedSurveyRange', header = 'Increased Survey Range', sign = '+', suffix = ''},
}
}
 
return p.getToolTable('Ship', 'Ship', modifiers, 'melvorAoD:Cartography')
return p.getToolTable('Ship', 'Ship', modifiers, 'melvorAoD:Cartography')
end
end