Skip to content

Commit fc10dcf

Browse files
committed
e
1 parent 470ea81 commit fc10dcf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

source/archipelago/APGameState.hx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,18 @@ class APGameState
530530
if (info.missingLocations.length == 0 && info.checkedLocations.length == 0)
531531
{
532532
trace("AP is not ready yet - no locations checked or missing.");
533-
533+
archipelago.APItem.popup("AP ERROR: Location data doesn't exist for song: " + songName + " with mod: " + modName, "Archipelago", true);
534+
archipelago.substates.InfoPanelSubstate.show("AP ERROR", "Location data doesn't exist for song: " + songName + " with mod: " + modName
535+
+ ". This usually means the Archipelago server is not ready yet. Please wait a moment and try again.", 0xFF0000, null);
536+
return false;
534537
}
535538

536539
if (locations == null || locations.length == 0)
537540
{
538541
trace("No locations found for song: " + songName + " with mod: " + modName);
542+
archipelago.APItem.popup("No locations found for song: " + songName + " with mod: " + modName, "Archipelago", true);
543+
archipelago.substates.InfoPanelSubstate.show("Victory Song Missing", "No locations found for song: " + songName + " with mod: " + modName
544+
+ ".\n\nMake sure that the song is added to your game, or the mod for this song is enabled.", 0xFF0000, null);
539545
return false;
540546
}
541547
for (location in locations)

source/archipelago/substates/InfoPanelSubstate.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ class InfoPanelSubstate extends MusicBeatSubstate {
7171
animateIn();
7272
}
7373

74+
public static function show(title:String, content:String, ?themeColor:FlxColor, ?onClose:Void->Void) {
75+
FlxG.state.openSubState(new InfoPanelSubstate(title, content, themeColor, onClose));
76+
}
77+
7478
function calculateOptimalSize(title:String, content:String):Void {
7579
// Create temporary text objects to measure content
7680
var tempTitle = new FlxText(0, 0, 0, title, 24);

0 commit comments

Comments
 (0)