Module:Shop: Difference between revisions

getShopMiscUpgradeTable: Include requirements column
(Remove dependency on Module:CombatAreas)
(getShopMiscUpgradeTable: Include requirements column)
Line 269: Line 269:
   local headerPropsDefault = {
   local headerPropsDefault = {
     ["Purchase"] = 'colspan="2"',
     ["Purchase"] = 'colspan="2"',
     ["Cost"] = 'style="min-width:90px"'
     ["Cost"] = 'style="min-width:100px"'
   }
   }
   local usedColumns, purchHeader, sortOrder, headerProps = {}, 'Purchase', nil, {}
   local usedColumns, purchHeader, sortOrder, headerProps = {}, 'Purchase', nil, {}
Line 503: Line 503:
function p.getShopMiscUpgradeTable()
function p.getShopMiscUpgradeTable()
   local purchList = p.getPurchases(function(cat, purch) return cat == 'General' and string.find(purch.name, '^Auto Eat') == nil end)
   local purchList = p.getPurchases(function(cat, purch) return cat == 'General' and string.find(purch.name, '^Auto Eat') == nil end)
   return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost' }, purchaseHeader = 'Upgrade' })
   return p._getShopTable(purchList, { columns = { 'Purchase', 'Description', 'Cost', 'Requirements' }, purchaseHeader = 'Upgrade' })
end
end