Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pokemon showcase #850

Merged
merged 79 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7958c52
Update package.json
ReuschelCGN Jan 3, 2023
33ddd61
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jan 11, 2023
bddec9a
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jan 11, 2023
a85b683
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jan 12, 2023
9e6e707
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jan 13, 2023
e299b9a
Update de.json
ReuschelCGN Jan 16, 2023
3ae5340
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jan 30, 2023
888a57c
Update default.json
ReuschelCGN Jan 31, 2023
383fc43
Update default.json
ReuschelCGN Jan 31, 2023
0a0aaab
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 7, 2023
2074605
Update invasion.js
ReuschelCGN Feb 7, 2023
1096439
Update invasion.js
ReuschelCGN Feb 7, 2023
b4fffc6
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 14, 2023
74044b1
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 19, 2023
763ef50
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 22, 2023
bf8b78f
Update de.json
ReuschelCGN Feb 22, 2023
75b2a98
Update testdata.json
ReuschelCGN Feb 22, 2023
8f2e099
Update testdata.json
ReuschelCGN Feb 22, 2023
751dda9
Update testdata.json
ReuschelCGN Feb 22, 2023
c3a9298
Update mon.txt
ReuschelCGN Feb 22, 2023
875577c
Update dts_all.json
ReuschelCGN Feb 22, 2023
e2396f8
Update testdata.json
ReuschelCGN Feb 22, 2023
2074c6d
Update de.json
ReuschelCGN Feb 23, 2023
6b6e58a
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 23, 2023
b4a7fa5
Update apiTrackingEgg.js
ReuschelCGN Feb 24, 2023
953dab3
Update apiTrackingRaid.js
ReuschelCGN Feb 24, 2023
8496679
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 24, 2023
45e00f9
Update util.json
ReuschelCGN Feb 27, 2023
9b5b37c
Update de.json
ReuschelCGN Feb 27, 2023
0bb9e23
Update apiTrackingLure.js
ReuschelCGN Feb 27, 2023
dc36cf3
Update script.js
ReuschelCGN Feb 27, 2023
014f056
Update lure.js
ReuschelCGN Feb 27, 2023
61edf1e
Update testdata.json
ReuschelCGN Feb 27, 2023
44f5f4e
Update de.json
ReuschelCGN Feb 27, 2023
46d08fc
Update de.json
ReuschelCGN Feb 28, 2023
03960b5
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Feb 28, 2023
76375bc
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Mar 2, 2023
923b1d3
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Mar 2, 2023
b174369
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Mar 4, 2023
799bdfa
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Mar 19, 2023
6aab040
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Mar 26, 2023
4183aa1
Update pokestop.js
ReuschelCGN Mar 26, 2023
7ba5035
Update pokestop.js
ReuschelCGN Mar 26, 2023
4fdbd35
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Apr 6, 2023
7ea827f
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Apr 9, 2023
6450701
Update package.json
ReuschelCGN Apr 16, 2023
f4538be
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN May 23, 2023
2aeda7b
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN May 26, 2023
d459af9
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jun 2, 2023
4866fdf
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jun 2, 2023
ec50a5b
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jun 7, 2023
c56a1c4
Update de.json
ReuschelCGN Jun 16, 2023
d191bc2
Update de.json
ReuschelCGN Jun 16, 2023
679ba39
Update de.json
ReuschelCGN Jun 16, 2023
968f8eb
Update de.json
ReuschelCGN Jul 6, 2023
84b02e5
Update util.json
ReuschelCGN Jul 6, 2023
ec80aa3
Update de.json
ReuschelCGN Jul 6, 2023
3573e99
Update de.json
ReuschelCGN Jul 6, 2023
eec16f5
Update pokestop.js
ReuschelCGN Jul 9, 2023
ccf6723
Update pokestop.js
ReuschelCGN Jul 10, 2023
c9a9317
Update pokestop.js
ReuschelCGN Jul 10, 2023
00b5978
Update de.json
ReuschelCGN Jul 11, 2023
5567718
Update util.json
ReuschelCGN Jul 11, 2023
58591fc
Update util.json
ReuschelCGN Jul 11, 2023
038f4a0
Update invasion.js
ReuschelCGN Jul 11, 2023
be27286
Add files via upload
ReuschelCGN Jul 11, 2023
cb8a132
Update invasion.js
ReuschelCGN Jul 11, 2023
57ff508
Add files via upload
ReuschelCGN Jul 11, 2023
12b4493
Update info.js
ReuschelCGN Jul 11, 2023
eb82968
Delete invasion.js
ReuschelCGN Jul 11, 2023
6ac4fad
Add files via upload
ReuschelCGN Jul 11, 2023
bff8fae
Update pokestop.js
ReuschelCGN Jul 11, 2023
bc21476
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jul 20, 2023
9c452b7
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jul 20, 2023
df3f2b3
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jul 21, 2023
67939c4
Update pokestop.js
ReuschelCGN Jul 27, 2023
123e297
Update Telegram.js
ReuschelCGN Jul 27, 2023
377aee4
Update discordWorker.js
ReuschelCGN Jul 27, 2023
bfc3de4
Merge branch 'KartulUdus:develop' into develop
ReuschelCGN Jul 27, 2023
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
29 changes: 18 additions & 11 deletions locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"add":"hinzufügen",
"Added areas:":"Hinzugefügte Gebiete:",
"Adventure Hat 2020":"Forscher",
"all items":"alle items",
"all pokemon":"alle pokemon",
"All team's":"alle teams",
"allprofiles":"alleprofile",
"all items":"alle Items",
"all level":"alle Level",
"all pokemon":"alle Pokemon",
"All team's":"alle Teams",
"allprofiles":"alle Profile",
"Alola":"Alola",
"Altered":"Wandel",
"and":"und",
Expand All @@ -31,7 +32,7 @@
"Aria":"Gesang",
"Arlo":"Arlo",
"Armored":"Rüstung",
"at gym ":"an der Arena ",
"at gym ":"an der Arena",
"atk":"Atk",
"Attack":"Angriff",
"Autumn":"Herbst",
Expand Down Expand Up @@ -303,6 +304,7 @@
"Ice":"Eis",
"Incarnate":"Inkarnatiosform",
"Incense":"Rauch",
"incident":"ereignis",
"including battle changes":"inklusive Teamänderungen",
"including slot changes":"inklusive Platzänderungen",
"individually":"individuell",
Expand All @@ -321,7 +323,11 @@
"Land 3 throws":"Lande 3 Würfe",
"language":"Sprache",
"Legendary":"Legendär",
"level":"level",
"level":"Level",
"Level 1 Shadow":"Crypto Level 1",
"Level 2 Shadow":"Crypto Level 2",
"Level 3 Shadow":"Crypto Level 3",
"Level 4 Shadow":"Crypto Level 4",
"Level {0} CP {1}": "Level {0} WP {1}",
"list":"auflisten",
"little":"little",
Expand Down Expand Up @@ -444,7 +450,6 @@
"Poffin":"Knursp",
"Poison":"Gift",
"Poké Ball":"Pokéball",
"Pokemon-Contest":"Pokemon-Wettbewerb",
"polish":"Polnisch",
"poracle":"poracle",
"Possible weather change at":"Möglicher Wetterwechsel um",
Expand Down Expand Up @@ -500,11 +505,13 @@
"Send 3 gifts":"Verschicke 3 Geschenke",
"Send 5 gifts":"Verschicke 5 Geschenke",
"Shadow":"Crypto",
"Shadow Legendary":"Crypto Legendär",
"Shiny information not yet calculated - wait a few minutes and try again":"Shinyinfos noch nicht berechnet - warte ein paar Minuten und versuche es erneut",
"Shiny Rate":"Shinyrate",
"Shiny Stats (Last few hours)":"Shiny Statistik (der letzen Stunden)",
"Shock":"Blitzmodul",
"show":"zeigen",
"Showcase":"Showcase",
"Sierra":"Sierra",
"Silver Pinap Berry":"Silberne Sananabeere",
"Sinnoh Stone":"Sinnoh-Stein",
Expand Down Expand Up @@ -610,7 +617,7 @@
"Valid commands are `{0}role list`, `{0}role add <areaname>`, `{0}role remove <areaname>`":"Gültige Befehle sind `{0}rolle auflisten`, `{0}rolle hinzufügen <rollenname>`, `{0}rolle entfernen <rollenname>`, `{0}rolle mitglied`",
"Valid commands are e.g. `{0}egg level5`, `{0}egg remove everything`":"Gültige Befehle sind z.B. `{0}ei level5`, `{0}ei entfernen alle`",
"Valid commands are e.g. `{0}gym everything`, `{0}gym mystic slot_changes`":"Gültige Befehle sind z.B. `{0}arena alle`, `{0}arena weisheit platzänderung`",
"Valid commands are e.g. `{0}invasion giovanni`, `{0}invasion dragon`, `{0}invasion remove everything`":"Gültige Befehle sind z.B. `{0}invasion giovanni`, `{0}invasion drache`, `{0}invasion entfernen alle`",
"Valid commands are e.g. `{0}incident giovanni`, `{0}incident dragon`, `{0}incident remove everything`":"Gültige Befehle sind z.B. `{0}ereignis giovanni`, `{0}ereignis drache`, `{0}ereignis entfernen alle` (oder z.B. `{0}invasion drache`)",
"Valid commands are e.g. `{0}location <lat>,<lon>`, `{0}location <your address>`":"Gültige Befehle sind z.B. `{0}standort <lat>,<lon>`, `{0}standort <adresse>`",
"Valid commands are e.g. `{0}lure mossy`, `{0}lure remove everything`":"Gültige Befehle sind z.B. `{0}lockmodul moos`, `{0}lockmodul entfernen alle`",
"Valid commands are e.g. `{0}quest spinda`, `{0}quest energycharizard`, `{0}quest remove everything`":"Gültige Befehle sind z.B. `{0}quest pandir`, `{0}quest energieglurak`, `{0}quest entfernen alle`",
Expand All @@ -628,11 +635,11 @@
"Warning: Admin command detected without distance set - using default distance":"Warnung: Befehl ohne Distanz erkannt - standard Distanz wird stattdessen verwendet",
"Wash":"Wasch",
"Water":"Wasser",
"weather":"wetter",
"weather":"Wetter",
"Weather information is not yet available - wait a few minutes and try again":"Wetterinformationen sind noch nicht verfügbar - warte ein paar Minuten und versuchen es erneut",
"Webhook added":"Webhook hinzugefügt",
"webhook":"webhook",
"weight":"gewicht",
"webhook":"Webhook",
"weight":"Gewicht",
"West Sea":"Westliches Meer",
"White":"Weiß",
"Will start cleaning up to {0} messages back - do not re-run until finished":"Eine Säuberung mit bis zu {0} Nachrichten wird gestartet - bitte nicht erneut laufen lassen, bis beendet!",
Expand Down
11 changes: 6 additions & 5 deletions src/controllers/pokestop.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ class Invasion extends Controller {
data.displayTypeId = 8
}

