Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,271 changes: 2,259 additions & 12 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions src/routes/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,19 +885,21 @@ const getData = async (perms, filter) => {
const invasionData = [];

// Grunt Type
for (let i = 1; i <= 50; i++) {
(i >= 41 && i <= 44 ? invasionLeaderData : invasionData).push({
for (const i of Object.entries(masterfile.invasions)) {
// Skip unset, Jesse, James, & extra grunts
if (['0', '45', '46', '53', '54'].includes(i[0])) { continue; }
(i[0] >= 41 && i[0] <= 44 ? invasionLeaderData : invasionData).push({
'id': {
'formatted': utils.zeroPad(i, 3),
'sort': i
'formatted': utils.zeroPad(i[0], 3),
'sort': i[0]
},
'name': i18n.__('grunt_' + i),
'name': i18n.__('grunt_' + i[0]),
'image': {
type: 'img',
path: `/grunt/${i}.png`
path: `/grunt/${i[0]}.png`
},
'filter': generateShowHideButtons(i, 'invasion-grunt'),
'size': generateSizeButtons(i, 'invasion-grunt'),
'filter': generateShowHideButtons(i[0], 'invasion-grunt'),
'size': generateSizeButtons(i[0], 'invasion-grunt'),
'type': gruntTypeString
});
}
Expand Down
Binary file added static/img/grunt/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/501.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/502.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/503.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/504.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/505.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/506.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/507.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/508.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/509.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/510.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/511.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/grunt/513.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_501.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_502.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_503.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_504.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_505.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_506.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_507.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/invasion/i0_509.png
Binary file added static/img/invasion/i1_0.png
Binary file added static/img/invasion/i1_500.png
Binary file added static/img/invasion/i1_501.png
Binary file added static/img/invasion/i1_502.png
Binary file added static/img/invasion/i1_503.png
Binary file added static/img/invasion/i1_504.png
Binary file added static/img/invasion/i1_505.png
Binary file added static/img/invasion/i1_506.png
Binary file added static/img/invasion/i1_507.png
Binary file added static/img/invasion/i1_509.png
Binary file added static/img/invasion/i2_0.png
Binary file added static/img/invasion/i2_500.png
Binary file added static/img/invasion/i2_501.png
Binary file added static/img/invasion/i2_502.png
Binary file added static/img/invasion/i2_503.png
Binary file added static/img/invasion/i2_504.png
Binary file added static/img/invasion/i2_505.png
Binary file added static/img/invasion/i2_506.png
Binary file added static/img/invasion/i2_507.png
Binary file added static/img/invasion/i2_509.png
Binary file added static/img/invasion/i3_0.png
Binary file added static/img/invasion/i3_500.png
Binary file added static/img/invasion/i3_501.png
Binary file added static/img/invasion/i3_502.png
Binary file added static/img/invasion/i3_503.png
Binary file added static/img/invasion/i3_504.png
Binary file added static/img/invasion/i3_505.png
Binary file added static/img/invasion/i3_506.png
Binary file added static/img/invasion/i3_507.png
Binary file added static/img/invasion/i3_509.png
Binary file added static/img/invasion/i4_0.png
Binary file added static/img/invasion/i4_500.png
Binary file added static/img/invasion/i4_501.png
Binary file added static/img/invasion/i4_502.png
Binary file added static/img/invasion/i4_503.png
Binary file added static/img/invasion/i4_504.png
Binary file added static/img/invasion/i4_505.png
Binary file added static/img/invasion/i4_506.png
Binary file added static/img/invasion/i4_507.png
Binary file added static/img/invasion/i4_509.png
Binary file added static/img/invasion/i5_0.png
Binary file added static/img/invasion/i5_500.png
Binary file added static/img/invasion/i5_501.png
Binary file added static/img/invasion/i5_502.png
Binary file added static/img/invasion/i5_503.png
Binary file added static/img/invasion/i5_504.png
Binary file added static/img/invasion/i5_505.png
Binary file added static/img/invasion/i5_506.png
Binary file added static/img/invasion/i5_507.png
Binary file added static/img/invasion/i5_509.png
14 changes: 7 additions & 7 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2119,9 +2119,9 @@ function loadData () {

const invasionFilterExclude = [];
if (showInvasions) {
for (let i = 1; i <= 50; i++) {
if (invasionFilter['i' + i].show === false) {
invasionFilterExclude.push('i' + i);
for (const i of Object.entries(masterfile.invasions)) {
if (invasionFilter['i' + i[0]].show === false) {
invasionFilterExclude.push('i' + i[0]);
}
}
}
Expand Down Expand Up @@ -7985,8 +7985,8 @@ function registerFilterButtonCallbacks() {
// Invasion filter buttons
$('#reset-invasion-filter').on('click', function (event) {
const defaultInvasionFilter = {};
for (let i = 1; i <= 50; i++) {
defaultInvasionFilter['i' + i] = { show: true, size: 'normal' };
for (const i of Object.entries(masterfile.invasions)) {
defaultInvasionFilter['i' + i[0]] = { show: true, size: 'normal' };
}

store('invasion_filter', JSON.stringify(defaultInvasionFilter));
Expand All @@ -7997,8 +7997,8 @@ function registerFilterButtonCallbacks() {

$('#disable-all-invasion-filter').on('click', function (event) {
const defaultInvasionFilter = {};
for (let i = 1; i <= 50; i++) {
defaultInvasionFilter['i' + i] = { show: false, size: invasionFilterNew['i' + i].size };
for (const i of Object.entries(masterfile.invasions)) {
defaultInvasionFilter['i' + i[0]] = { show: false, size: invasionFilterNew['i' + i[0]].size };
}

store('invasion_filter', JSON.stringify(defaultInvasionFilter));
Expand Down