Add settings

Lazy Reloads: Flags every page refresh as a required reload, even if nothing changed
This commit is contained in:
RedstonewolfX 2024-07-12 17:09:32 -04:00
parent c39ecd7181
commit c1873cdb56
2 changed files with 34 additions and 17 deletions

View File

@ -121,6 +121,7 @@ export default class BattleScene extends SceneBase {
public enableMoveInfo: boolean = true;
public enableRetries: boolean = false;
public damageDisplay: string = "Off";
public lazyReloads: boolean = false;
/**
* Determines the condition for a notification should be shown for Candy Upgrades
* - 0 = 'Off'

View File

@ -99,7 +99,8 @@ export const SettingKeys = {
SE_Volume: "SE_VOLUME",
Music_Preference: "MUSIC_PREFERENCE",
Show_BGM_Bar: "SHOW_BGM_BAR",
Damage_Display: "DAMAGE_DISPLAY"
Damage_Display: "DAMAGE_DISPLAY",
LazyReloads: "FLAG_EVERY_RESET_AS_RELOAD"
};
/**
@ -146,6 +147,35 @@ export const Setting: Array<Setting> = [
default: 3,
type: SettingType.GENERAL
},
{
key: SettingKeys.Damage_Display,
label: "Damage Display",
options: [{
label: "Off",
value: "Off"
}, {
label: "Value",
value: "Value"
}, {
label: "Percent",
value: "Percent"
}],
default: 0,
type: SettingType.GENERAL,
},
{
key: SettingKeys.LazyReloads,
label: "Lazy Reloads",
options: [{
label: "Off",
value: "Off"
}, {
label: "On",
value: "On"
}],
default: 0,
type: SettingType.GENERAL,
},
{
key: SettingKeys.HP_Bar_Speed,
label: i18next.t("settings:hpBarSpeed"),
@ -244,22 +274,6 @@ export const Setting: Array<Setting> = [
default: 0,
type: SettingType.GENERAL
},
{
key: SettingKeys.Damage_Display,
label: "Damage Display",
options: [{
label: "Off",
value: "Off"
}, {
label: "Value",
value: "Value"
}, {
label: "Percent",
value: "Percent"
}],
default: 0,
type: SettingType.GENERAL,
},
{
key: SettingKeys.Tutorials,
label: i18next.t("settings:tutorials"),
@ -624,6 +638,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
break;
case SettingKeys.Damage_Display:
scene.damageDisplay = Setting[index].options[value].value
case SettingKeys.LazyReloads:
scene.lazyReloads = Setting[index].options[value].value == "On"
case SettingKeys.Skip_Seen_Dialogues:
scene.skipSeenDialogues = Setting[index].options[value].value === "On";
break;