mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-27 09:49:30 +02:00
Biome Panels setting
Adds an option to enable biome panels Displays the biome that a save is in
This commit is contained in:
parent
7246da5941
commit
6a089da8f0
@ -124,6 +124,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
public lazyReloads: boolean = false;
|
public lazyReloads: boolean = false;
|
||||||
public menuChangesBiome: boolean = false;
|
public menuChangesBiome: boolean = false;
|
||||||
public showAutosaves: boolean = false;
|
public showAutosaves: boolean = false;
|
||||||
|
public doBiomePanels: boolean = false;
|
||||||
/**
|
/**
|
||||||
* Determines the condition for a notification should be shown for Candy Upgrades
|
* Determines the condition for a notification should be shown for Candy Upgrades
|
||||||
* - 0 = 'Off'
|
* - 0 = 'Off'
|
||||||
|
@ -102,7 +102,8 @@ export const SettingKeys = {
|
|||||||
Damage_Display: "DAMAGE_DISPLAY",
|
Damage_Display: "DAMAGE_DISPLAY",
|
||||||
LazyReloads: "FLAG_EVERY_RESET_AS_RELOAD",
|
LazyReloads: "FLAG_EVERY_RESET_AS_RELOAD",
|
||||||
FancyBiome: "FANCY_BIOMES",
|
FancyBiome: "FANCY_BIOMES",
|
||||||
ShowAutosaves: "SHOW_AUTOSAVES"
|
ShowAutosaves: "SHOW_AUTOSAVES",
|
||||||
|
BiomePanels: "BIOME_PANELS"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -544,6 +545,19 @@ export const Setting: Array<Setting> = [
|
|||||||
type: SettingType.DISPLAY,
|
type: SettingType.DISPLAY,
|
||||||
requireReload: true
|
requireReload: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: SettingKeys.BiomePanels,
|
||||||
|
label: "Biome Panels",
|
||||||
|
options: [{
|
||||||
|
label: "Off",
|
||||||
|
value: "Off"
|
||||||
|
}, {
|
||||||
|
label: "On",
|
||||||
|
value: "On"
|
||||||
|
}],
|
||||||
|
default: 0,
|
||||||
|
type: SettingType.DISPLAY,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: SettingKeys.ShowAutosaves,
|
key: SettingKeys.ShowAutosaves,
|
||||||
label: "Show Autosaves",
|
label: "Show Autosaves",
|
||||||
@ -672,6 +686,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer):
|
|||||||
scene.menuChangesBiome = Setting[index].options[value].value == "On"
|
scene.menuChangesBiome = Setting[index].options[value].value == "On"
|
||||||
case SettingKeys.ShowAutosaves:
|
case SettingKeys.ShowAutosaves:
|
||||||
scene.showAutosaves = Setting[index].options[value].value == "On"
|
scene.showAutosaves = Setting[index].options[value].value == "On"
|
||||||
|
case SettingKeys.BiomePanels:
|
||||||
|
scene.doBiomePanels = Setting[index].options[value].value == "On"
|
||||||
case SettingKeys.Skip_Seen_Dialogues:
|
case SettingKeys.Skip_Seen_Dialogues:
|
||||||
scene.skipSeenDialogues = Setting[index].options[value].value === "On";
|
scene.skipSeenDialogues = Setting[index].options[value].value === "On";
|
||||||
break;
|
break;
|
||||||
|
@ -13,6 +13,7 @@ import { addWindow } from "./ui-theme";
|
|||||||
import * as LoggerTools from "../logger"
|
import * as LoggerTools from "../logger"
|
||||||
import { loggedInUser } from "#app/account.js";
|
import { loggedInUser } from "#app/account.js";
|
||||||
import { allpanels, biomePanelIDs } from "../loading-scene"
|
import { allpanels, biomePanelIDs } from "../loading-scene"
|
||||||
|
import { getBiomeName } from "#app/data/biomes.js";
|
||||||
|
|
||||||
const sessionSlotCount = 5;
|
const sessionSlotCount = 5;
|
||||||
|
|
||||||
@ -309,13 +310,15 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
const slotWindow = addWindow(this.scene, 0, 0, 304, 52);
|
const slotWindow = addWindow(this.scene, 0, 0, 304, 52);
|
||||||
this.add(slotWindow);
|
this.add(slotWindow);
|
||||||
|
|
||||||
//this.backer = this.scene.add.image(0, 0, `end_panel`)
|
if (this.scene.doBiomePanels) {
|
||||||
//this.backer.setOrigin(0.5, 0.5)
|
this.backer = this.scene.add.image(0, 0, `end_panel`)
|
||||||
//this.backer.setScale(304/909, 52/155)
|
this.backer.setOrigin(0.5, 0.5)
|
||||||
//this.backer.setPosition(102*1.5 - 1, 26)
|
this.backer.setScale(304/909, 52/155)
|
||||||
//this.backer.setSize(304, 52)
|
this.backer.setPosition(102*1.5 - 1, 26)
|
||||||
//this.backer.setVisible(false)
|
this.backer.setSize(304, 52)
|
||||||
//this.add(this.backer)
|
this.backer.setVisible(false)
|
||||||
|
this.add(this.backer)
|
||||||
|
}
|
||||||
|
|
||||||
this.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW);
|
this.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW);
|
||||||
this.loadingLabel.setOrigin(0.5, 0.5);
|
this.loadingLabel.setOrigin(0.5, 0.5);
|
||||||
@ -336,14 +339,14 @@ class SessionSlot extends Phaser.GameObjects.Container {
|
|||||||
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);
|
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);
|
||||||
this.add(timestampLabel);
|
this.add(timestampLabel);
|
||||||
|
|
||||||
const playTimeLabel = addTextObject(this.scene, 8, 33, Utils.getPlayTimeString(data.playTime), TextStyle.WINDOW);
|
const playTimeLabel = addTextObject(this.scene, 8, 33, Utils.getPlayTimeString(data.playTime) + " " + (getBiomeName(data.arena.biome) == "Construction Site" ? "Construction" : getBiomeName(data.arena.biome)), TextStyle.WINDOW);
|
||||||
this.add(playTimeLabel);
|
this.add(playTimeLabel);
|
||||||
|
|
||||||
console.log(biomePanelIDs[data.arena.biome])
|
console.log(biomePanelIDs[data.arena.biome])
|
||||||
|
|
||||||
if (allpanels.includes(biomePanelIDs[data.arena.biome])) {
|
if (this.backer && allpanels.includes(biomePanelIDs[data.arena.biome]) && this.scene.doBiomePanels) {
|
||||||
//this.backer.setTexture(`${biomePanelIDs[data.arena.biome]}_panel`)
|
this.backer.setTexture(`${biomePanelIDs[data.arena.biome]}_panel`)
|
||||||
//this.backer.setVisible(true)
|
this.backer.setVisible(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const pokemonIconsContainer = this.scene.add.container(144, 4);
|
const pokemonIconsContainer = this.scene.add.container(144, 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user