Module:Items/SourceTables: Difference between revisions

_getItemSources: Add Alt. Magic spell sources
(Fix bone monster sources)
(_getItemSources: Add Alt. Magic spell sources)
Line 398: Line 398:
end
end
end
end
if #thiefPart > 0 then
if not Shared.tableIsEmpty(thiefPart) then
table.insert(lineArray, 'Pickpocketing: ' .. table.concat(thiefPart, ','))
table.insert(lineArray, 'Pickpocketing: ' .. table.concat(thiefPart, ','))
end
end
end
-- Can we get this item by casting an Alt. Magic spell?
local castPart = {}
for i, spell in ipairs(Magic.getSpellsProducingItem(item.id)) do
table.insert(castPart, Icons.Icon({spell.name, type=Magic._getSpellIconType(spell), notext=true}))
end
if not Shared.tableIsEmpty(castPart) then
table.insert(lineArray, 'Casting: ' .. table.concat(castPart, ','))
end
end


Line 491: Line 500:
GameData.getEntityByProperty('randomSuperiorGems', 'itemID', item.id) ~= nil) then
GameData.getEntityByProperty('randomSuperiorGems', 'itemID', item.id) ~= nil) then
table.insert(lineArray, Icons.Icon({"Mining", type='skill', notext=true})..' [[Mining#Gems|Gem]]')
table.insert(lineArray, Icons.Icon({"Mining", type='skill', notext=true})..' [[Mining#Gems|Gem]]')
end
-- Alt. Magic
if not Shared.tableIsEmpty(Magic.getSpellsProducingItem(item.id)) then
table.insert(lineArray, Icons.Icon({"Alt. Magic", type='skill'}))
end
end