Biome Panels

Added Cave, Badlands, and Construction Site
Biome panels no longer create error message spam from not loading nonexistent legacy assets
This commit is contained in:
RedstonewolfX 2024-07-14 20:10:27 -04:00
parent 06e7e24aa7
commit 7246da5941
5 changed files with 11 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -78,10 +78,10 @@ export const biomePanelIDs: string[] = [
]
export const allpanels: string[] = [
"abyss",
//"badlands",
"badlands",
"beach",
//"cave",
//"construction_site",
"cave",
"construction_site",
//"desert",
//"dojo",
"end",
@ -145,7 +145,7 @@ export class LoadingScene extends SceneBase {
}
}
//this.loadImage(`abyss_panel`, "ui/windows");
//this.loadImage(`badlands_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");
@ -180,7 +180,7 @@ export class LoadingScene extends SceneBase {
// 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.loadImageNoLegacy(`${allpanels[i]}_panel`, "ui/windows");
}
this.loadAtlas("namebox", "ui");
this.loadImage("pbinfo_player", "ui");

View File

@ -40,6 +40,12 @@ export class SceneBase extends Phaser.Scene {
this.load.image(`${key}_legacy`, this.getCachedUrl(`images/${folder}/${filename}`));
}
}
loadImageNoLegacy(key: string, folder: string, filename?: string) {
if (!filename) {
filename = `${key}.png`;
}
this.load.image(key, this.getCachedUrl(`images/${folder}/${filename}`));
}
loadSpritesheet(key: string, folder: string, size: integer, filename?: string) {
if (!filename) {