Removes useless '/' make it doubles in somes cases (#1482)

This commit is contained in:
Dakurei 2024-05-28 16:08:53 +02:00 committed by GitHub
parent 5512be8f31
commit bf06ce6340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,11 +47,11 @@ export class SceneBase extends Phaser.Scene {
if (folder) { if (folder) {
folder += "/"; folder += "/";
} }
this.load.atlas(key, this.getCachedUrl(`images/${folder}${filenameRoot}.png`), this.getCachedUrl(`images/${folder}/${filenameRoot}.json`)); this.load.atlas(key, this.getCachedUrl(`images/${folder}${filenameRoot}.png`), this.getCachedUrl(`images/${folder}${filenameRoot}.json`));
if (folder.startsWith("ui")) { if (folder.startsWith("ui")) {
legacyCompatibleImages.push(key); legacyCompatibleImages.push(key);
folder = folder.replace("ui", "ui/legacy"); folder = folder.replace("ui", "ui/legacy");
this.load.atlas(`${key}_legacy`, this.getCachedUrl(`images/${folder}${filenameRoot}.png`), this.getCachedUrl(`images/${folder}/${filenameRoot}.json`)); this.load.atlas(`${key}_legacy`, this.getCachedUrl(`images/${folder}${filenameRoot}.png`), this.getCachedUrl(`images/${folder}${filenameRoot}.json`));
} }
} }