[QoL] Settings Option: Shop Cursor Target (#3666)
* [QoL] Post Reroll UI Targeting
* removed hasRolled from battlescene and handled in UI
* Added getter for reroll count and ternary
* Explicit catch instead of falsy
* Fixed Settings errors with proper labeling
* changed setting label to translate as well
* translations and fixes
* move option further down
* change integer to number
* change integer to number
* update implementation
* remove unused method
* change name set to update
* Update src/ui/modifier-select-ui-handler.ts
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Update src/system/settings/settings.ts
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Update src/locales/fr/settings.ts
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
* Update src/locales/pt_BR/settings.ts
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
* Update src/locales/ko/settings.ts
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
* Update src/locales/zh_CN/settings.ts
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
* Update src/locales/it/settings.ts
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Revert "Update src/locales/ko/settings.ts"
This reverts commit 08c0b89f4caf7c33f49722200d7aeb20b79b0ba5.
* Update src/locales/ko/settings.ts
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
* Revert "Revert "Update src/locales/ko/settings.ts""
This reverts commit a57d8777f2
.
---------
Co-authored-by: Matthew Kroeger <mattk932009@gmail.com>
Co-authored-by: flx-sta <50131232+flx-sta@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: sodam <66295123+sodaMelon@users.noreply.github.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
This commit is contained in:
parent
a7acf752db
commit
03ee764e23
|
@ -83,6 +83,7 @@ import { SwitchPhase } from "./phases/switch-phase";
|
|||
import { TitlePhase } from "./phases/title-phase";
|
||||
import { ToggleDoublePositionPhase } from "./phases/toggle-double-position-phase";
|
||||
import { TurnInitPhase } from "./phases/turn-init-phase";
|
||||
import { ShopCursorTarget } from "./enums/shop-cursor-target";
|
||||
|
||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||
|
||||
|
@ -127,6 +128,7 @@ export default class BattleScene extends SceneBase {
|
|||
public gameSpeed: integer = 1;
|
||||
public damageNumbersMode: integer = 0;
|
||||
public reroll: boolean = false;
|
||||
public shopCursorTarget: number = ShopCursorTarget.CHECK_TEAM;
|
||||
public showMovesetFlyout: boolean = true;
|
||||
public showArenaFlyout: boolean = true;
|
||||
public showTimeOfDayWidget: boolean = true;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
* Determines the cursor target when entering the shop phase.
|
||||
*/
|
||||
export enum ShopCursorTarget {
|
||||
/** Cursor points to Reroll */
|
||||
REROLL,
|
||||
/** Cursor points to Items */
|
||||
ITEMS,
|
||||
/** Cursor points to Shop */
|
||||
SHOP,
|
||||
/** Cursor points to Check Team */
|
||||
CHECK_TEAM
|
||||
}
|
|
@ -96,5 +96,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"controller": "Controller",
|
||||
"gamepadSupport": "Gamepad Support",
|
||||
"showBgmBar": "Show Music Names",
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity"
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -99,4 +99,9 @@ export const settings: SimpleTranslationEntries = {
|
|||
"showBgmBar": "Musiknamen anzeigen",
|
||||
"moveTouchControls": "Bewegung Touch Steuerung",
|
||||
"shopOverlayOpacity": "Shop Overlay Deckkraft",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "Gamepad Support",
|
||||
"showBgmBar": "Show Music Names",
|
||||
"moveTouchControls": "Move Touch Controls",
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity"
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "Gamepad Support",
|
||||
"showBgmBar": "Show Music Names",
|
||||
"moveTouchControls": "Move Touch Controls",
|
||||
"shopOverlayOpacity": "Opacidad de la fase de compra"
|
||||
"shopOverlayOpacity": "Opacidad de la fase de compra",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "Gamepad Support",
|
||||
"showBgmBar": "Titre de la musique",
|
||||
"moveTouchControls": "Déplacer les contrôles tactiles",
|
||||
"shopOverlayOpacity": "Opacité boutique"
|
||||
"shopOverlayOpacity": "Opacité boutique",
|
||||
"shopCursorTarget": "Choix après relance",
|
||||
"items": "Obj. gratuits",
|
||||
"reroll": "Relance",
|
||||
"shop": "Boutique",
|
||||
"checkTeam": "Équipe"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "Supporto Gamepad",
|
||||
"showBgmBar": "Mostra Nomi Musica",
|
||||
"moveTouchControls": "Move Touch Controls",
|
||||
"shopOverlayOpacity": "Opacità Finestra Negozio"
|
||||
"shopOverlayOpacity": "Opacità Finestra Negozio",
|
||||
"shopCursorTarget": "Target Cursore Negozio",
|
||||
"items": "Oggetti",
|
||||
"reroll": "Rerolla",
|
||||
"shop": "Negozio",
|
||||
"checkTeam": "Squadra"
|
||||
} as const;
|
||||
|
|
|
@ -98,4 +98,9 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "コントローラーサポート",
|
||||
"showBgmBar": "Show Music Names",
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "게임패드 지원",
|
||||
"showBgmBar": "BGM 제목 보여주기",
|
||||
"moveTouchControls": "터치 컨트롤 이동",
|
||||
"shopOverlayOpacity": "상점 오버레이 투명도"
|
||||
"shopOverlayOpacity": "상점 오버레이 투명도",
|
||||
"shopCursorTarget": "상점 커서 위치",
|
||||
"items": "아이템",
|
||||
"reroll": "갱신",
|
||||
"shop": "상점",
|
||||
"checkTeam": "파티 확인"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "Suporte para Controle",
|
||||
"showBgmBar": "Exibir Nomes das Músicas",
|
||||
"moveTouchControls": "Move Touch Controls",
|
||||
"shopOverlayOpacity": "Opacidade da Loja"
|
||||
"shopOverlayOpacity": "Opacidade da Loja",
|
||||
"shopCursorTarget": "Alvo do Cursor da Loja",
|
||||
"items": "Itens",
|
||||
"reroll": "Atualizar",
|
||||
"shop": "Loja",
|
||||
"checkTeam": "Checar Time"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "手柄支持",
|
||||
"showBgmBar": "显示音乐名称",
|
||||
"moveTouchControls": "移动触摸控制",
|
||||
"shopOverlayOpacity": "商店显示不透明度"
|
||||
"shopOverlayOpacity": "商店显示不透明度",
|
||||
"shopCursorTarget": "商店指针位置",
|
||||
"items": "道具",
|
||||
"reroll": "刷新",
|
||||
"shop": "购买",
|
||||
"checkTeam": "检查队伍"
|
||||
} as const;
|
||||
|
|
|
@ -98,5 +98,10 @@ export const settings: SimpleTranslationEntries = {
|
|||
"gamepadSupport": "手柄支持",
|
||||
"showBgmBar": "Show Music Names",
|
||||
"moveTouchControls": "移動觸控控制",
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity"
|
||||
"shopOverlayOpacity": "Shop Overlay Opacity",
|
||||
"shopCursorTarget": "Shop Cursor Target",
|
||||
"items": "Items",
|
||||
"reroll": "Reroll",
|
||||
"shop": "Shop",
|
||||
"checkTeam": "Check Team"
|
||||
} as const;
|
||||
|
|
|
@ -205,7 +205,7 @@ export class SelectModifierPhase extends BattlePhase {
|
|||
return true;
|
||||
}
|
||||
|
||||
getRerollCost(typeOptions: ModifierTypeOption[], lockRarities: boolean): integer {
|
||||
getRerollCost(typeOptions: ModifierTypeOption[], lockRarities: boolean): number {
|
||||
let baseValue = 0;
|
||||
if (Overrides.WAIVE_ROLL_FEE_OVERRIDE) {
|
||||
return baseValue;
|
||||
|
|
|
@ -9,6 +9,7 @@ import { EaseType } from "#enums/ease-type";
|
|||
import { MoneyFormat } from "#enums/money-format";
|
||||
import { PlayerGender } from "#enums/player-gender";
|
||||
import { getIsInitialized, initI18n } from "#app/plugins/i18n.js";
|
||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||
|
||||
function getTranslation(key: string): string {
|
||||
if (!getIsInitialized()) {
|
||||
|
@ -102,6 +103,7 @@ export const SettingKeys = {
|
|||
Damage_Numbers: "DAMAGE_NUMBERS",
|
||||
Move_Animations: "MOVE_ANIMATIONS",
|
||||
Show_Stats_on_Level_Up: "SHOW_LEVEL_UP_STATS",
|
||||
Reroll_Target: "REROLL_TARGET",
|
||||
Candy_Upgrade_Notification: "CANDY_UPGRADE_NOTIFICATION",
|
||||
Candy_Upgrade_Display: "CANDY_UPGRADE_DISPLAY",
|
||||
Move_Info: "MOVE_INFO",
|
||||
|
@ -577,6 +579,30 @@ export const Setting: Array<Setting> = [
|
|||
activatable: true,
|
||||
isHidden: () => !hasTouchscreen()
|
||||
},
|
||||
{
|
||||
key: SettingKeys.Reroll_Target,
|
||||
label: i18next.t("settings:shopCursorTarget"),
|
||||
options: [
|
||||
{
|
||||
value:"Reroll",
|
||||
label: i18next.t("settings:reroll")
|
||||
},
|
||||
{
|
||||
value:"Items",
|
||||
label: i18next.t("settings:items")
|
||||
},
|
||||
{
|
||||
value:"Shop",
|
||||
label: i18next.t("settings:shop")
|
||||
},
|
||||
{
|
||||
value:"Check Team",
|
||||
label: i18next.t("settings:checkTeam")
|
||||
}
|
||||
],
|
||||
default: ShopCursorTarget.CHECK_TEAM,
|
||||
type: SettingType.DISPLAY
|
||||
},
|
||||
{
|
||||
key: SettingKeys.Shop_Overlay_Opacity,
|
||||
label: i18next.t("settings:shopOverlayOpacity"),
|
||||
|
@ -709,6 +735,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
|
|||
case SettingKeys.Show_Stats_on_Level_Up:
|
||||
scene.showLevelUpStats = Setting[index].options[value].value === "On";
|
||||
break;
|
||||
case SettingKeys.Reroll_Target:
|
||||
scene.shopCursorTarget = value;
|
||||
case SettingKeys.EXP_Gains_Speed:
|
||||
scene.expGainsSpeed = value;
|
||||
break;
|
||||
|
|
|
@ -12,6 +12,7 @@ import { allMoves } from "../data/move";
|
|||
import * as Utils from "./../utils";
|
||||
import Overrides from "#app/overrides";
|
||||
import i18next from "i18next";
|
||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||
|
||||
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
||||
|
||||
|
@ -249,11 +250,22 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||
duration: 250
|
||||
});
|
||||
|
||||
this.setCursor(0);
|
||||
this.setRowCursor(1);
|
||||
const updateCursorTarget = () => {
|
||||
if (this.scene.shopCursorTarget === ShopCursorTarget.CHECK_TEAM) {
|
||||
this.setRowCursor(0);
|
||||
this.setCursor(2);
|
||||
} else {
|
||||
this.setRowCursor(this.scene.shopCursorTarget);
|
||||
this.setCursor(0);
|
||||
}
|
||||
};
|
||||
|
||||
handleTutorial(this.scene, Tutorial.Select_Item).then(() => {
|
||||
this.setCursor(0);
|
||||
updateCursorTarget();
|
||||
|
||||
handleTutorial(this.scene, Tutorial.Select_Item).then((res) => {
|
||||
if (res) {
|
||||
updateCursorTarget();
|
||||
}
|
||||
this.awaitingActionInput = true;
|
||||
this.onActionInput = args[2];
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue