Biome Panels

shh dont tell scarlet
This commit is contained in:
RedstonewolfX 2024-07-13 23:46:57 -04:00
parent 98dd5ea09b
commit 84fc8c9443
9 changed files with 61 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -23,7 +23,7 @@ import { initVouchers } from "./system/voucher";
import { Biome } from "#enums/biome";
import { TrainerType } from "#enums/trainer-type";
const biomePanelIDs: string[] = [
export const biomePanelIDs: string[] = [
"town",
"plains",
"grass",
@ -76,6 +76,43 @@ const biomePanelIDs: string[] = [
"",
"end"
]
export const allpanels: string[] = [
"abyss",
//"badlands",
"beach",
//"cave",
//"construction_site",
//"desert",
//"dojo",
"end",
//"factory",
//"fairy_cave",
//"forest",
//"grass",
//"graveyard",
//"ice_cave",
//"island",
//"jungle",
//"laboratory",
//"lake",
//"meadow",
//"metropolis",
//"mountain",
//"plains",
//"power_plant",
//"ruins",
"sea",
//"seabed",
"slum",
//"snowy_forest",
"space",
//"swamp",
//"tall_grass",
//"temple",
"town",
"volcano",
"wasteland"
]
export class LoadingScene extends SceneBase {
readonly LOAD_EVENTS = Phaser.Loader.Events;
@ -142,6 +179,9 @@ export class LoadingScene extends SceneBase {
//this.loadImage(`town_panel`, "ui/windows");
// this.loadImage(`volcano_panel`, "ui/windows");
// this.loadImage(`wasteland_panel`, "ui/windows");
for (var i = 0; i < allpanels.length; i++) {
this.loadImage(`${allpanels[i]}_panel`, "ui/windows");
}
this.loadAtlas("namebox", "ui");
this.loadImage("pbinfo_player", "ui");
this.loadImage("pbinfo_player_stats", "ui");

View File

@ -12,6 +12,7 @@ import { Mode } from "./ui";
import { addWindow } from "./ui-theme";
import * as LoggerTools from "../logger"
import { loggedInUser } from "#app/account.js";
import { allpanels, biomePanelIDs } from "../loading-scene"
const sessionSlotCount = 5;
@ -308,14 +309,13 @@ class SessionSlot extends Phaser.GameObjects.Container {
const slotWindow = addWindow(this.scene, 0, 0, 304, 52);
this.add(slotWindow);
if (this.slotId == 0) {
//this.backer = this.scene.add.image(0, 0, `sea_panel`)
//this.backer.setOrigin(0.5, 0.5)
//this.backer.setScale(304/909, 52/155)
//this.backer.setPosition(102*1.5 - 1, 26)
//this.backer.setSize(304, 52)
//this.add(this.backer)
}
this.backer = this.scene.add.image(0, 0, `end_panel`)
this.backer.setOrigin(0.5, 0.5)
this.backer.setScale(304/909, 52/155)
this.backer.setPosition(102*1.5 - 1, 26)
this.backer.setSize(304, 52)
this.backer.setVisible(false)
this.add(this.backer)
this.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW);
this.loadingLabel.setOrigin(0.5, 0.5);
@ -339,6 +339,13 @@ class SessionSlot extends Phaser.GameObjects.Container {
const playTimeLabel = addTextObject(this.scene, 8, 33, Utils.getPlayTimeString(data.playTime), TextStyle.WINDOW);
this.add(playTimeLabel);
console.log(biomePanelIDs[data.arena.biome])
if (allpanels.includes(biomePanelIDs[data.arena.biome])) {
this.backer.setTexture(`${biomePanelIDs[data.arena.biome]}_panel`)
this.backer.setVisible(true)
}
const pokemonIconsContainer = this.scene.add.container(144, 4);
data.party.forEach((p: PokemonData, i: integer) => {
const iconContainer = this.scene.add.container(26 * i, 0);