Add v2 gear data

Inkipedia's data isn't complete yet, but this at least gets the original abilities for most gear.
This commit is contained in:
Matt Isenhower
2017-11-27 14:28:18 -08:00
parent ced0594c4f
commit 6608e33267
2 changed files with 931 additions and 12 deletions

View File

@@ -748,6 +748,426 @@
"price": 600,
"rarity": 0,
"skill": "107"
},
{
"brand": "15",
"name": "Annaki Blue Cuff",
"price": 4800,
"rarity": 1,
"skill": "6"
},
{
"brand": "15",
"name": "Annaki Red Cuff",
"price": null,
"rarity": null,
"skill": "105"
},
{
"brand": "1",
"name": "B-ball Jersey (Home)",
"price": 2300,
"rarity": 1,
"skill": "6"
},
{
"brand": "6",
"name": "Baseball Jersey",
"price": 10000,
"rarity": 2,
"skill": "5"
},
{
"brand": "6",
"name": "Black 8-Bit FishFry",
"price": null,
"rarity": 0,
"skill": "12"
},
{
"brand": "0",
"name": "Black Anchor Tee",
"price": null,
"rarity": 1,
"skill": "107"
},
{
"brand": "3",
"name": "Black Baseball LS",
"price": null,
"rarity": 0,
"skill": "4"
},
{
"brand": "5",
"name": "Custom Painted F-3",
"price": 9700,
"rarity": 2,
"skill": "11"
},
{
"brand": "1",
"name": "Cycling Shirt",
"price": null,
"rarity": 1,
"skill": "13"
},
{
"brand": "17",
"name": "Dark Bomber Jacket",
"price": null,
"rarity": 2,
"skill": "7"
},
{
"brand": "7",
"name": "Firewave Tee",
"price": null,
"rarity": 0,
"skill": "5"
},
{
"brand": "9",
"name": "Fishing Vest",
"price": 4200,
"rarity": 1,
"skill": "8"
},
{
"brand": "5",
"name": "Forge Inkling Parka",
"price": 2900,
"rarity": 1,
"skill": "3"
},
{
"brand": "17",
"name": "Front Zip Vest",
"price": null,
"rarity": 1,
"skill": "11"
},
{
"brand": "7",
"name": "Grape Tee",
"price": null,
"rarity": 0,
"skill": "2"
},
{
"brand": "8",
"name": "Gray College Sweat",
"price": null,
"rarity": null,
"skill": "4"
},
{
"brand": "4",
"name": "Gray Mixed Shirt",
"price": 2800,
"rarity": 1,
"skill": "9"
},
{
"brand": "9",
"name": "Green Striped LS",
"price": null,
"rarity": 0,
"skill": "104"
},
{
"brand": "6",
"name": "Green Zip Hoodie",
"price": null,
"rarity": 1,
"skill": "7"
},
{
"brand": "7",
"name": "Icewave Tee",
"price": null,
"rarity": 0,
"skill": "104"
},
{
"brand": "17",
"name": "Kensa Coat",
"price": 12800,
"rarity": 2,
"skill": "107"
},
{
"brand": "2",
"name": "Krak-On 528",
"price": 800,
"rarity": 0,
"skill": "3"
},
{
"brand": "17",
"name": "Light Bomber Jacket",
"price": null,
"rarity": 2,
"skill": "9"
},
{
"brand": "8",
"name": "Linen Shirt",
"price": null,
"rarity": 0,
"skill": "10"
},
{
"brand": "3",
"name": "Lumberjack Shirt",
"price": null,
"rarity": 0,
"skill": "0"
},
{
"brand": "5",
"name": "Moist Ghillie Suit",
"price": null,
"rarity": 2,
"skill": "1"
},
{
"brand": "9",
"name": "Mountain Vest",
"price": null,
"rarity": 2,
"skill": "4"
},
{
"brand": "16",
"name": "N-Pacer Sweat",
"price": 7800,
"rarity": 2,
"skill": "105"
},
{
"brand": "16",
"name": "Navy Eminence Jacket",
"price": null,
"rarity": 2,
"skill": "0"
},
{
"brand": "9",
"name": "Olive Ski Jacket",
"price": 11000,
"rarity": 2,
"skill": "3"
},
{
"brand": "4",
"name": "Olive Zekko Parka",
"price": null,
"rarity": 1,
"skill": "4"
},
{
"brand": "6",
"name": "omega-3 Tee",
"price": null,
"rarity": 0,
"skill": "107"
},
{
"brand": "8",
"name": "Orange Cardigan",
"price": 700,
"rarity": 0,
"skill": "5"
},
{
"brand": "10",
"name": "Part-Time Pirate",
"price": null,
"rarity": 0,
"skill": "107"
},
{
"brand": "8",
"name": "Pink Hoodie",
"price": null,
"rarity": 1,
"skill": "12"
},
{
"brand": "8",
"name": "Pirate-Stripe Tee",
"price": null,
"rarity": 0,
"skill": "7"
},
{
"brand": "2",
"name": "Rainy-Day Tee",
"price": 300,
"rarity": 0,
"skill": "0"
},
{
"brand": "15",
"name": "Red Hula Punk with Tie",
"price": 9000,
"rarity": 2,
"skill": "11"
},
{
"brand": "7",
"name": "Reggae Tee",
"price": null,
"rarity": 2,
"skill": "6"
},
{
"brand": "3",
"name": "Rockenberg White",
"price": null,
"rarity": 1,
"skill": "2"
},
{
"brand": "2",
"name": "Rodeo Shirt",
"price": null,
"rarity": 0,
"skill": "9"
},
{
"brand": "3",
"name": "Round-Collar Shirt",
"price": null,
"rarity": 1,
"skill": "1"
},
{
"brand": "8",
"name": "Sage Polo",
"price": null,
"rarity": 0,
"skill": "13"
},
{
"brand": "1",
"name": "School Jersey",
"price": 3000,
"rarity": 1,
"skill": "104"
},
{
"brand": "10",
"name": "Sky-Blue Squideye",
"price": null,
"rarity": 0,
"skill": "13"
},
{
"brand": "0",
"name": "Squidmark Sweat",
"price": 800,
"rarity": 0,
"skill": "10"
},
{
"brand": "8",
"name": "Striped Shirt",
"price": null,
"rarity": 1,
"skill": "9"
},
{
"brand": "11",
"name": "Takoroka Galactic Tie Dye",
"price": null,
"rarity": 0,
"skill": "105"
},
{
"brand": "11",
"name": "Takoroka Nylon Vintage",
"price": 9500,
"rarity": 2,
"skill": "105"
},
{
"brand": "11",
"name": "Takoroka Rainbow Tie Die",
"price": 850,
"rarity": 0,
"skill": "9"
},
{
"brand": "10",
"name": "Tentatek Slogan Tee",
"price": null,
"rarity": 1,
"skill": "5"
},
{
"brand": "11",
"name": "Tricolor Rugby",
"price": null,
"rarity": 0,
"skill": "8"
},
{
"brand": "4",
"name": "Tumeric Zekko Coat",
"price": 4600,
"rarity": 1,
"skill": "105"
},
{
"brand": "0",
"name": "White Layered LS",
"price": null,
"rarity": 0,
"skill": "6"
},
{
"brand": "5",
"name": "White Sailor Suit",
"price": 3000,
"rarity": 1,
"skill": "0"
},
{
"brand": "8",
"name": "White Shirt",
"price": null,
"rarity": 2,
"skill": "2"
},
{
"brand": "8",
"name": "White Striped LS",
"price": null,
"rarity": 1,
"skill": "8"
},
{
"brand": "4",
"name": "Zapfish Satin Jacket",
"price": null,
"rarity": 1,
"skill": "5"
},
{
"brand": "4",
"name": "Zekko Long Carrot Tee",
"price": null,
"rarity": 1,
"skill": "11"
},
{
"brand": "4",
"name": "Zekko Long Radish Tee",
"price": null,
"rarity": 0,
"skill": "105"
}
],
"head": [
@@ -1170,6 +1590,216 @@
"price": null,
"rarity": 0,
"skill": "2"
},
{
"brand": "1",
"name": "B-ball Headband",
"price": null,
"rarity": 0,
"skill": "100"
},
{
"brand": "4",
"name": "Black Arrowbands",
"price": 2800,
"rarity": 1,
"skill": "102"
},
{
"brand": "7",
"name": "Classic Straw Boater",
"price": 1500,
"rarity": 1,
"skill": "7"
},
{
"brand": "1",
"name": "Cycling Cap",
"price": null,
"rarity": 0,
"skill": "10"
},
{
"brand": "5",
"name": "Designer Headphones",
"price": 2500,
"rarity": 1,
"skill": "1"
},
{
"brand": "4",
"name": "Double Egg Shades",
"price": 2200,
"rarity": 1,
"skill": "3"
},
{
"brand": "17",
"name": "Face Visor",
"price": 10300,
"rarity": 2,
"skill": "12"
},
{
"brand": "6",
"name": "FishFry Biscuit Bandana",
"price": null,
"rarity": 0,
"skill": "7"
},
{
"brand": "5",
"name": "Forge Mask",
"price": null,
"rarity": 0,
"skill": "13"
},
{
"brand": "6",
"name": "Fugu Bell Hat",
"price": 1700,
"rarity": 1,
"skill": "8"
},
{
"brand": "2",
"name": "Full Moon Glasses",
"price": 600,
"rarity": 0,
"skill": "9"
},
{
"brand": "8",
"name": "House-Tag Denim Cap",
"price": null,
"rarity": 1,
"skill": "5"
},
{
"brand": "6",
"name": "Jet Cap",
"price": 700,
"rarity": 0,
"skill": "6"
},
{
"brand": "6",
"name": "Jungle Hat",
"price": null,
"rarity": 2,
"skill": "0"
},
{
"brand": "4",
"name": "Matte Bike Helmet",
"price": null,
"rarity": 2,
"skill": "10"
},
{
"brand": "5",
"name": "Moist Ghillie Helmet",
"price": 8500,
"rarity": 2,
"skill": "3"
},
{
"brand": "5",
"name": "Motocross Nose Guard",
"price": 7600,
"rarity": 2,
"skill": "5"
},
{
"brand": "2",
"name": "Paisley Bandana",
"price": null,
"rarity": 0,
"skill": "1"
},
{
"brand": "9",
"name": "Short Beanie",
"price": 600,
"rarity": 0,
"skill": "0"
},
{
"brand": "7",
"name": "Skate Helmet",
"price": null,
"rarity": 1,
"skill": "6"
},
{
"brand": "7",
"name": "Sneaky Beanie",
"price": null,
"rarity": 1,
"skill": "4"
},
{
"brand": "5",
"name": "Splash Goggles",
"price": null,
"rarity": 1,
"skill": "12"
},
{
"brand": "7",
"name": "Sporty Bobble Hat",
"price": 800,
"rarity": 0,
"skill": "102"
},
{
"brand": "5",
"name": "Squidlife Headphones",
"price": 7070,
"rarity": 2,
"skill": "2"
},
{
"brand": "5",
"name": "Stealth Goggles",
"price": null,
"rarity": 2,
"skill": "4"
},
{
"brand": "5",
"name": "Treasure Hunter",
"price": null,
"rarity": 1,
"skill": "2"
},
{
"brand": "9",
"name": "Tulip Parasol",
"price": 1280,
"rarity": 0,
"skill": "11"
},
{
"brand": "2",
"name": "Two-Stripe Mesh",
"price": 700,
"rarity": 0,
"skill": "6"
},
{
"brand": "2",
"name": "Woolly Urchins Classic",
"price": 3800,
"rarity": 1,
"skill": "103"
},
{
"brand": "9",
"name": "Yamagiri Beanie",
"price": 1280,
"rarity": 0,
"skill": "13"
}
],
"shoes": [
@@ -1606,6 +2236,286 @@
"price": 1300,
"rarity": 0,
"skill": "13"
},
{
"brand": "10",
"name": "Amber Sea Slug Hi-Tops",
"price": 11000,
"rarity": 2,
"skill": "111"
},
{
"brand": "15",
"name": "Annaki Habaneros",
"price": 8800,
"rarity": 2,
"skill": "10"
},
{
"brand": "1",
"name": "Black Seahorses",
"price": null,
"rarity": 1,
"skill": "4"
},
{
"brand": "1",
"name": "Blue Laceless Dakroniks",
"price": null,
"rarity": 0,
"skill": "109"
},
{
"brand": "4",
"name": "Blue Lo-Tops",
"price": 800,
"rarity": 0,
"skill": "12"
},
{
"brand": "9",
"name": "Bubble Rain Boots",
"price": null,
"rarity": 0,
"skill": "111"
},
{
"brand": "2",
"name": "Clowfish Basics",
"price": null,
"rarity": 0,
"skill": "5"
},
{
"brand": "10",
"name": "Cyan Trainers",
"price": null,
"rarity": 0,
"skill": "109"
},
{
"brand": "3",
"name": "Deepsea Leather Boots",
"price": null,
"rarity": 2,
"skill": "1"
},
{
"brand": "10",
"name": "Green Iromaki 750s",
"price": null,
"rarity": 0,
"skill": "7"
},
{
"brand": "8",
"name": "Green Laceups",
"price": 1300,
"rarity": 0,
"skill": "13"
},
{
"brand": "9",
"name": "Green Rain Boots",
"price": null,
"rarity": 1,
"skill": "109"
},
{
"brand": "9",
"name": "Luminous Delta Straps",
"price": 5000,
"rarity": 1,
"skill": "13"
},
{
"brand": "5",
"name": "Moist Ghillie Boots",
"price": null,
"rarity": 2,
"skill": "110"
},
{
"brand": "16",
"name": "N-Pacer Ag",
"price": 4900,
"rarity": 1,
"skill": "2"
},
{
"brand": "16",
"name": "N-Pacer Au",
"price": null,
"rarity": 2,
"skill": "8"
},
{
"brand": "16",
"name": "Navy Enperrials",
"price": null,
"rarity": 2,
"skill": "0"
},
{
"brand": "3",
"name": "Navy Red-Soled Wingtips",
"price": null,
"rarity": 1,
"skill": "0"
},
{
"brand": "11",
"name": "Orca Woven Hi-Tops",
"price": 3600,
"rarity": 1,
"skill": "1"
},
{
"brand": "2",
"name": "Polka-dot Slip-Ons",
"price": null,
"rarity": 1,
"skill": "111"
},
{
"brand": "3",
"name": "Punk Cherries",
"price": 9000,
"rarity": 2,
"skill": "12"
},
{
"brand": "10",
"name": "Purple Iromaki 750s",
"price": null,
"rarity": 0,
"skill": "4"
},
{
"brand": "6",
"name": "Red FishFry Sandals",
"price": 2880,
"rarity": 1,
"skill": "110"
},
{
"brand": "2",
"name": "Red Hi-Tops",
"price": 1800,
"rarity": 1,
"skill": "11"
},
{
"brand": "10",
"name": "Red Iromaki 750s",
"price": null,
"rarity": 0,
"skill": "1"
},
{
"brand": "10",
"name": "Red Sea Slugs",
"price": null,
"rarity": 2,
"skill": "6"
},
{
"brand": "2",
"name": "Red Slip-Ons",
"price": null,
"rarity": 0,
"skill": "9"
},
{
"brand": "8",
"name": "Shark Moccasins",
"price": 800,
"rarity": 0,
"skill": "10"
},
{
"brand": "10",
"name": "Snowy Down Boots",
"price": null,
"rarity": 2,
"skill": "9"
},
{
"brand": "11",
"name": "Soccer Shoes",
"price": null,
"rarity": 2,
"skill": "12"
},
{
"brand": "2",
"name": "Squid-Stitch Slip-Ons",
"price": null,
"rarity": 1,
"skill": "12"
},
{
"brand": "3",
"name": "Squink Wingtips",
"price": null,
"rarity": 0,
"skill": "8"
},
{
"brand": "16",
"name": "Sun & Shade Squidkid IV",
"price": 13000,
"rarity": 2,
"skill": "13"
},
{
"brand": "3",
"name": "Tan Work Boots",
"price": 3000,
"rarity": 1,
"skill": "10"
},
{
"brand": "3",
"name": "Turquoise Kicks",
"price": 2800,
"rarity": 1,
"skill": "5"
},
{
"brand": "10",
"name": "Violet Trainers",
"price": 1000,
"rarity": 0,
"skill": "110"
},
{
"brand": "11",
"name": "White Arrows",
"price": 2500,
"rarity": 1,
"skill": "7"
},
{
"brand": "1",
"name": "White Laceless Dakroniks",
"price": 1800,
"rarity": 1,
"skill": "3"
},
{
"brand": "10",
"name": "Yellow Iromaki 750s",
"price": null,
"rarity": 0,
"skill": "6"
},
{
"brand": "1",
"name": "Zombie Hi-Horses",
"price": null,
"rarity": 0,
"skill": "5"
}
]
}

