Push all updates

This commit is contained in:
RedstonewolfX 2024-07-13 17:58:21 -04:00
parent 324c92024b
commit 2cf8a75609
3 changed files with 109 additions and 4 deletions

View File

@ -23,6 +23,60 @@ import { initVouchers } from "./system/voucher";
import { Biome } from "#enums/biome";
import { TrainerType } from "#enums/trainer-type";
const biomePanelIDs: string[] = [
"town",
"plains",
"grass",
"tall_grass",
"metropolis",
"forest",
"sea",
"swamp",
"beach",
"lake",
"seabed",
"mountain",
"badlands",
"cave",
"desert",
"ice_cave",
"meadow",
"power_plant",
"volcano",
"graveyard",
"dojo",
"factory",
"ruins",
"wasteland",
"abyss",
"space",
"construction_site",
"jungle",
"fairy_cave",
"temple",
"slum",
"snowy_forest",
"",
"",
"",
"",
"",
"",
"",
"",
"island",
"laboratory",
"",
"",
"",
"",
"",
"",
"",
"",
"end"
]
export class LoadingScene extends SceneBase {
readonly LOAD_EVENTS = Phaser.Loader.Events;
@ -53,6 +107,41 @@ export class LoadingScene extends SceneBase {
this.loadImage(`window_${w}${getWindowVariantSuffix(wv)}`, "ui/windows");
}
}
//this.loadImage(`abyss_panel`, "ui/windows");
//this.loadImage(`badlands_panel`, "ui/windows");
//this.loadImage(`beach_panel`, "ui/windows");
//this.loadImage(`cave_panel`, "ui/windows");
//this.loadImage(`construction_site_panel`, "ui/windows");
//this.loadImage(`desert_panel`, "ui/windows");
//this.loadImage(`dojo_panel`, "ui/windows");
//this.loadImage(`end_panel`, "ui/windows");
//this.loadImage(`factory_panel`, "ui/windows");
//this.loadImage(`fairy_cave_panel`, "ui/windows");
//this.loadImage(`forest_panel`, "ui/windows");
//this.loadImage(`grass_panel`, "ui/windows");
//this.loadImage(`graveyard_panel`, "ui/windows");
//this.loadImage(`ice_cave_panel`, "ui/windows");
//this.loadImage(`island_panel`, "ui/windows");
//this.loadImage(`jungle_panel`, "ui/windows");
//this.loadImage(`laboratory_panel`, "ui/windows");
//this.loadImage(`lake_panel`, "ui/windows");
//this.loadImage(`meadow_panel`, "ui/windows");
//this.loadImage(`metropolis_panel`, "ui/windows");
//this.loadImage(`mountain_panel`, "ui/windows");
//this.loadImage(`plains_panel`, "ui/windows");
//this.loadImage(`power_plant_panel`, "ui/windows");
//this.loadImage(`ruins_panel`, "ui/windows");
//this.loadImage(`sea_panel`, "ui/windows");
//this.loadImage(`seabed_panel`, "ui/windows");
//this.loadImage(`slum_panel`, "ui/windows");
//this.loadImage(`snowy_forest_panel`, "ui/windows");
//this.loadImage(`space_panel`, "ui/windows");
//this.loadImage(`swamp_panel`, "ui/windows");
//this.loadImage(`tall_grass_panel`, "ui/windows");
//this.loadImage(`temple_panel`, "ui/windows");
//this.loadImage(`town_panel`, "ui/windows");
//this.loadImage(`volcano_panel`, "ui/windows");
//this.loadImage(`wasteland_panel`, "ui/windows");
this.loadAtlas("namebox", "ui");
this.loadImage("pbinfo_player", "ui");
this.loadImage("pbinfo_player_stats", "ui");

View File

@ -341,13 +341,19 @@ export class TitlePhase extends Phase {
this.loaded = false;
}
setBiomeByType(biome: Biome): void {
setBiomeByType(biome: Biome, override?: boolean): void {
if (!this.scene.menuChangesBiome && !override)
return;
this.scene.arenaBg.setTexture(`${getBiomeKey(biome)}_bg`);
}
setBiomeByName(biome: string): void {
setBiomeByName(biome: string, override?: boolean): void {
if (!this.scene.menuChangesBiome && !override)
return;
this.scene.arenaBg.setTexture(`${getBiomeKey(Utils.getEnumValues(Biome)[Utils.getEnumKeys(Biome).indexOf(biome)])}_bg`);
}
setBiomeByFile(sessionData: SessionSaveData): void {
setBiomeByFile(sessionData: SessionSaveData, override?: boolean): void {
if (!this.scene.menuChangesBiome && !override)
return;
this.scene.arenaBg.setTexture(`${getBiomeKey(sessionData.arena.biome)}_bg`);
}
@ -365,7 +371,7 @@ export class TitlePhase extends Phase {
this.scene.gameData.getSession(loggedInUser.lastSessionSlot).then(sessionData => {
if (sessionData) {
this.lastSessionData = sessionData;
//this.setBiomeByFile(sessionData)
this.setBiomeByFile(sessionData, true)
this.setBiomeByType(Biome.END)
}
this.showOptions();

View File

@ -293,6 +293,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
public hasData: boolean;
public wv: integer;
private loadingLabel: Phaser.GameObjects.Text;
public backer: Phaser.GameObjects.Image
constructor(scene: BattleScene, slotId: integer, ypos: integer, autoSlot?: integer) {
super(scene, 0, ypos * 56);
@ -307,6 +308,15 @@ 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.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW);
this.loadingLabel.setOrigin(0.5, 0.5);
this.add(this.loadingLabel);