This commit is contained in:
MokaStitcher 2024-09-19 02:07:15 +00:00 committed by GitHub
commit 5c1e89dadc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 35 additions and 12 deletions

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "Mit diesen Pokémon losziehen?",
"confirmExit": "Willst du zurück?",
"invalidParty": "Das ist kein gültiges Team!",
"emptyParty": "Drücke die Leertaste oder Z, um Pokémon zu deinem Team hinzuzufügen. Drücke ENTER oder Start, um den Lauf zu beginnen.",
"gen1": "I",
"gen2": "II",
"gen3": "III",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "Begin with these Pokémon?",
"confirmExit": "Do you want to exit?",
"invalidParty": "This is not a valid starting party!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "I",
"gen2": "II",
"gen3": "III",

View File

@ -1,6 +1,8 @@
{
"confirmStartTeam": "¿Comenzar con estos Pokémon?",
"confirmExit": "Do you want to exit?",
"invalidParty": "¡Este equipo no es válido!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "I",
"gen2": "II",
"gen3": "III",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "Commencer avec ces Pokémon ?",
"confirmExit": "Êtes-vous sûr·e de vouloir quitter ?",
"invalidParty": "Cette équipe de départ est invalide !",
"emptyParty": "App. sur Espace ou Z pour ajouter un Pokémon à léquipe.\nApp. sur Entrée ou Start pour commencer la partie.",
"gen1": "1G",
"gen2": "2G",
"gen3": "3G",
@ -42,4 +43,4 @@
"locked": "Verrouillé",
"disabled": "Désactivé",
"uncaught": "Non-capturé"
}
}

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "Vuoi iniziare con questi Pokémon?",
"confirmExit": "Vuoi tornare alla schermata principale?",
"invalidParty": "Questo squadra iniziale non è valida!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "1ª",
"gen2": "2ª",
"gen3": "3ª",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "この手持ちで 始めますか?",
"confirmExit": "終了しますか?",
"invalidParty": "手持ちは チャレンジの 条件で 認められない!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "1世代",
"gen2": "2世代",
"gen3": "3世代",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "이 포켓몬들로 시작하시겠습니까?",
"confirmExit": "나가시겠습니까?",
"invalidParty": "스타팅 포켓몬 파티에 적합하지 않습니다!",
"emptyParty": "포켓몬을 파티에 추가하려면 스페이스 바 또는 Z 키를 눌러주세요.\n시작하려면 엔터 키 또는 시작 버튼을 눌러주세요.",
"gen1": "1세대",
"gen2": "2세대",
"gen3": "3세대",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "Começar com esses Pokémon?",
"confirmExit": "Deseja sair?",
"invalidParty": "Essa equipe de iniciais não é válida!",
"emptyParty": "Aperte Espaço ou Z para adicionar Pokémon a sua equipe.\nAperte ENTER ou Start para começar o jogo.",
"gen1": "G1",
"gen2": "G2",
"gen3": "G3",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "使用这些宝可梦开始游戏吗?",
"confirmExit": "确定要退出吗?",
"invalidParty": "初始队伍不可用!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "I",
"gen2": "II",
"gen3": "III",

View File

@ -2,6 +2,7 @@
"confirmStartTeam": "使用這些寶可夢開始嗎?",
"confirmExit": "確定要退出嗎?",
"invalidParty": "此為無效隊伍!",
"emptyParty": "Press Space or Z to add Pokémon to your party.\nPress ENTER or Start to start the run.",
"gen1": "I",
"gen2": "II",
"gen3": "III",

View File

@ -38,7 +38,6 @@ import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
import { Button } from "#enums/buttons";
import { EggSourceType } from "#app/enums/egg-source-types";
import AwaitableUiHandler from "./awaitable-ui-handler";
import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "./dropdown";
import { StarterContainer } from "./starter-container";
import { DropDownColumn, FilterBar } from "./filter-bar";
@ -1074,15 +1073,21 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
}
showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer) {
showText(text: string, delay?: integer, callback?: Function, callbackDelay?: integer, prompt?: boolean, promptDelay?: integer, moveToTop?: boolean) {
super.showText(text, delay, callback, callbackDelay, prompt, promptDelay);
if (text?.indexOf("\n") === -1) {
this.starterSelectMessageBox.setSize(318, 28);
this.message.setY(-22);
const singleLine = text?.indexOf("\n") === -1;
this.starterSelectMessageBox.setSize(318, singleLine ? 28 : 42);
if (moveToTop) {
this.starterSelectMessageBox.setOrigin(0, 0);
this.starterSelectMessageBoxContainer.setY(0);
this.message.setY(4);
} else {
this.starterSelectMessageBox.setSize(318, 42);
this.message.setY(-37);
this.starterSelectMessageBoxContainer.setY(this.scene.game.canvas.height / 6);
this.starterSelectMessageBox.setOrigin(0, 1);
this.message.setY(singleLine ? -22 : -37);
}
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
@ -1291,6 +1296,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
if (this.tryStart(true)) {
success = true;
} else {
// pressing enter with an empty party -> display message with the controls
this.tutorialActive = true;
this.showText(i18next.t("starterSelectUiHandler:emptyParty"), undefined, () => this.showText("", 0, () => this.tutorialActive = false), undefined, true);
error = true;
}
} else if (button === Button.CANCEL) {
@ -1806,7 +1814,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
options.push({
label: `x${sameSpeciesEggCost} ${i18next.t("starterSelectUiHandler:sameSpeciesEgg")}`,
handler: () => {
if (this.scene.gameData.eggs.length < 99 && (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost)) {
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost) {
if (this.scene.gameData.eggs.length >= 99) {
// Egg list full, show error message at the top of the screen and abort
this.showText(i18next.t("egg:tooManyEggs"), undefined, () => this.showText("", 0, () => this.tutorialActive = false), 2000, false, undefined, true);
return false;
}
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
starterData.candyCount -= sameSpeciesEggCost;
}
@ -3531,9 +3544,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}, cancel, null, null, 19);
});
} else {
const handler = this.scene.ui.getHandler() as AwaitableUiHandler;
handler.tutorialActive = true;
this.scene.ui.showText(i18next.t("starterSelectUiHandler:invalidParty"), null, () => this.scene.ui.showText("", 0, () => handler.tutorialActive = false), null, true);
this.tutorialActive = true;
this.showText(i18next.t("starterSelectUiHandler:invalidParty"), undefined, () => this.showText("", 0, () => this.tutorialActive = false), undefined, true);
}
return true;
}