mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix MBG CLA textures
This commit is contained in:
parent
ce1bcf9c2c
commit
9b342f4a23
2 changed files with 4 additions and 2 deletions
|
|
@ -235,7 +235,7 @@ class Mission {
|
||||||
if (this.isClaMission) {
|
if (this.isClaMission) {
|
||||||
Marbleland.download(this.id, (zipEntries) -> {
|
Marbleland.download(this.id, (zipEntries) -> {
|
||||||
if (zipEntries != null) {
|
if (zipEntries != null) {
|
||||||
ResourceLoader.loadZip(zipEntries);
|
ResourceLoader.loadZip(zipEntries, game);
|
||||||
onFinish();
|
onFinish();
|
||||||
} else {
|
} else {
|
||||||
MarbleGame.canvas.pushDialog(new MessageBoxOkDlg("Failed to download mission"));
|
MarbleGame.canvas.pushDialog(new MessageBoxOkDlg("Failed to download mission"));
|
||||||
|
|
|
||||||
|
|
@ -457,13 +457,15 @@ class ResourceLoader {
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function loadZip(entries:Array<haxe.zip.Entry>) {
|
public static function loadZip(entries:Array<haxe.zip.Entry>, game:String) {
|
||||||
zipFilesystem.clear(); // We are only allowed to load one zip
|
zipFilesystem.clear(); // We are only allowed to load one zip
|
||||||
for (entry in entries) {
|
for (entry in entries) {
|
||||||
var fname = entry.fileName.toLowerCase();
|
var fname = entry.fileName.toLowerCase();
|
||||||
#if sys
|
#if sys
|
||||||
fname = "data/" + fname;
|
fname = "data/" + fname;
|
||||||
#end
|
#end
|
||||||
|
if (game == 'gold')
|
||||||
|
fname = StringTools.replace(fname, 'interiors/', 'interiors_mbg/');
|
||||||
if (exists(fname))
|
if (exists(fname))
|
||||||
continue;
|
continue;
|
||||||
Console.log("Loaded zip entry: " + fname);
|
Console.log("Loaded zip entry: " + fname);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue