Fixed the modifiers achievement triggering when no rides are present

This commit is contained in:
Ellpeck 2020-07-26 02:48:43 +02:00
parent d45a49f809
commit caa40f1160

View file

@ -25,7 +25,7 @@ namespace TouchyTickets {
foreach (var flag in new[] {AttractionFlags.Small, AttractionFlags.Relaxed, AttractionFlags.Walking, AttractionFlags.NonTechnology})
Register(new Achievement($"Only{flag}Rides", g => g.Map.GetAttractionAmount(null) >= 100 && g.Map.GetAttractions().All(a => a.Item2.Type.Flags.HasFlag(flag))));
foreach (var amount in new[] {100, 500, 1000, 5000})
Register(new Achievement($"{amount}Modifiers", g => g.Map.GetAttractions().All(a => a.Item2.GetModifierAmount(null) >= amount)));
Register(new Achievement($"{amount}Modifiers", g => g.Map.GetAttractionAmount(null) > 0 && g.Map.GetAttractions().All(a => a.Item2.GetModifierAmount(null) >= amount)));
for (var i = 1; i <= 10; i++) {
var amount = BigInteger.Pow(1000, i + 1);
Register(new Achievement($"{Ui.PrettyPrintNumber(amount).Replace(" ", "")}Tickets", g => g.Tickets >= amount));