Scheduled dispatch: Allow wrapping at midnight when bulk inserting slots
For 24 hour dispatch schedules See: #467
This commit is contained in:
@@ -98,6 +98,7 @@ CommandCost CmdScheduledDispatchAdd(TileIndex tile, DoCommandFlag flags, uint32
|
||||
ds.AddScheduledDispatch(p2);
|
||||
for (uint i = 0; i < extra_slots; i++) {
|
||||
p2 += offset;
|
||||
if (p2 >= ds.GetScheduledDispatchDuration()) p2 -= ds.GetScheduledDispatchDuration();
|
||||
ds.AddScheduledDispatch(p2);
|
||||
}
|
||||
SetTimetableWindowsDirty(v, true);
|
||||
|
Reference in New Issue
Block a user