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[] = [ export const allpanels: string[] = [
"abyss", "abyss",
//"badlands", "badlands",
"beach", "beach",
//"cave", "cave",
//"construction_site", "construction_site",
//"desert", //"desert",
//"dojo", //"dojo",
"end", "end",
@ -180,7 +180,7 @@ export class LoadingScene extends SceneBase {
// this.loadImage(`volcano_panel`, "ui/windows"); // this.loadImage(`volcano_panel`, "ui/windows");
// this.loadImage(`wasteland_panel`, "ui/windows"); // this.loadImage(`wasteland_panel`, "ui/windows");
for (var i = 0; i < allpanels.length; i++) { 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.loadAtlas("namebox", "ui");
this.loadImage("pbinfo_player", "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}`)); 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) { loadSpritesheet(key: string, folder: string, size: integer, filename?: string) {
if (!filename) { if (!filename) {