From 3cec195e05e288c18723f680783bf351f5f0d91b Mon Sep 17 00:00:00 2001 From: versx Date: Tue, 1 Dec 2020 20:33:40 -0800 Subject: [PATCH] Add Gen6 support --- src/config.example.json | 2 +- src/views/invasion-new.mustache | 1 + src/views/pokemon-new.mustache | 1 + src/views/pvp-new.mustache | 1 + src/views/raid-new.mustache | 1 + static/js/pokemon-list.js | 7 +++++++ static/locales/_de.json | 1 + static/locales/_en.json | 6 ++---- static/locales/_es.json | 1 + 9 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/config.example.json b/src/config.example.json index decd466..82905de 100644 --- a/src/config.example.json +++ b/src/config.example.json @@ -5,7 +5,7 @@ "locale": "en", "style": "dark", "favicon": "default.png", - "maxPokemonId": 650, + "maxPokemonId": 721, "lastNestMigration": "2019-03-07T01:00:00Z", "showFooter": true, "db": { diff --git a/src/views/invasion-new.mustache b/src/views/invasion-new.mustache index 5ad4081..f1c498c 100644 --- a/src/views/invasion-new.mustache +++ b/src/views/invasion-new.mustache @@ -35,6 +35,7 @@ + diff --git a/src/views/pokemon-new.mustache b/src/views/pokemon-new.mustache index c4a9bca..5fe376f 100644 --- a/src/views/pokemon-new.mustache +++ b/src/views/pokemon-new.mustache @@ -35,6 +35,7 @@ + diff --git a/src/views/pvp-new.mustache b/src/views/pvp-new.mustache index 9eb50fd..36f39f6 100644 --- a/src/views/pvp-new.mustache +++ b/src/views/pvp-new.mustache @@ -35,6 +35,7 @@ + diff --git a/src/views/raid-new.mustache b/src/views/raid-new.mustache index a4600df..91aedd6 100644 --- a/src/views/raid-new.mustache +++ b/src/views/raid-new.mustache @@ -35,6 +35,7 @@ + diff --git a/static/js/pokemon-list.js b/static/js/pokemon-list.js index 14a3741..02fd46a 100644 --- a/static/js/pokemon-list.js +++ b/static/js/pokemon-list.js @@ -49,6 +49,13 @@ $('#select_gen5').on('click', function() { } }); }); +$('#select_gen6').on('click', function() { + $.each($('.item'), function(index, item) { + if (item.id > 649 && item.id < 722) { + selectItem(item); + } + }); +}); $('#select_rare').on('click', function() { $.each($('.item'), function(index, item) { if (!pokemonRarity.common.includes(parseInt(item.id))) { diff --git a/static/locales/_de.json b/static/locales/_de.json index 2f0fe28..451dc9b 100644 --- a/static/locales/_de.json +++ b/static/locales/_de.json @@ -44,6 +44,7 @@ "Select Gen3": "Gen3 auswählen", "Select Gen4": "Gen4 auswählen", "Select Gen5": "Gen5 auswählen", + "Select Gen6": "Gen6 auswählen", "Select Rare": "Seltene auswählen", "Select Ultra Rare": "Ultra Seltene auswählen", "Select 5 Star Raid": "5 Sterne Raids", diff --git a/static/locales/_en.json b/static/locales/_en.json index 9189e02..74e50e2 100644 --- a/static/locales/_en.json +++ b/static/locales/_en.json @@ -44,6 +44,7 @@ "Select Gen3": "Select Gen3", "Select Gen4": "Select Gen4", "Select Gen5": "Select Gen5", + "Select Gen6": "Select Gen6", "Select Rare": "Select Rare", "Select Ultra Rare": "Select Ultra Rare", "Select 5 Star Raid": "Select 5 Star Raid", @@ -100,8 +101,5 @@ "Location": "Location", "Max Distance": "Max Distance", "Phone Number": "Phone Number", - "Value": "Value", - "poke_7": "poke_7", - "poke_132": "poke_132", - "poke_25": "poke_25" + "Value": "Value" } \ No newline at end of file diff --git a/static/locales/_es.json b/static/locales/_es.json index 9420ce1..6826740 100644 --- a/static/locales/_es.json +++ b/static/locales/_es.json @@ -44,6 +44,7 @@ "Select Gen3": "Select Gen3", "Select Gen4": "Select Gen4", "Select Gen5": "Select Gen5", + "Select Gen6": "Select Gen6", "Select Rare": "Select Rare", "Select Ultra Rare": "Select Ultra Rare", "Select 5 Star Raid": "Select 5 Star Raid",