Anonymous

Module:Sandbox/Skills/data: Difference between revisions

From Melvor Idle
m
no edit summary
mNo edit summary
mNo edit summary
Line 18: Line 18:
     // Add ID
     // Add ID
     itemsAdj[i].id = i
     itemsAdj[i].id = i
     // Remove empty lists/objects in an attempt to save on memory usage within Lua
     // Remove empty & unused lists/objects in an attempt to save on memory usage within Lua
     for (const key of Object.keys(itemsAdj[i])) {
     for (const key of Object.keys(itemsAdj[i])) {
       if (key === 'isEquipment' && itemsAdj[i][key] === false) {
       if (['media'].includes(key)) {
        delete itemsAdj[i][key]
      }
      else if (key === 'isEquipment' && itemsAdj[i][key] === false) {
         delete itemsAdj[i][key]
         delete itemsAdj[i][key]
       }
       }
Line 82: Line 85:
})()
})()
--]]
--]]
-- Version: ALPHA V0.21 (?1118)


-- Version: ALPHA V0.21 (?1118)
-- Version: ALPHA V0.21 (?1118)


local itemData = {}
local itemData = {}
itemData
itemData


itemData.EquipmentStatKeys = mw.text.jsonDecode('["attackSpeed","stabAttackBonus","slashAttackBonus","blockAttackBonus","rangedAttackBonus","magicAttackBonus","meleeStrengthBonus","rangedStrengthBonus","magicDamageBonus","meleeDefenceBonus","rangedDefenceBonus","magicDefenceBonus","damageReduction","summoningMaxhit"]')
itemData.EquipmentStatKeys = mw.text.jsonDecode('["attackSpeed","stabAttackBonus","slashAttackBonus","blockAttackBonus","rangedAttackBonus","magicAttackBonus","meleeStrengthBonus","rangedStrengthBonus","magicDamageBonus","meleeDefenceBonus","rangedDefenceBonus","magicDefenceBonus","damageReduction","summoningMaxhit"]')


return itemData
return itemData