View File

@@ -55,19 +55,18 @@ function applyData(oldData, newData) {
}
// Retrieve data from Inkipedia
let inkipediaGear = {};
let inkipediaSources = {
head: 'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Headgear&action=edit',
clothes: 'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Clothing&action=edit',
shoes: 'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Shoes&action=edit',
}
let inkipediaGear = { clothes: [], head: [], shoes: [] };
let inkipediaSources = [
'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Headgear&action=edit',
'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Clothing&action=edit',
'https://splatoonwiki.org/w/index.php?title=Template:Gear/S2_Shoes&action=edit',
'https://splatoonwiki.org/w/index.php?title=List_of_updates_in_Splatoon_2/Version_2.0.0&action=edit',
];
for (let key in inkipediaSources) {
inkipediaGear[key] = [];
for (let url of inkipediaSources) {
let response = await axios.get(url);
let response = await axios.get(inkipediaSources[key]);
let regex = /\{\{GearList\/Item.*?filter/g;
let regex = /\{\{GearList\/Item.*?\}\}/g;
let row;
while (row = regex.exec(response.data)) {
// Format: name=value|brand=value|...
@@ -75,7 +74,17 @@ function applyData(oldData, newData) {
.reduce((map, kvp) => { kvp = kvp.split('='); map[kvp[0]] = kvp[1]; return map; }, {});
// Make sure we have the necessary info
if (details.name && details.brand && details.ability && details.rarity) {
// console.log(details);
if (details.category && details.name && details.brand && details.ability && details.rarity) {
let key;
switch (details.category) {
case 'Clothing': key = 'clothes'; break;
case 'Headgear': key = 'head'; break;
case 'Shoes': key = 'shoes'; break;
}
if (!key)
continue;
inkipediaGear[key].push({
name: he.decode(details.name),
brand: he.decode(details.brand),