diff --git a/src/configs/config.example.json b/src/configs/config.example.json index da18bbfa..c9e4e836 100644 --- a/src/configs/config.example.json +++ b/src/configs/config.example.json @@ -155,16 +155,19 @@ }, "icons": { "Default": { - "path": "https://mygod.github.io/pokicons/v2" - }, - "Local Example": { - "path": "/img/pokemon" + "path": "https://raw.githubusercontent.com/WatWowMap/wwm-uicons/main/pokemon/" }, "Home": { - "path": "https://raw.githubusercontent.com/Mygod/PkmnHomeIcons/icons/icons" + "path": "https://raw.githubusercontent.com/nileplumb/PkmnHomeIcons/master/UICONS/pokemon/" }, "Shuffle": { - "path": "https://raw.githubusercontent.com/Mygod/pokedave_shuffle_icons_-ICONS-/master" + "path": "https://raw.githubusercontent.com/nileplumb/PkmnShuffleMap/master/UICONS/pokemon/" + }, + "Half Shiny": { + "path": "https://raw.githubusercontent.com/jms412/PkmnShuffleMap/master/UICONS_Half_Shiny_Sparkles_256/pokemon/" + }, + "Local Example": { + "path": "/img/pokemon/" } } } diff --git a/src/configs/default.json b/src/configs/default.json index 45350939..711827ed 100644 --- a/src/configs/default.json +++ b/src/configs/default.json @@ -218,7 +218,7 @@ }, "icons": { "Default": { - "path": "https://mygod.github.io/pokicons/v2" + "path": "https://raw.githubusercontent.com/WatWowMap/wwm-uicons/main/pokemon/" } }, "popupDetails": { diff --git a/src/generateMasterfile.js b/src/generateMasterfile.js index 8613b1da..f48b4d32 100644 --- a/src/generateMasterfile.js +++ b/src/generateMasterfile.js @@ -1,7 +1,8 @@ const fs = require('fs'); const axios = require('axios'); -module.exports.generate = async function generate() { +//module.exports.generate = async function generate() { +(async () => { try { const { data } = await axios.get('https://raw.githubusercontent.com/WatWowMap/Masterfile-Generator/master/master-latest.json'); @@ -15,4 +16,5 @@ module.exports.generate = async function generate() { } catch (e) { console.warn('Unable to generate new masterfile, using existing.'); } -}; +//}; +})(); \ No newline at end of file diff --git a/static/js/index.js b/static/js/index.js index 59474308..f124c134 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -982,10 +982,9 @@ function loadStorage () { const invasionFilterValue = retrieve('invasion_filter'); if (invasionFilterValue === null) { const defaultInvasionFilter = {}; - let i; - for (i = 1; i <= 50; i++) { - if (defaultInvasionFilter['i' + i] === undefined) { - defaultInvasionFilter['i' + i] = { show: true, size: 'normal' }; + for (const i of Object.entries(masterfile.invasions)) { + if (defaultInvasionFilter['i' + i[0]] === undefined) { + defaultInvasionFilter['i' + i[0]] = { show: true, size: 'normal' }; } } @@ -993,10 +992,9 @@ function loadStorage () { invasionFilter = defaultInvasionFilter; } else { invasionFilter = JSON.parse(invasionFilterValue); - let i; - for (i = 1; i <= 50; i++) { - if (invasionFilter['i' + i] === undefined) { - invasionFilter['i' + i] = { show: true, size: 'normal' }; + for (const i of Object.entries(masterfile.invasions)) { + if (invasionFilter['i' + i[0]] === undefined) { + invasionFilter['i' + i[0]] = { show: true, size: 'normal' }; } } } @@ -3044,7 +3042,7 @@ const getPvpRanks = (league, pokemon) => { if (showPokemonName) { content += `