Anonymous

Module:Sandbox/Skills/data: Difference between revisions

From Melvor Idle
m
Add item IDs to prevent cloning of item data later
m (Fiddle with structure of data again)
m (Add item IDs to prevent cloning of item data later)
Line 1: Line 1:
-- Version: ALPHA V0.21 (?1114)
-- Version: ALPHA V0.21 (?1118)


--[[The text to decode can be generated in the console via
--[[The text to decode can be generated in the console via
Line 16: Line 16:
   for (var i = 0; i < items.length; i++) {
   for (var i = 0; i < items.length; i++) {
     itemsAdj[i] = {...items[i]}
     itemsAdj[i] = {...items[i]}
    // Add ID
    itemsAdj[i].id = i
     // Amend elements of specialAttacks to include descriptions
     // Amend elements of specialAttacks to include descriptions
     if (itemsAdj[i].specialAttacks !== undefined) {
     if (itemsAdj[i].specialAttacks !== undefined) {