Scheduled dispatch: Remove scheduled_dispatch_start_full_date_fract

Use DateTicksScaled
This commit is contained in:
Jonathan G Rennison
2023-12-17 21:12:11 +00:00
parent c76a5ed638
commit e9599fd4be
11 changed files with 57 additions and 134 deletions

View File

@@ -3692,14 +3692,6 @@ CommandCost CmdMassChangeOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, u
void ShiftOrderDates(int interval)
{
for (OrderList *orderlist : OrderList::Iterate()) {
for (DispatchSchedule &ds : orderlist->GetScheduledDispatchScheduleSet()) {
if (ds.GetScheduledDispatchStartDatePart() >= 0) {
ds.SetScheduledDispatchStartDate(ds.GetScheduledDispatchStartDatePart() + interval, ds.GetScheduledDispatchStartDateFractPart());
}
}
}
SetWindowClassesDirty(WC_VEHICLE_ORDERS);
SetWindowClassesDirty(WC_VEHICLE_TIMETABLE);
SetWindowClassesDirty(WC_SCHDISPATCH_SLOTS);