diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000000..ce942deba5f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,45 @@ +# Order is important; the last matching pattern takes the most precedence. + +# everything (whole code-base) - Junior Devs +* @pagefaultgames/junior-dev-team + +# github actions/templates etc. - Dev Leads +/.github @pagefaultgames/dev-leads + +# --- Translations --- + +# all translations - Translation Leads +/src/locales @pagefaultgames/translation-leads + +# Catalan (Spain/Spanish) +/src/locales/ca_ES @pagefaultgames/catalan-translation-team + +# German +/src/locales/de @pagefaultgames/german-translation-team + +# English +/src/locales/en @pagefaultgames/english-translation-team + +# Spanish +/src/locales/es @pagefaultgames/spanish-translation-team + +# French +/src/locales/fr @pagefaultgames/french-translation-team + +# Italian +/src/locales/it @pagefaultgames/italian-translation-team + +# Japenese +/src/locales/ja @pagefaultgames/japanese-translation-team + +# Korean +/src/locales/ko @pagefaultgames/korean-translation-team + +# Brasilian (Brasil/Portuguese) +/src/locales/pt_BR @pagefaultgames/portuguese_br-translation-team + +# Chinese (simplified) +/src/locales/zh_CN @pagefaultgames/chinese_simplified-translation-team + +# Chinese (traditional) +/src/locales/zh_TW @pagefaultgames/chinese_traditional-translation-team diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 5aec86a0463..843f7feab59 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,7 +1,7 @@ name: Feature Request description: Suggest an idea for this project title: "[Feature] " -labels: ["enhancement"] +labels: ["Enhancement"] body: - type: markdown attributes: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a765ed4a114..3e6b8bf6d0d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -30,7 +30,7 @@ - [ ] The PR is self-contained and cannot be split into smaller PRs? - [ ] Have I provided a clear explanation of the changes? - [ ] Have I considered writing automated tests for the issue? -- [ ] If I have text, did I add placeholders for them in locales? +- [ ] If I have text, did I add make it translatable and added a key in the English language? - [ ] Have I tested the changes (manually)? - [ ] Are all unit tests still passing? (`npm run test`) - [ ] Are the changes visual? diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 1a08d5d6261..a033c8a3cb3 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -49,8 +49,8 @@ import CandyBar from "./ui/candy-bar"; import { Variant, variantData } from "./data/variant"; import { Localizable } from "#app/interfaces/locales"; import Overrides from "#app/overrides"; -import {InputsController} from "./inputs-controller"; -import {UiInputs} from "./ui-inputs"; +import { InputsController } from "./inputs-controller"; +import { UiInputs } from "./ui-inputs"; import { NewArenaEvent } from "./events/battle-scene"; import { ArenaFlyout } from "./ui/arena-flyout"; import { EaseType } from "#enums/ease-type"; @@ -65,7 +65,7 @@ import { Species } from "#enums/species"; import { UiTheme } from "#enums/ui-theme"; import { TimedEventManager } from "#app/timed-event-manager.js"; import i18next from "i18next"; -import {TrainerType} from "#enums/trainer-type"; +import { TrainerType } from "#enums/trainer-type"; import { battleSpecDialogue } from "./data/dialogue"; import { LoadingScene } from "./loading-scene"; import { LevelCapPhase } from "./phases/level-cap-phase"; @@ -2672,7 +2672,8 @@ export default class BattleScene extends SceneBase { wave: this.currentBattle?.waveIndex || 0, party: this.party ? this.party.map(p => { return { name: p.name, level: p.level }; - }) : [] + }) : [], + modeChain: this.ui?.getModeChain() ?? [], }; (window as any).gameInfo = gameInfo; } diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index beb059db490..80ec5c93bbd 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -8,7 +8,7 @@ import { OptionSelectConfig, OptionSelectItem } from "./abstact-option-select-ui import { Tutorial, handleTutorial } from "../tutorial"; import { loggedInUser, updateUserInfo } from "../account"; import i18next from "i18next"; -import {Button} from "#enums/buttons"; +import { Button } from "#enums/buttons"; import { GameDataType } from "#enums/game-data-type"; import BgmBar from "#app/ui/bgm-bar"; @@ -97,7 +97,6 @@ export default class MenuUiHandler extends MessageUiHandler { render() { const ui = this.getUi(); - console.log(ui.getModeChain()); this.excludedMenus = () => [ { condition: ![Mode.COMMAND, Mode.TITLE].includes(ui.getModeChain()[0]), options: [ MenuOptions.EGG_GACHA, MenuOptions.EGG_LIST] }, { condition: bypassLogin, options: [ MenuOptions.LOG_OUT ] } diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 281c84a4748..7352c9f8704 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -1,4 +1,4 @@ -import {default as BattleScene} from "../battle-scene"; +import { default as BattleScene } from "../battle-scene"; import UiHandler from "./ui-handler"; import BattleMessageUiHandler from "./battle-message-ui-handler"; import CommandUiHandler from "./command-ui-handler"; @@ -36,8 +36,8 @@ import SavingIconHandler from "./saving-icon-handler"; import UnavailableModalUiHandler from "./unavailable-modal-ui-handler"; import OutdatedModalUiHandler from "./outdated-modal-ui-handler"; import SessionReloadModalUiHandler from "./session-reload-modal-ui-handler"; -import {Button} from "#enums/buttons"; -import i18next, {ParseKeys} from "i18next"; +import { Button } from "#enums/buttons"; +import i18next, { ParseKeys } from "i18next"; import GamepadBindingUiHandler from "./settings/gamepad-binding-ui-handler"; import SettingsKeyboardUiHandler from "#app/ui/settings/settings-keyboard-ui-handler"; import KeyboardBindingUiHandler from "#app/ui/settings/keyboard-binding-ui-handler"; @@ -456,6 +456,7 @@ export default class UI extends Phaser.GameObjects.Container { } if (chainMode && this.mode && !clear) { this.modeChain.push(this.mode); + (this.scene as BattleScene).updateGameInfo(); } this.mode = mode; const touchControls = document?.getElementById("touchControls"); @@ -503,6 +504,7 @@ export default class UI extends Phaser.GameObjects.Container { resetModeChain(): void { this.modeChain = []; + (this.scene as BattleScene).updateGameInfo(); } revertMode(): Promise { @@ -516,6 +518,7 @@ export default class UI extends Phaser.GameObjects.Container { const doRevertMode = () => { this.getHandler().clear(); this.mode = this.modeChain.pop()!; // TODO: is this bang correct? + (this.scene as BattleScene).updateGameInfo(); const touchControls = document.getElementById("touchControls"); if (touchControls) { touchControls.dataset.uiMode = Mode[this.mode];