(svn r12600) -Codechange: make GetNonStopType return a more augmented type; not is there a non-stop order but the kind of non-stop order, so one doesn't need to check _patches.new_nonstop type everywhere.
This commit is contained in:
@@ -70,7 +70,7 @@ CommandCost CmdChangeTimetable(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
||||
bool is_journey = HasBit(p1, 24) || packed_time;
|
||||
if (!is_journey) {
|
||||
if (!order->IsType(OT_GOTO_STATION)) return_cmd_error(STR_TIMETABLE_ONLY_WAIT_AT_STATIONS);
|
||||
if (_patches.new_nonstop && (order->GetNonStopType() & OFB_NON_STOP)) return_cmd_error(STR_TIMETABLE_NOT_STOPPING_HERE);
|
||||
if (order->GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION) return_cmd_error(STR_TIMETABLE_NOT_STOPPING_HERE);
|
||||
}
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
|
Reference in New Issue
Block a user