Added priority sorting to time-based reservations

This commit is contained in:
Dawid Pietrykowski 2022-10-13 20:16:26 +02:00
parent 75841d7a41
commit a9f6948b5c
2 changed files with 3 additions and 2 deletions

View File

@ -2932,7 +2932,7 @@ MonoBehaviour:
mainPlanContainer: {fileID: 557435656}
emergencyPlanContainer: {fileID: 632826360}
reconfigurationToggle: {fileID: 441283505}
defaultPath: /home/davp/Projects/Customers/Parking/Assets/Data/Tablica5.csv
defaultPath:
--- !u!1 &1347097428
GameObject:
m_ObjectHideFlags: 0

View File

@ -151,7 +151,8 @@ namespace Parking
nextDrivers.Add(driver);
}
}
nextDrivers.Sort(((a, b) => Comparer<TimeSpan>.Default.Compare(a.PlannedDeparture, b.PlannedDeparture)));
// nextDrivers.Sort(((a, b) => Comparer<TimeSpan>.Default.Compare(a.PlannedDeparture, b.PlannedDeparture)));
nextDrivers.Sort(((a, b) => Comparer<int>.Default.Compare(a.Priority, b.Priority)));
//nextDrivers.Sort(((a, b) => Comparer<TimeSpan>.Default.Compare(a.RealDeparture, b.RealDeparture)));
//nextDrivers.Sort(((a, b) => Comparer<TimeSpan>.Default.Compare(a.PlannedArrival, b.PlannedArrival)));