Add option to not show level up stats
This commit is contained in:
1 parent
7e5615c1bb
commit
4f91c47168
4 files changed
+20
-8
No files matched your search
@@ -4,7 +4,8 @@ export enum Setting {
|
||||
Game_Speed = "GAME_SPEED",
|
||||
Master_Volume = "MASTER_VOLUME",
|
||||
BGM_Volume = "BGM_VOLUME",
|
||||
SE_Volume = "SE_VOLUME"
|
||||
SE_Volume = "SE_VOLUME",
|
||||
Show_Stats_on_Level_Up = "SHOW_LEVEL_UP_STATS"
|
||||
}
|
||||
|
||||
export interface SettingOptions {
|
||||
@@ -19,14 +20,16 @@ export const settingOptions: SettingOptions = {
|
||||
[Setting.Game_Speed]: [ '1x', '1.25x', '1.5x', '2x', '2.5x', '3x', '4x', '5x' ],
|
||||
[Setting.Master_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||
[Setting.BGM_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||
[Setting.SE_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute')
|
||||
[Setting.SE_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||
[Setting.Show_Stats_on_Level_Up]: [ 'Off', 'On' ]
|
||||
};
|
||||
|
||||
export const settingDefaults: SettingDefaults = {
|
||||
[Setting.Game_Speed]: 0,
|
||||
[Setting.Master_Volume]: 5,
|
||||
[Setting.BGM_Volume]: 10,
|
||||
[Setting.SE_Volume]: 10
|
||||
[Setting.SE_Volume]: 10,
|
||||
[Setting.Show_Stats_on_Level_Up]: 1
|
||||
};
|
||||
|
||||
export function setSetting(scene: BattleScene, setting: Setting, value: integer): boolean {
|
||||
@@ -46,6 +49,9 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||
scene.seVolume = value ? parseInt(settingOptions[setting][value]) * 0.01 : 0;
|
||||
scene.updateSoundVolume();
|
||||
break;
|
||||
case Setting.Show_Stats_on_Level_Up:
|
||||
scene.showLevelUpStats = settingOptions[setting][value] === 'On';
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user