Anonymous

Module:Common: Difference between revisions

From Melvor Idle
getRequirementString: Support requirement type MonsterKilled
m (Fix function name typo)
(getRequirementString: Support requirement type MonsterKilled)
Line 144: Line 144:
if item ~= nil then
if item ~= nil then
table.insert(reqArray, 'Find ' .. Icons.Icon({item.name, type='item'}))
table.insert(reqArray, 'Find ' .. Icons.Icon({item.name, type='item'}))
end
elseif req.type == 'MonsterKilled' then
local monster = GameData.getEntityByID('monsters', req.monsterID)
if monster ~= nil then
table.insert(reqArray, Icons.Icon({monster.name, type='monster', qty=req.count, notext=true}) .. ' Kills')
end
end
elseif req.type == 'ShopPurchase' then
elseif req.type == 'ShopPurchase' then