From ad4b4a0af759962acc428d2606d9f6ce7e55f36c Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:06:39 +0900 Subject: [PATCH 1/5] [Localisation] [ES] Reviewed and translated missing settings.json (#3865) * Translate settings.json via GitLocalize * Translate settings.json via GitLocalize --------- Co-authored-by: Rafa Co-authored-by: Asdar --- src/locales/es/settings.json | 102 ++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/src/locales/es/settings.json b/src/locales/es/settings.json index 2351abf04ae..ff37c8464bf 100644 --- a/src/locales/es/settings.json +++ b/src/locales/es/settings.json @@ -2,6 +2,106 @@ "boy": "Chico", "girl": "Chica", "general": "General", + "display": "Pantalla", "audio": "Audio", - "shopOverlayOpacity": "Opacidad de la fase de compra" + "gamepad": "Mando", + "keyboard": "Teclado", + "gameSpeed": "Veloc. del juego", + "hpBarSpeed": "Veloc. Barra PS", + "expGainsSpeed": "Veloc. de EXP", + "expPartyDisplay": "Mostrar EXP del Equipo", + "skipSeenDialogues": "Saltar diálogos leídos", + "battleStyle": "Estilo de lucha", + "enableRetries": "Activar reintento", + "hideIvs": "Ocultar escáner de IVs", + "tutorials": "Tutoriales", + "touchControls": "Control táctil", + "vibrations": "Vibración", + "normal": "Normal", + "fast": "+1", + "faster": "+2", + "skip": "Saltar", + "levelUpNotifications": "Aumentos de nivel", + "on": "Sí", + "off": "No", + "switch": "Cambiar", + "set": "Mantener", + "auto": "Auto.", + "disabled": "Desact.", + "language": "Idioma", + "change": "Cambiar", + "uiTheme": "Color UI", + "default": "Predet.", + "legacy": "Clásico", + "windowType": "Ventana", + "moneyFormat": "Formato Dinero", + "damageNumbers": "Cifras de daño", + "simple": "Simple", + "fancy": "Elegante", + "abbreviated": "Abreviado", + "moveAnimations": "Animación de Movs.", + "showStatsOnLevelUp": "Estadísticas al Aum. Nivel", + "candyUpgradeNotification": "Notificar Mejora Caramelo", + "passivesOnly": "Solo Pasivas", + "candyUpgradeDisplay": "Muestra Mejora Caramelo", + "icon": "Icono", + "animation": "Animación", + "moveInfo": "Info. Movimiento", + "showMovesetFlyout": "Descripción de Movimientos", + "showArenaFlyout": "Descripción de Escenarios", + "showTimeOfDayWidget": "Mostrar Hora del Día", + "timeOfDayAnimation": "Animación Hora del Día", + "bounce": "Rebote", + "timeOfDay_back": "Vuelta", + "spriteSet": "Set de Sprites", + "consistent": "Consistente", + "mixedAnimated": "Animación mixta", + "fusionPaletteSwaps": "Colores de fusión", + "playerGender": "Género del jugador", + "typeHints": "Pistas de tipos", + "masterVolume": "Volumen total", + "bgmVolume": "Volumen música", + "fieldVolume": "Volumen escenario", + "seVolume": "Volumen efectos", + "uiVolume": "Volumen sistema", + "musicPreference": "Preferencia musical", + "mixed": "Mixta", + "gamepadPleasePlug": "Conecta un mando o pulsa un botón", + "delete": "Eliminar", + "keyboardPleasePress": "Pulsa una tecla de tu teclado", + "reset": "Restablecer", + "requireReload": "Requiere reinicio", + "action": "Acción", + "back": "Atrás", + "pressToBind": "Pulsa para vincular", + "pressButton": "Pulsa un botón...", + "buttonUp": "Arriba", + "buttonDown": "Abajo", + "buttonLeft": "Izquierda", + "buttonRight": "Derecha", + "buttonAction": "Acción", + "buttonMenu": "Menú", + "buttonSubmit": "Confirmar", + "buttonCancel": "Cancelar", + "buttonStats": "Estadísticas", + "buttonCycleForm": "Cambiar forma", + "buttonCycleShiny": "Cambiar shiny", + "buttonCycleGender": "Cambiar género", + "buttonCycleAbility": "Cambiar habilidad", + "buttonCycleNature": "Cambiar naturaleza", + "buttonCycleVariant": "Cambiar variante", + "buttonSpeedUp": "Acelerar", + "buttonSlowDown": "Ralentizar", + "alt": " (Alt.)", + "mute": "Silenciar", + "controller": "Mando", + "gamepadSupport": "Soporte de mando", + "showBgmBar": "Mostrar título de canción", + "moveTouchControls": "Controles táctiles", + "shopOverlayOpacity": "Opacidad de la fase de compra", + "shopCursorTarget": "Cursor de la tienda", + "items": "Objetos", + "reroll": "Actualizar", + "shop": "Tienda", + "checkTeam": "Ver equipo" } From 170a5831bf928edf6de4c348889d9c9002c0e39b Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:01:15 -0700 Subject: [PATCH 2/5] [Bug] Updating ModifierItems' audio keys (#3853) Co-authored-by: frutescens --- src/modifier/modifier-type.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modifier/modifier-type.ts b/src/modifier/modifier-type.ts index beec048754e..938f73a1e08 100644 --- a/src/modifier/modifier-type.ts +++ b/src/modifier/modifier-type.ts @@ -57,7 +57,7 @@ export class ModifierType { this.localeKey = localeKey!; // TODO: is this bang correct? this.iconImage = iconImage!; // TODO: is this bang correct? this.group = group!; // TODO: is this bang correct? - this.soundName = soundName ?? "restore"; + this.soundName = soundName ?? "se/restore"; this.newModifierFunc = newModifierFunc; } @@ -169,7 +169,7 @@ class AddPokeballModifierType extends ModifierType { private count: integer; constructor(iconImage: string, pokeballType: PokeballType, count: integer) { - super("", iconImage, (_type, _args) => new Modifiers.AddPokeballModifier(this, pokeballType, count), "pb", "pb_bounce_1"); + super("", iconImage, (_type, _args) => new Modifiers.AddPokeballModifier(this, pokeballType, count), "pb", "se/pb_bounce_1"); this.pokeballType = pokeballType; this.count = count; } @@ -677,7 +677,7 @@ export class MoneyRewardModifierType extends ModifierType { private moneyMultiplierDescriptorKey: string; constructor(localeKey: string, iconImage: string, moneyMultiplier: number, moneyMultiplierDescriptorKey: string) { - super(localeKey, iconImage, (_type, _args) => new Modifiers.MoneyRewardModifier(this, moneyMultiplier), "money", "buy"); + super(localeKey, iconImage, (_type, _args) => new Modifiers.MoneyRewardModifier(this, moneyMultiplier), "money", "se/buy"); this.moneyMultiplier = moneyMultiplier; this.moneyMultiplierDescriptorKey = moneyMultiplierDescriptorKey; @@ -1462,7 +1462,7 @@ export const modifierTypes = { VOUCHER_PLUS: () => new AddVoucherModifierType(VoucherType.PLUS, 1), VOUCHER_PREMIUM: () => new AddVoucherModifierType(VoucherType.PREMIUM, 1), - GOLDEN_POKEBALL: () => new ModifierType("modifierType:ModifierType.GOLDEN_POKEBALL", "pb_gold", (type, _args) => new Modifiers.ExtraModifierModifier(type), undefined, "pb_bounce_1"), + GOLDEN_POKEBALL: () => new ModifierType("modifierType:ModifierType.GOLDEN_POKEBALL", "pb_gold", (type, _args) => new Modifiers.ExtraModifierModifier(type), undefined, "se/pb_bounce_1"), ENEMY_DAMAGE_BOOSTER: () => new ModifierType("modifierType:ModifierType.ENEMY_DAMAGE_BOOSTER", "wl_item_drop", (type, _args) => new Modifiers.EnemyDamageBoosterModifier(type, 5)), ENEMY_DAMAGE_REDUCTION: () => new ModifierType("modifierType:ModifierType.ENEMY_DAMAGE_REDUCTION", "wl_guard_spec", (type, _args) => new Modifiers.EnemyDamageReducerModifier(type, 2.5)), From fd81a5d3b38bfb536e91536971c5ac4180991296 Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:27:12 +0200 Subject: [PATCH 3/5] Translate settings.json via GitLocalize (#3867) Co-authored-by: Asdar --- src/locales/es/settings.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/locales/es/settings.json b/src/locales/es/settings.json index ff37c8464bf..9c16fbb0fd6 100644 --- a/src/locales/es/settings.json +++ b/src/locales/es/settings.json @@ -7,7 +7,7 @@ "gamepad": "Mando", "keyboard": "Teclado", "gameSpeed": "Veloc. del juego", - "hpBarSpeed": "Veloc. Barra PS", + "hpBarSpeed": "Veloc. barra PS", "expGainsSpeed": "Veloc. de EXP", "expPartyDisplay": "Mostrar EXP del Equipo", "skipSeenDialogues": "Saltar diálogos leídos", @@ -34,28 +34,28 @@ "default": "Predet.", "legacy": "Clásico", "windowType": "Ventana", - "moneyFormat": "Formato Dinero", + "moneyFormat": "Formato dinero", "damageNumbers": "Cifras de daño", "simple": "Simple", "fancy": "Elegante", "abbreviated": "Abreviado", - "moveAnimations": "Animación de Movs.", - "showStatsOnLevelUp": "Estadísticas al Aum. Nivel", - "candyUpgradeNotification": "Notificar Mejora Caramelo", - "passivesOnly": "Solo Pasivas", - "candyUpgradeDisplay": "Muestra Mejora Caramelo", + "moveAnimations": "Animación de movs.", + "showStatsOnLevelUp": "Estadísticas al aum. nivel", + "candyUpgradeNotification": "Aviso de caramelos", + "passivesOnly": "Solo pasivas", + "candyUpgradeDisplay": "Muestra de caramelos", "icon": "Icono", "animation": "Animación", - "moveInfo": "Info. Movimiento", - "showMovesetFlyout": "Descripción de Movimientos", - "showArenaFlyout": "Descripción de Escenarios", - "showTimeOfDayWidget": "Mostrar Hora del Día", - "timeOfDayAnimation": "Animación Hora del Día", + "moveInfo": "Info. de movimientos", + "showMovesetFlyout": "Descripción de movimientos", + "showArenaFlyout": "Descripción de escenarios", + "showTimeOfDayWidget": "Mostrar hora del día", + "timeOfDayAnimation": "Animación hora del día", "bounce": "Rebote", "timeOfDay_back": "Vuelta", - "spriteSet": "Set de Sprites", + "spriteSet": "Set de sprites", "consistent": "Consistente", - "mixedAnimated": "Animación mixta", + "mixedAnimated": "Mixto", "fusionPaletteSwaps": "Colores de fusión", "playerGender": "Género del jugador", "typeHints": "Pistas de tipos", From 447d47ef477bde42183f0d72560f413d4800fe5b Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:29:15 +0200 Subject: [PATCH 4/5] Translate trainer-names.json via GitLocalize (#3860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Ricardo --- src/locales/pt_BR/trainer-names.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/locales/pt_BR/trainer-names.json b/src/locales/pt_BR/trainer-names.json index fc4e48de040..5500e2ddb46 100644 --- a/src/locales/pt_BR/trainer-names.json +++ b/src/locales/pt_BR/trainer-names.json @@ -138,11 +138,17 @@ "rood": "Rood", "xerosic": "Xerosic", "bryony": "Bryony", + "faba": "Faba", + "plumeria": "Plumeria", + "oleana": "Oleana", "maxie": "Maxie", "archie": "Archie", "cyrus": "Cyrus", "ghetsis": "Ghetsis", "lysandre": "Lysandre", + "lusamine": "Lusamine", + "guzma": "Guzma", + "rose": "Rose", "blue_red_double": "Blue & Red", "red_blue_double": "Red & Blue", "tate_liza_double": "Tate & Liza", @@ -153,4 +159,4 @@ "iris_alder_double": "Iris & Alder", "marnie_piers_double": "Marnie & Piers", "piers_marnie_double": "Piers & Marnie" -} \ No newline at end of file +} From e0bcb2ef27f02c510837087f1ffcabaa7ac22cdd Mon Sep 17 00:00:00 2001 From: Mumble <171087428+frutescens@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:00:38 -0700 Subject: [PATCH 5/5] [P3 Bug] Run History function saves the most-recent session data possible (#3838) Co-authored-by: frutescens --- src/phases/game-over-phase.ts | 72 ++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/src/phases/game-over-phase.ts b/src/phases/game-over-phase.ts index a42e8472952..78dd73057a1 100644 --- a/src/phases/game-over-phase.ts +++ b/src/phases/game-over-phase.ts @@ -1,19 +1,19 @@ -import { clientSessionId } from "#app/account.js"; -import BattleScene from "#app/battle-scene.js"; -import { BattleType } from "#app/battle.js"; -import { miscDialogue, getCharVariantFromDialogue } from "#app/data/dialogue.js"; -import { pokemonEvolutions } from "#app/data/pokemon-evolutions.js"; -import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species.js"; -import { trainerConfigs } from "#app/data/trainer-config.js"; -import { PlayerGender } from "#app/enums/player-gender.js"; -import { TrainerType } from "#app/enums/trainer-type.js"; -import Pokemon from "#app/field/pokemon.js"; -import { modifierTypes } from "#app/modifier/modifier-type.js"; -import { achvs, ChallengeAchv } from "#app/system/achv.js"; -import { Unlockables } from "#app/system/unlockables.js"; -import { Mode } from "#app/ui/ui.js"; +import { clientSessionId } from "#app/account"; +import BattleScene from "#app/battle-scene"; +import { BattleType } from "#app/battle"; +import { miscDialogue, getCharVariantFromDialogue } from "#app/data/dialogue"; +import { pokemonEvolutions } from "#app/data/pokemon-evolutions"; +import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species"; +import { trainerConfigs } from "#app/data/trainer-config"; +import { PlayerGender } from "#app/enums/player-gender"; +import { TrainerType } from "#app/enums/trainer-type"; +import Pokemon from "#app/field/pokemon"; +import { modifierTypes } from "#app/modifier/modifier-type"; +import { achvs, ChallengeAchv } from "#app/system/achv"; +import { Unlockables } from "#app/system/unlockables"; +import { Mode } from "#app/ui/ui"; import i18next from "i18next"; -import * as Utils from "#app/utils.js"; +import * as Utils from "#app/utils"; import { BattlePhase } from "./battle-phase"; import { CheckSwitchPhase } from "./check-switch-phase"; import { EncounterPhase } from "./encounter-phase"; @@ -23,6 +23,12 @@ import { SummonPhase } from "./summon-phase"; import { EndCardPhase } from "./end-card-phase"; import { PostGameOverPhase } from "./post-game-over-phase"; import { UnlockPhase } from "./unlock-phase"; +import { SessionSaveData } from "../system/game-data"; +import TrainerData from "../system/trainer-data"; +import PokemonData from "../system/pokemon-data"; +import PersistentModifierData from "../system/modifier-data"; +import ChallengeData from "../system/challenge-data"; +import ArenaData from "../system/arena-data"; export class GameOverPhase extends BattlePhase { private victory: boolean; @@ -98,13 +104,7 @@ export class GameOverPhase extends BattlePhase { this.scene.gameData.gameStats.dailyRunSessionsWon++; } } - this.scene.gameData.getSession(this.scene.sessionSlotId).then(sessionData => { - if (sessionData) { - this.scene.gameData.saveRunHistory(this.scene, sessionData, this.victory); - } - }).catch(err => { - console.error("Failed to save run to history.", err); - }); + this.scene.gameData.saveRunHistory(this.scene, this.getFinalSessionData(), this.victory); const fadeDuration = this.victory ? 10000 : 5000; this.scene.fadeOutBgm(fadeDuration, true); const activeBattlers = this.scene.getField().filter(p => p?.isActive(true)); @@ -207,4 +207,32 @@ export class GameOverPhase extends BattlePhase { this.firstRibbons.push(getPokemonSpecies(pokemon.species.getRootSpeciesId(forStarter))); } } + + /** + * This function mirrors game-data.ts' getSessionSaveData() to update the session data to reflect any changes that occurred within the last wave + * This means that level ups, item usage, evolutions, etc. will all be accurately reflected. + * @returns {@linkCode SessionSaveData} an updated version of the wave's SessionSaveData that accurately reflects the events of the wave + */ + private getFinalSessionData(): SessionSaveData { + return { + seed: this.scene.seed, + playTime: this.scene.sessionPlayTime, + gameMode: this.scene.gameMode.modeId, + party: this.scene.getParty().map(p => new PokemonData(p)), + enemyParty: this.scene.getEnemyParty().map(p => new PokemonData(p)), + modifiers: this.scene.findModifiers(() => true).map(m => new PersistentModifierData(m, true)), + enemyModifiers: this.scene.findModifiers(() => true, false).map(m => new PersistentModifierData(m, false)), + arena: new ArenaData(this.scene.arena), + pokeballCounts: this.scene.pokeballCounts, + money: this.scene.money, + score: this.scene.score, + waveIndex: this.scene.currentBattle.waveIndex, + battleType: this.scene.currentBattle.battleType, + trainer: this.scene.currentBattle.battleType === BattleType.TRAINER ? new TrainerData(this.scene.currentBattle.trainer) : null, + gameVersion: this.scene.game.config.gameVersion, + timestamp: new Date().getTime(), + challenges: this.scene.gameMode.challenges.map(c => new ChallengeData(c)) + } as SessionSaveData; + } } +