Anonymous

Module:Skills: Difference between revisions

From Melvor Idle
no edit summary
(_buildAstrologyModifierArray: Fix skill/value pair format)
No edit summary
Line 208: Line 208:
for i, modDefn in ipairs(modArray) do
for i, modDefn in ipairs(modArray) do
local modName, modVal = modDefn[1], modDefn[2]
local modName, modVal = modDefn[1], modDefn[2]
local isSkill = type(modVal) == 'table' and type(modVal[1]) == 'string'
local isSkill = type(modVal) == 'table' and modVal.skillID ~= nil
if modArrayKV[modName] == nil then
if modArrayKV[modName] == nil then
modArrayKV[modName] = (isSkill and { modVal } or modVal)
modArrayKV[modName] = (isSkill and { modVal } or modVal)