Anonymous

Module:Shop: Difference between revisions

From Melvor Idle
mw.log(p.getShopMiscUpgradeTable())
(Fixed not listing the right skill level for arch tools)
(mw.log(p.getShopMiscUpgradeTable()))
Tag: Reverted
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 Merchan's Permit cost reduction can be applied,
-- Type Glove exists in game so the Merchant'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()
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)
-- 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 end)


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


Line 873: Line 874:
{ 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