Module:Items/SourceTables/Sandbox: Difference between revisions

m
Add level requirement for Alt magic and mining
m (Add fallback value for empty level)
m (Add level requirement for Alt magic and mining)
Line 996: Line 996:
local expIcon = ''
local expIcon = ''
local sourceTxt
local sourceTxt
local lv = nil
if item.type == 'Superior Gem' then
if item.type == 'Superior Gem' then
expIcon = Icons.TotH()
expIcon = Icons.TotH()
sourceTxt = '[[Mining#Superior Gems|Superior Gem]]'
sourceTxt = '[[Mining#Superior Gems|Superior Gem]]'
-- Superior gems can only be found with Mining 100 or above
lv = Icons._SkillReq("Mining", 100)
else
else
sourceTxt = '[[Mining#Gems|Gem]]'
sourceTxt = '[[Mining#Gems|Gem]]'
-- Gems can only be found with any Mining level
lv = Icons._SkillReq("Mining", 1)
end
end
table.insert(dropRows, {
table.insert(dropRows, {
source = sourceTxt,  
source = sourceTxt,  
type = mineType,  
type = mineType,  
level = lv,
minqty = thisGem.minQuantity,  
minqty = thisGem.minQuantity,  
qty = thisGem.maxQuantity,  
qty = thisGem.maxQuantity,  
2,875

edits