Anonymous

Module:GolbinRaid: Difference between revisions

From Melvor Idle
Update for v1.1
(getRaidModifierList: Condense modifiers of the same base name into a single row)
(Update for v1.1)
Line 1: Line 1:
local p = {}
local p = {}
local RaidData = mw.loadData('Module:GolbinRaid/data')


local Constants = require('Module:Constants')
local Constants = require('Module:Constants')
local Shared = require('Module:Shared')
local Shared = require('Module:Shared')
local GameData = require('Module:GameData')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Items = require('Module:Items')
local Items = require('Module:Items')
Line 16: Line 15:
[35] = 'Common'
[35] = 'Common'
}
}
local crateContents = RaidData.GolbinCrate


local resultTable = mw.html.create('table')
local resultTable = mw.html.create('table')
Line 34: Line 32:
end
end


for i, crateEntry in Shared.spairs(RaidData.GolbinCrate, sortFunc) do
for i, crateEntry in Shared.spairs(GameData.golbinRaid.crateItems, sortFunc) do
local item = Items.getItemByID(crateEntry.itemID)
local item = Items.getItemByID(crateEntry.itemID)
if item ~= nil then
if item ~= nil then
Line 83: Line 81:
function p.getRaidModifierList()
function p.getRaidModifierList()
local modList = {}
local modList = {}
for i, modDet in ipairs(RaidData.PossibleModifiers) do
for i, modDet in ipairs(GameData.golbinRaid.possibleModifiers) do
local baseName, modText, modSign, isNeg, isUnsigned = Constants.getModifierDetails(modDet.key)
local baseName, modText, modSign, isNeg, isUnsigned = Constants.getModifierDetails(modDet.key)
local prefix = ''
local prefix = ''