Prevent orders from being double counted if they affect multiple seasons

This commit is contained in:
Jaculabilis 2022-11-08 18:55:27 -08:00
parent 95ed8c7682
commit 069cb4c548

View File

@ -86,7 +86,10 @@ public class MovementDecisions
}
// Get the orders in the affected timelines.
List<UnitOrder> relevantOrders = AdvanceTimeline.Values.SelectMany(at => at.Orders).ToList();
List<UnitOrder> relevantOrders = AdvanceTimeline.Values
.SelectMany(at => at.Orders)
.Distinct()
.ToList();
// Create a hold strength decision with an associated order for every province with a unit.
foreach (UnitOrder order in relevantOrders)