data.gruntTypeColor = 'BABABA'

data.gender = 0
data.gruntName = ''
data.gruntTypeColor = 'BABABA'
Expand All @@ -144,9 +142,10 @@ class Invasion extends Controller {
// Event invasions
if (((data.grunt_type === 0) || !data.grunt_type) && (data.displayTypeId >= 7)) {
data.gender = 0
data.gruntName = data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId] ? this.GameData.utilData.pokestopEvent[data.displayTypeId] : ''
data.gruntType = data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId] ? this.GameData.utilData.pokestopEvent[data.displayTypeId].toLowerCase() : ''
data.gruntName = data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId].name ? this.GameData.utilData.pokestopEvent[data.displayTypeId].name : ''
data.gruntType = data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId].name ? this.GameData.utilData.pokestopEvent[data.displayTypeId].name.toLowerCase() : ''
data.gruntRewards = ''
data.gruntTypeColor = data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId].color ? this.GameData.utilData.pokestopEvent[data.displayTypeId].color : 'BABABA'
}

const whoCares = data.poracleTest ? [{
Expand Down Expand Up @@ -220,7 +219,8 @@ class Invasion extends Controller {
require('./common/weather').setGameWeather(data, translator, this.GameData, this.emojiLookup, platform, currentCellWeather)

if (((data.grunt_type === 0) || !data.grunt_type) && (data.displayTypeId >= 7)) {
data.gruntName = translator.translate(data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId] ? this.GameData.utilData.pokestopEvent[data.displayTypeId] : '')
data.gruntName = translator.translate(data.displayTypeId && this.GameData.utilData.pokestopEvent[data.displayTypeId].name ? this.GameData.utilData.pokestopEvent[data.displayTypeId].name : '')
data.gruntTypeEmoji = translator.translate(this.emojiLookup.lookup(this.GameData.utilData.pokestopEvent[data.displayTypeId].emoji, platform))
}

// full build
Expand Down Expand Up @@ -325,6 +325,7 @@ class Invasion extends Controller {
...geoResult,
...data,
time: data.distime,
tthd: data.tth.days,
tthh: data.tth.hours,
tthm: data.tth.minutes,
tths: data.tth.seconds,
Expand Down
11 changes: 11 additions & 0 deletions src/lib/discord/commando/commands/incident.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const PoracleDiscordMessage = require('../../poracleDiscordMessage')
const PoracleDiscordState = require('../../poracleDiscordState')

const commandLogic = require('../../../poracleMessage/commands/incident')

exports.run = async (client, msg, command) => {
const pdm = new PoracleDiscordMessage(client, msg)
const pds = new PoracleDiscordState(client)

await commandLogic.run(pds, pdm, command[0])
}
2 changes: 1 addition & 1 deletion src/lib/discord/commando/commands/invasion.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const PoracleDiscordMessage = require('../../poracleDiscordMessage')
const PoracleDiscordState = require('../../poracleDiscordState')

const commandLogic = require('../../../poracleMessage/commands/invasion')
const commandLogic = require('../../../poracleMessage/commands/incident')

exports.run = async (client, msg, command) => {
const pdm = new PoracleDiscordMessage(client, msg)
Expand Down
4 changes: 2 additions & 2 deletions src/lib/discord/discordWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class Worker {

async userAlert(data) {
let user = this.client.users.cache.get(data.target)
const msgDeletionMs = ((data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000
const msgDeletionMs = ((data.tth.days * 86400) + (data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000

try {
const logReference = data.logReference ? data.logReference : 'Unknown'
Expand Down Expand Up @@ -189,7 +189,7 @@ class Worker {

this.logs.discord.info(`${logReference}: #${this.id} -> ${data.name} ${data.target} CHANNEL Sending discord message${data.clean ? ' (clean)' : ''}`)
const channel = await this.client.channels.fetch(data.target)
const msgDeletionMs = ((data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000 + this.config.discord.messageDeleteDelay
const msgDeletionMs = ((data.tth.days * 86400) + (data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000 + this.config.discord.messageDeleteDelay
if (!channel) return this.logs.discord.warn(`${logReference}: #${this.id} -> ${data.name} ${data.target} CHANNEL not found`)
this.logs.discord.debug(`${logReference}: #${this.id} -> ${data.name} ${data.target} CHANNEL Sending discord message`, data.message)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ exports.run = async (client, msg, args, options) => {

if (args.length === 0) {
await msg.reply(
translator.translateFormat('Valid commands are e.g. `{0}invasion giovanni`, `{0}invasion dragon`, `{0}invasion remove everything`', util.prefix),
translator.translateFormat('Valid commands are e.g. `{0}incident giovanni`, `{0}incident dragon`, `{0}incident remove everything`', util.prefix),
{ style: 'markdown' },
)
await helpCommand.provideSingleLineHelp(client, msg, util, language, target, commandName)
return
}

const typeArray = Object.values(client.GameData.grunts).map((grunt) => grunt.type.toLowerCase())
const eventArray = Object.values(client.GameData.utilData.pokestopEvent).map((x) => x.toLowerCase())
const eventArray = Object.values(client.GameData.utilData.pokestopEvent).map((x) => x.name.toLowerCase())

let reaction = '👌'
const remove = !!args.find((arg) => arg === 'remove')
Expand Down
2 changes: 1 addition & 1 deletion src/lib/telegram/Telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Telegram extends EventEmitter {

async sendFormattedMessage(data, dataType) {
try {
const msgDeletionMs = ((data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000
const msgDeletionMs = ((data.tth.days * 86400) + (data.tth.hours * 3600) + (data.tth.minutes * 60) + data.tth.seconds) * 1000
const messageIds = []
const logReference = data.logReference ? data.logReference : 'Unknown'

Expand Down
20 changes: 20 additions & 0 deletions src/lib/telegram/commands/incident.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const PoracleTelegramMessage = require('../poracleTelegramMessage')
const PoracleTelegramState = require('../poracleTelegramState')

const commandLogic = require('../../poracleMessage/commands/incident')

module.exports = async (ctx) => {
const { controller, command } = ctx.state

// channel message authors aren't identifiable, ignore all commands sent in channels
if (Object.keys(ctx.update).includes('channel_post')) return

try {
const ptm = new PoracleTelegramMessage(ctx)
const pts = new PoracleTelegramState(ctx)

await commandLogic.run(pts, ptm, command.splitArgsArray[0])
} catch (err) {
controller.logs.telegram.error('Incident command unhappy:', err)
}
}
4 changes: 2 additions & 2 deletions src/lib/telegram/commands/invasion.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const PoracleTelegramMessage = require('../poracleTelegramMessage')
const PoracleTelegramState = require('../poracleTelegramState')

const commandLogic = require('../../poracleMessage/commands/invasion')
const commandLogic = require('../../poracleMessage/commands/incident')

module.exports = async (ctx) => {
const { controller, command } = ctx.state
Expand All @@ -17,4 +17,4 @@ module.exports = async (ctx) => {
} catch (err) {
controller.logs.telegram.error('Invasion command unhappy:', err)
}
}
}
23 changes: 19 additions & 4 deletions src/util/util.json
Original file line number Diff line number Diff line change
Expand Up @@ -931,11 +931,26 @@
"south":"\u2b07\ufe0f",
"southeast": "\u2199\ufe0f",
"east": "\u2b05\ufe0f",
"northeast": "\u2196\ufe0f"
"northeast": "\u2196\ufe0f",
"incident-goldstop": "🪙",
"incident-kecleon": "🦎",
"incident-showcase": "🏆"
},
"pokestopEvent": {
"7": "Gold-Stop",
"8": "Kecleon",
"9": "Pokemon-Contest"
"7": {
"name": "Gold-Stop",
"color": "F9E418",
"emoji": "incident-goldstop"
},
"8": {
"name": "Kecleon",
"color": "B3CA78",
"emoji": "incident-kecleon"
},
"9": {
"name": "Showcase",
"color": "03AEB6",
"emoji": "incident-showcase"
}
}
}