Skip to content

Commit e88d08c

Browse files
Merge branch 'main' into tracker-speech-sprite-packs
2 parents 0d0d42a + 325afdd commit e88d08c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

src/TrackerCouncil.Smz3.SeedGenerator/Generation/GameHintService.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,15 @@ private LocationUsefulness CheckIfLocationsAreImportant(List<World> allWorlds, I
468468
{
469469
numCrystalsNeeded = world.Config.GanonsTowerCrystalCount;
470470
}
471-
var currentCrystalCount = world.RewardRegions.Count(d =>
471+
472+
var possibleCrystalRewards = world.RewardRegions.Where(d =>
472473
d.RewardType is RewardType.CrystalBlue or RewardType.CrystalRed && sphereLocations.Any(l =>
473-
l.World.Id == world.Id && l.Id == s_dungeonBossLocations[d.GetType()])) + (ignoredReward == null ? 0 : 1);
474-
if (currentCrystalCount < numCrystalsNeeded)
474+
l.World.Id == world.Id && l.Id == s_dungeonBossLocations[d.GetType()])).Select(x => x.Reward).ToList();
475+
if (ignoredReward != null && !possibleCrystalRewards.Contains(ignoredReward))
476+
{
477+
possibleCrystalRewards.Add(ignoredReward);
478+
}
479+
if (possibleCrystalRewards.Count < numCrystalsNeeded)
475480
{
476481
return LocationUsefulness.Mandatory;
477482
}

src/TrackerCouncil.Smz3.UI/Services/SharedCrossplatformService.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,17 @@ public void PlayRom(GeneratedRom? rom)
130130
return;
131131
}
132132

133-
romLauncherService.LaunchRom(rom);
133+
try
134+
{
135+
romLauncherService.LaunchRom(rom);
136+
}
137+
catch (Exception e)
138+
{
139+
logger.LogError(e, "Could not launch rom");
140+
DisplayError(
141+
"There was an issue launching the rom. Make sure the rom file still exists and that you have a valid application set to launch roms in either the randomizer options or your operating system.");
142+
}
143+
134144
}
135145

136146
public void OpenFolder(GeneratedRom? rom)

0 commit comments

Comments
 (0)