Module:Items/UseTables: Difference between revisions

_getSpellUseTable: Include Alt. Magic spells for items which said spells consume (e.g. Junk/Coal)
(Remove unused data)
(_getSpellUseTable: Include Alt. Magic spells for items which said spells consume (e.g. Junk/Coal))
Line 673: Line 673:
end
end


-- TODO Doesn't include Alt. Magic spells that use particular classes of items, e.g. Junk/Coal for Rags to Riches
-- Tempory Template calling Items/SourceTables|getAltMagicTable for Junk/Coal added to respective pages. Remove after TODO is completed.
function p._getSpellUseTable(item)
function p._getSpellUseTable(item)
local spellList = Magic.getSpellsForRune(item.id)
local spellList = Magic.getSpellsForItem(item.id, true)
--Bail immediately if no spells are found
--Bail immediately if no spells are found
if Shared.tableCount(spellList) == 0 then
if Shared.tableCount(spellList) == 0 then