mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 13:11:42 +00:00
js load custom levels in replays
This commit is contained in:
parent
a8f36317c5
commit
4c0ea4afb2
1 changed files with 11 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ import src.ResourceLoader;
|
||||||
import src.Settings;
|
import src.Settings;
|
||||||
import src.Util;
|
import src.Util;
|
||||||
import src.Replay;
|
import src.Replay;
|
||||||
|
import src.Marbleland;
|
||||||
|
|
||||||
class MainMenuGui extends GuiImage {
|
class MainMenuGui extends GuiImage {
|
||||||
public function new() {
|
public function new() {
|
||||||
|
|
@ -114,11 +115,17 @@ class MainMenuGui extends GuiImage {
|
||||||
#end
|
#end
|
||||||
if (MissionList.missions == null)
|
if (MissionList.missions == null)
|
||||||
MissionList.buildMissionList();
|
MissionList.buildMissionList();
|
||||||
var playMis = MissionList.missions.get(repmis);
|
var mi = replay.customId == 0 ? MissionList.missions.get(repmis) : Marbleland.missions.get(replay.customId);
|
||||||
if (playMis != null) {
|
if (mi.isClaMission) {
|
||||||
cast(this.parent, Canvas).marbleGame.watchMissionReplay(playMis, replay);
|
mi.download(() -> {
|
||||||
|
MarbleGame.instance.watchMissionReplay(mi, replay);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
cast(this.parent, Canvas).pushDialog(new MessageBoxOkDlg("Cannot load replay."));
|
if (mi != null) {
|
||||||
|
cast(this.parent, Canvas).marbleGame.watchMissionReplay(mi, replay);
|
||||||
|
} else {
|
||||||
|
cast(this.parent, Canvas).pushDialog(new MessageBoxOkDlg("Cannot load replay."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue