Skip to content

Commit

Permalink
Update 09.09.2023
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 4776548
Merge: 6c33450 f486a93
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Fri Sep 8 13:03:32 2023 -0500

    Merge pull request cecpk#317 from JimBim89/patch-9

    Update updateLabelDiffTime to include days left

commit f486a93
Author: Thorben Otto <thorben_otto@gmx.de>
Date:   Fri Sep 8 13:56:43 2023 +0200

    Update map.pokestop.js to only show time

commit 6c33450
Merge: 1d1c910 bf98196
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Thu Sep 7 16:21:58 2023 -0500

    Merge pull request cecpk#316 from wraythex/wraythex-patch-9

    Add detailed invasion stats in the sidebar (async)

commit f31e8a9
Author: Thorben Otto <thorben_otto@gmx.de>
Date:   Thu Sep 7 14:07:28 2023 +0200

    Adjust dummy text for better spacing

commit ed6c697
Author: Thorben Otto <thorben_otto@gmx.de>
Date:   Thu Sep 7 14:06:33 2023 +0200

    Remove leading zero for days

commit af9981d
Author: Thorben Otto <thorben_otto@gmx.de>
Date:   Thu Sep 7 09:23:35 2023 +0200

    Update map.pokestop.js to show date and time

commit aee3dea
Author: Thorben Otto <thorben_otto@gmx.de>
Date:   Thu Sep 7 08:30:39 2023 +0200

    Update updateLabelDiffTime to include days left

commit bf98196
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 16:40:04 2023 -0500

    Update map.stats.js

commit 0216709
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 16:25:53 2023 -0500

    Add detailed invasion stats in the sidebar (async)

commit 1d1c910
Merge: 951bfd1 d5f6fbe
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 16:10:37 2023 -0500

    Merge pull request cecpk#315 from wraythex/wraythex-patch-8

    Add showcase support to RM-async

commit d5f6fbe
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:40:55 2023 -0500

    Update coin incident image

commit 108cbfd
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:37:00 2023 -0500

    Add coin only incident stops

commit 617b0cf
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:35:22 2023 -0500

    Add coin incident image

commit 2262822
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:34:40 2023 -0500

    Add coin only incident to filter

commit 58d0363
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:34:01 2023 -0500

    Create coin only invasion

commit 1db5084
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:32:12 2023 -0500

    Switch to coin only incident

commit 5c53e41
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 06:01:19 2023 -0500

    Update Gimmighoul incident image

commit b5e7236
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 05:54:48 2023 -0500

    Add Gimmighoul stop images

commit 13e5cf4
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 05:53:20 2023 -0500

    Add Gimmighoul incident image

commit 5f16e4b
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 05:52:17 2023 -0500

    Add Gimmighoul to incident filter

commit d6ba340
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 05:51:04 2023 -0500

    Process Gimmighoul incident

commit 6f44745
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Wed Sep 6 05:50:06 2023 -0500

    Add Gimmighoul to invasions.json

commit 10d89e1
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 22:15:09 2023 -0500

    Upload new showcase stop images

commit d3607d1
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 22:08:55 2023 -0500

    Add showcase invasion image

commit f493781
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 22:07:26 2023 -0500

    Add showcase to invasion filter

commit 22fecda
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 22:03:17 2023 -0500

    Add showcase to invasion list

commit 46d4d11
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 22:01:52 2023 -0500

    Convert showcase to grunt

commit 951bfd1
Merge: adc5579 754c144
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 14:26:00 2023 -0500

    Merge pull request cecpk#314 from wraythex/wraythex-patch-7

    Add i18n for translation (async)

commit adc5579
Merge: 6e58e6d 78c089d
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 14:20:25 2023 -0500

    Merge pull request cecpk#313 from wraythex/wraythex-patch-6

    Translation Nests, Forms and more (async)

commit 6e58e6d
Merge: 4ec8b42 a20e8d7
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 14:14:38 2023 -0500

    Merge pull request cecpk#312 from wraythex/wraythex-patch-5

    Settings panel translation support (async)

commit 754c144
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 14:05:34 2023 -0500

    Add i18n for translation (async)

    Update map.nest.js, based on PR 278 by ClawOfDead

commit 78c089d
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 13:59:17 2023 -0500

    Translation Nests, Forms and more (async)

    Updating fr.json, based on PR 277 by ClawOfDead

commit a20e8d7
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 13:55:39 2023 -0500

    Settings panel translation support (async)

    based on PR 276 by ClawOfDead

commit 4ec8b42
Merge: 2ee3f75 1af28bf
Author: wraythex <59678213+wraythex@users.noreply.github.com>
Date:   Tue Sep 5 13:04:14 2023 -0500

    Merge pull request cecpk#310 from zastel1983/async

    add german Gen 9

commit 1af28bf
Author: zastel1983 <61865780+zastel1983@users.noreply.github.com>
Date:   Tue Sep 5 20:01:22 2023 +0200

    Corrected final bracket

commit cdcc7d3
Author: zastel1983 <61865780+zastel1983@users.noreply.github.com>
Date:   Tue Sep 5 18:14:26 2023 +0200

    add german Gen 9

    adds german Gen 9 names
  • Loading branch information
pki0 committed Sep 9, 2023
1 parent 8033e97 commit bdaa85b
Show file tree
Hide file tree
Showing 53 changed files with 244 additions and 35 deletions.
6 changes: 5 additions & 1 deletion rocketmad/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,12 @@ def get_pokestops(swLat, swLng, neLat, neLng, oSwLat=None, oSwLng=None,

if incident_orm is not None:
pokestop['incident_expiration'] = incident_orm.incident_expiration
if incident_orm.incident_display_type == 8:
if incident_orm.incident_display_type == 7:
pokestop['incident_grunt_type'] = 998
elif incident_orm.incident_display_type == 8:
pokestop['incident_grunt_type'] = 352
elif incident_orm.incident_display_type == 9:
pokestop['incident_grunt_type'] = 9001
else:
pokestop['incident_grunt_type'] = incident_orm.character_display
else:
Expand Down
12 changes: 10 additions & 2 deletions static/data/invasions.json
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,10 @@
"type": "",
"grunt": "James"
},
"352": {
"type": "",
"grunt": "Kecleon"
},
"500": {
"type": "",
"grunt": "Cool Challenger"
Expand Down Expand Up @@ -851,8 +855,12 @@
"type": "",
"grunt": "Savannah Trainer"
},
"352": {
"998": {
"type": "",
"grunt": "Kecleon"
"grunt": "Gimmighoul Coins"
},
"9001": {
"type": "",
"grunt": "Showcase"
}
}
Binary file added static/images/invasion/9001.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/images/invasion/998.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/images/invasion/999.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/images/pokestop/stop_i_9001.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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_9001_l_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/images/pokestop/stop_i_998.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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_998_l_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/images/pokestop/stop_i_999.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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_i_999_l_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/images/pokestop/stop_q_i_9001.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/images/pokestop/stop_q_i_9001_l_501.png
Binary file added static/images/pokestop/stop_q_i_9001_l_502.png
Binary file added static/images/pokestop/stop_q_i_9001_l_503.png
Binary file added static/images/pokestop/stop_q_i_9001_l_504.png
Binary file added static/images/pokestop/stop_q_i_9001_l_505.png
Binary file added static/images/pokestop/stop_q_i_9001_l_506.png
Binary file added static/images/pokestop/stop_q_i_998.png
Binary file added static/images/pokestop/stop_q_i_998_l_501.png
Binary file added static/images/pokestop/stop_q_i_998_l_502.png
Binary file added static/images/pokestop/stop_q_i_998_l_503.png
Binary file added static/images/pokestop/stop_q_i_998_l_504.png
Binary file added static/images/pokestop/stop_q_i_998_l_505.png
Binary file added static/images/pokestop/stop_q_i_998_l_506.png
Binary file added static/images/pokestop/stop_q_i_999.png
Binary file added static/images/pokestop/stop_q_i_999_l_501.png
Binary file added static/images/pokestop/stop_q_i_999_l_502.png
Binary file added static/images/pokestop/stop_q_i_999_l_503.png
Binary file added static/images/pokestop/stop_q_i_999_l_504.png
Binary file added static/images/pokestop/stop_q_i_999_l_505.png
Binary file added static/images/pokestop/stop_q_i_999_l_506.png
6 changes: 3 additions & 3 deletions static/js/map/map.nest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ function nestLabel(nest) {
</div>
<div class='nest-container-right'>
<div class='title'>
<strong>${getPokemonName(nest.pokemon_id)} Nest</strong>
<strong>${getPokemonName(nest.pokemon_id)} ${i18n('Nest')}</strong>
</div>
<div class='info-container'>
<div>
${i18n('Park name')}: <strong>${nest.name}</strong>
${i18n('Park name')}: <strong>${i18n(nest.name)}</strong>
</div>
<div>
${i18n('Spawns per hour')}: <strong>${nest.pokemon_avg}</strong>
</div>
<div>
${i18n('Last updated')}: <strong>${timestampToDateTime(nest.last_updated)}</strong>
${i18n('Last updated')}: <strong>${timestampToDateTime(nest.last_updated)}</strong>
</div>
</div>
<div>
Expand Down
2 changes: 1 addition & 1 deletion static/js/map/map.pokestop.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function pokestopLabel(pokestop) {
</div>
</div>
<div class='disappear'>
${timestampToTime(invasionExpireTime)} (<span class='label-countdown' disappears-at='${invasionExpireTime}'>00m00s</span>)
${timestampToTime(invasionExpireTime)} (<span class='label-countdown' disappears-at='${invasionExpireTime}'>00h00m00s</span>)
</div>
<div class='info-container'>
${typeDisplay}
Expand Down
16 changes: 10 additions & 6 deletions static/js/map/map.settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ function initSettingsSidebar() {

$('#settings-file-input').on('change', function () {
function loaded(e) {
const confirmed = confirm('Are you sure you want to import settings?')
const confirmed = confirm(i18n('Are you sure you want to import settings?'))
if (!confirmed) {
return
}
Expand All @@ -1585,15 +1585,15 @@ function initSettingsSidebar() {
})

$('#load-settings-select').on('change', function () {
const confirmed = confirm(`Are you sure you want to load the saved settings "${this.value}" and replace all current ones?`)
const confirmed = confirm(`${i18n('Are you sure you want to load the saved settings')} "${this.value}" ${i18n('and replace all current ones?')}`)
if (confirmed) {
Store.restore(JSON.parse(settings.savedSettings[this.value]))
window.location.reload()
}
})

$('#delete-settings-select').on('change', function () {
const confirmed = confirm(`Are you sure you want to delete the saved settings named "${this.value}"?`)
const confirmed = confirm(`${i18n('Are you sure you want to delete the saved settings named')} "${this.value}"?`)
if (confirmed) {
delete settings.savedSettings[this.value]
Store.set('savedSettings', settings.savedSettings)
Expand All @@ -1602,7 +1602,7 @@ function initSettingsSidebar() {
})

$('#save-settings-button').on('click', function () {
const settingsName = prompt('Please state a name for this set of settings (saved settings with the same name will be overwritten):', 'Setting1')
const settingsName = prompt(i18n('Please state a name for this set of settings (saved settings with the same name will be overwritten):'), 'Setting1')
settings.savedSettings[settingsName.replaceAll(/[^\w-_ ]/gi, '')] = JSON.stringify(Store.dump())
Store.set('savedSettings', settings.savedSettings)
refreshSavedSettings()
Expand All @@ -1613,7 +1613,7 @@ function initSettingsSidebar() {
})

$('#reset-settings-button').on('click', function () {
const confirmed = confirm('Are you sure you want to reset all settings to default values?')
const confirmed = confirm(i18n('Are you sure you want to reset all settings to default values?'))
if (confirmed) {
localStorage.clear()
window.location.reload()
Expand Down Expand Up @@ -2302,7 +2302,11 @@ function initItemFilters() {
}

function initInvasionFilters() {
const invasionIds = new Set([0, 41, 42, 43, 44, 5, 4, 6, 7, 10, 11, 12, 13, 49, 50, 14, 15, 16, 17, 18, 19, 20, 21, 47, 48, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 28, 29, 38, 39, 352, 500, 501, 502, 504, 506, 507])
const invasionIds = new Set([41, 42, 43, 44, 5, 4, 6, 7, 10, 11, 12, 13,
49, 50, 14, 15, 16, 17, 18, 19, 20, 21, 47,
48, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33,
34, 35, 36, 37, 28, 29, 38, 39, 352, 998,
9001, 500, 501, 502, 504, 506, 507])

class InvasionFilterManager extends FilterManager {
getListSelector() { return '.invasion-filter-list' }
Expand Down
22 changes: 15 additions & 7 deletions static/js/map/map.stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function updateStatsTable() {
if (selectedTab === '#pokestop-stats-tab') {
let noStatusCount = 0
let questCount = 0
let invasionCount = 0
let invasionCounts = {}
let normalLureCount = 0
let glacialLureCount = 0
let magneticLureCount = 0
Expand All @@ -448,7 +448,15 @@ function updateStatsTable() {
hasStatus = true
}
if (isPokestopMeetsInvasionFilters(pokestop)) {
invasionCount++
if ( !(pokestop.incident_grunt_type in invasionCounts) ) {
let invDesc = 'Unknown Invasion'
if (pokestop.incident_grunt_type != 0) {
invDesc = `${getInvasionType(pokestop.incident_grunt_type)} ${getInvasionGrunt(pokestop.incident_grunt_type)}`
}
invasionCounts[pokestop.incident_grunt_type] = [1, getPokestopIconUrl(pokestop), invDesc]
} else {
invasionCounts[pokestop.incident_grunt_type][0] += 1
}
hasStatus = true
}
if (isPokestopMeetsLureFilters(pokestop)) {
Expand Down Expand Up @@ -501,13 +509,13 @@ function updateStatsTable() {
]
)
}
if (invasionCount > 0) {
for (let invNum in invasionCounts) {
pokestopRows.push(
[
'<img src="static/images/pokestop/stop_i.png" width=32 />',
i18n('Rocket Invasion'),
invasionCount,
(invasionCount * 100) / pokestopCount
`<img src="${invasionCounts[invNum][1]}" width=32 />`,
i18n(invasionCounts[invNum][2]),
invasionCounts[invNum][0],
(invasionCounts[invNum][0] * 100) / pokestopCount
]
)
}
Expand Down
5 changes: 5 additions & 0 deletions static/js/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@ function getTimeUntil(time) {
var sec = Math.floor((tdiff / 1000) % 60)
var min = Math.floor((tdiff / 1000 / 60) % 60)
var hour = Math.floor((tdiff / (1000 * 60 * 60)) % 24)
var day = Math.floor(tdiff / (1000 * 60 * 60 * 24))

return {
total: tdiff,
day: day,
hour: hour,
min: min,
sec: sec,
Expand All @@ -220,13 +222,16 @@ function updateLabelDiffTime() {
$('.label-countdown').each(function (index, element) {
var disappearsAt = getTimeUntil(parseInt(element.getAttribute('disappears-at')))

var days = disappearsAt.day
var hours = disappearsAt.hour
var minutes = disappearsAt.min
var seconds = disappearsAt.sec
var timestring = ''

if (disappearsAt.time < disappearsAt.now) {
timestring = 'expired'
} else if (days > 0) {
timestring = days + 'd' + lpad(hours, 2, 0) + 'h' + lpad(minutes, 2, 0) + 'm'
} else if (hours > 0) {
timestring = lpad(hours, 2, 0) + 'h' + lpad(minutes, 2, 0) + 'm' + lpad(seconds, 2, 0) + 's'
} else {
Expand Down
Loading

0 comments on commit bdaa85b

Please sign in to comment.