Skip to content

Commit

Permalink
Merge branch 'new-menus' into archipelago
Browse files Browse the repository at this point in the history
# Conflicts:
#	APRandomizerMain.cs
#	MessengerRando.csproj
#	Utils/SeedGenerator.cs
#	courier.toml
  • Loading branch information
alwaysintreble committed Feb 16, 2024
2 parents e94f3f4 + c99d7c6 commit bbf3b5a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions APRandomizerMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ void BuildArchipelagoMenu()
() => "Enter the port for the Archipelago session",
() => ArchipelagoClient.ServerData?.Port.ToString(),
CharsetFlags.Number);
ArchipelagoMenu.ArchipelagoPortButton.IsEnabled =
() => ArchipelagoClient.HasConnected && !ArchipelagoClient.Authenticated && !ArchipelagoClient.offline &&
Manager<LevelManager>.Instance.GetCurrentLevelEnum() != ELevel.NONE;
ArchipelagoMenu.ArchipelagoPortButton.IsEnabled = ArchipelagoPortEnabled;

//Add archipelago name button
ArchipelagoMenu.ArchipelagoNameButton = ArchipelagoMenu.RegisterTextRandoButton(
Expand Down Expand Up @@ -933,6 +931,16 @@ bool OnSelectArchipelagoPort(string answer)
return true;
}

bool ArchipelagoPortEnabled()
{
if (Manager<LevelManager>.Instance.GetCurrentLevelEnum().Equals(ELevel.NONE))
{
return !ArchipelagoClient.HasConnected;
}

return ArchipelagoClient.HasConnected && !ArchipelagoClient.Authenticated && !ArchipelagoClient.offline;
}

bool OnSelectArchipelagoName(string answer)
{
if (answer == null) return true;
Expand Down
2 changes: 1 addition & 1 deletion MessengerRando.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<Version>0.13.0</Version>
<Version>0.13.1</Version>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
2 changes: 1 addition & 1 deletion Utils/SeedGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static void OnGenerated(bool result, SubMenuButtonInfo generateButton)
null,
TextEntryButtonInfo.CharsetFlags.Space);

generatePopup.Init(result ? "Seed successfully generated!" : "Seed generation failed.");
generatePopup.Init(result ? "Seed successfully generated!" : "Seed generation failed. Ensure you've output a settings file.");
generatePopup.gameObject.SetActive(true);
generating = false;
}
Expand Down
2 changes: 1 addition & 1 deletion courier.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "TheMessengerRandomizerAP"
version = "0.13.0"
version = "0.13.1"
dependencies = [
{ name = "Courier", version = "0.7.0" }
]

0 comments on commit bbf3b5a

Please sign in to comment.