mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-26 22:18:43 +00:00
[Enhancement] Pokemon generation number tooltip (#2642)
* Create tooltip to show Pokemon generation * Add option to toggle generation tooltip * Use roman numeral for generation tooltip * Revert "Add option to toggle generation tooltip" This reverts commit 414b2366fc55c5642f8858d6f4854aa62c4caf60. * Update src/locales/de/battle-info.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/battle-info.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/pt_BR/battle-info.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/zh_TW/battle-info.ts Co-authored-by: RimKnight <rimknight852@gmail.com> * Update src/locales/zh_CN/battle-info.ts Co-authored-by: RimKnight <rimknight852@gmail.com> * Update src/locales/ko/battle-info.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update battle-info.ts (IT) --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: RimKnight <rimknight852@gmail.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
This commit is contained in:
parent
4dc1af99ed
commit
9df3bdde70
5
src/locales/de/battle-info.ts
Normal file
5
src/locales/de/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "{{generation}}. Generation",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const deConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/en/battle-info.ts
Normal file
5
src/locales/en/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "Generation {{generation}}",
|
||||||
|
} as const;
|
@ -5,6 +5,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const enConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/es/battle-info.ts
Normal file
5
src/locales/es/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "Generation {{generation}}",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const esConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/fr/battle-info.ts
Normal file
5
src/locales/fr/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "Génération {{generation}}",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const frConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/it/battle-info.ts
Normal file
5
src/locales/it/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "Generazione {{generation}}",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const itConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/ko/battle-info.ts
Normal file
5
src/locales/ko/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "{{generation}}세대",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const koConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/pt_BR/battle-info.ts
Normal file
5
src/locales/pt_BR/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "Geração {{generation}}",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const ptBrConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/zh_CN/battle-info.ts
Normal file
5
src/locales/zh_CN/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "第{{generation}}世代",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const zhCnConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
5
src/locales/zh_TW/battle-info.ts
Normal file
5
src/locales/zh_TW/battle-info.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { SimpleTranslationEntries } from "#app/interfaces/locales";
|
||||||
|
|
||||||
|
export const battleInfo: SimpleTranslationEntries = {
|
||||||
|
"generation": "第{{generation}}世代",
|
||||||
|
} as const;
|
@ -3,6 +3,7 @@ import { abilityTriggers } from "./ability-trigger";
|
|||||||
import { arenaFlyout } from "./arena-flyout";
|
import { arenaFlyout } from "./arena-flyout";
|
||||||
import { PGFachv, PGMachv } from "./achv";
|
import { PGFachv, PGMachv } from "./achv";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
|
import { battleInfo } from "./battle-info";
|
||||||
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
import { battleMessageUiHandler } from "./battle-message-ui-handler";
|
||||||
import { berry } from "./berry";
|
import { berry } from "./berry";
|
||||||
import { bgmName } from "./bgm-name";
|
import { bgmName } from "./bgm-name";
|
||||||
@ -54,6 +55,7 @@ export const zhTwConfig = {
|
|||||||
abilityTriggers: abilityTriggers,
|
abilityTriggers: abilityTriggers,
|
||||||
arenaFlyout: arenaFlyout,
|
arenaFlyout: arenaFlyout,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
|
battleInfo: battleInfo,
|
||||||
battleMessageUiHandler: battleMessageUiHandler,
|
battleMessageUiHandler: battleMessageUiHandler,
|
||||||
berry: berry,
|
berry: berry,
|
||||||
bgmName: bgmName,
|
bgmName: bgmName,
|
||||||
|
@ -329,6 +329,11 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.player) {
|
if (!this.player) {
|
||||||
|
if (this.nameText.visible) {
|
||||||
|
this.nameText.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip(null, i18next.t("battleInfo:generation", { generation: i18next.t(`starterSelectUiHandler:gen${pokemon.species.generation}`) })));
|
||||||
|
this.nameText.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
|
||||||
|
}
|
||||||
|
|
||||||
const dexEntry = pokemon.scene.gameData.dexData[pokemon.species.speciesId];
|
const dexEntry = pokemon.scene.gameData.dexData[pokemon.species.speciesId];
|
||||||
this.ownedIcon.setVisible(!!dexEntry.caughtAttr);
|
this.ownedIcon.setVisible(!!dexEntry.caughtAttr);
|
||||||
const opponentPokemonDexAttr = pokemon.getDexAttr();
|
const opponentPokemonDexAttr = pokemon.getDexAttr();
|
||||||
@ -645,6 +650,10 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
this.nameText.setText(displayName);
|
this.nameText.setText(displayName);
|
||||||
this.lastName = pokemon.name;
|
this.lastName = pokemon.name;
|
||||||
|
|
||||||
|
if (this.nameText.visible) {
|
||||||
|
this.nameText.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.nameText.width, this.nameText.height), Phaser.Geom.Rectangle.Contains);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePokemonExp(pokemon: Pokemon, instant?: boolean, levelDurationMultiplier: number = 1): Promise<void> {
|
updatePokemonExp(pokemon: Pokemon, instant?: boolean, levelDurationMultiplier: number = 1): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user