17,097
edits
Falterfire (talk | contribs) (Shop in Source list now uses the icon) |
(Revise implementation of dungeon exceptions & correct source of "Unknown Evil" lore book) |
||
Line 13: | Line 13: | ||
local Shop = require('Module:Shop') | local Shop = require('Module:Shop') | ||
-- Implements overrides for sources which cannot be obtained from game data | |||
-- Currently only overrides for dungeon sources are implemented here | |||
local sourceOverrides = { | |||
['Dungeon'] = { | |||
[361] = 'Volcanic Cave', -- Fire Cape | |||
[941] = 'Infernal Stronghold', -- Infernal Cape | |||
[950] = 'Volcanic Cave', -- A Tale of the Past, a future's prophecy | |||
[951] = 'Fire God Dungeon' -- The First Hero and an Unknown Evil | |||
} | |||
} | |||
function p._getCreationTable(item) | function p._getCreationTable(item) | ||
Line 297: | Line 307: | ||
end | end | ||
end | end | ||
-- | -- Special exceptions for Fire/Infernal Cape and first two lore books | ||
if | if sourceOverrides['Dungeon'][item.id] ~= nil then | ||
if string.len(dungeonStr) > 0 then | if string.len(dungeonStr) > 0 then | ||
dungeonStr = dungeonStr..',' | dungeonStr = dungeonStr .. ',' | ||
else | else | ||
dungeonStr = 'Completing: ' | dungeonStr = 'Completing: ' | ||
end | end | ||
dungeonStr = dungeonStr..Icons.Icon({ | dungeonStr = dungeonStr .. Icons.Icon({sourceOverrides['Dungeon'][item.id], type='dungeon', notext=true}) | ||
end | end | ||
Line 597: | Line 600: | ||
--Special exception for the Fire/Infernal Cape and first two lore books as bonus dungeon drops | --Special exception for the Fire/Infernal Cape and first two lore books as bonus dungeon drops | ||
if | if sourceOverrides['Dungeon'][item.id] ~= nil then | ||
local sourceTxt = Icons.Icon({sourceOverrides['Dungeon'][item.id], type="dungeon", notext=true}) | |||
table.insert(dropRows, {source=sourceTxt, type='[[Dungeon]]', minqty=1, qty=1, chance=100}) | |||
end | end | ||