MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OrderGoesToStation

Function OrderGoesToStation

src/order_cmd.cpp:539–543  ·  view source on GitHub ↗

* Checks whether the order goes to a station or not, i.e. whether the * destination is a station * @param v the vehicle to check for * @param o the order to check * @return true if the destination is a station */

Source from the content-addressed store, hash-verified

537 * @return true if the destination is a station
538 */
539static inline bool OrderGoesToStation(const Vehicle *v, const Order &o)
540{
541 return o.IsType(OT_GOTO_STATION) ||
542 (v->type == VEH_AIRCRAFT && o.IsType(OT_GOTO_DEPOT) && o.GetDestination() != StationID::Invalid());
543}
544
545/**
546 * Delete all news items regarding defective orders about a vehicle

Callers 1

CmdCloneOrderFunction · 0.85

Calls 3

InvalidFunction · 0.85
IsTypeMethod · 0.80
GetDestinationMethod · 0.80

Tested by

no test coverage detected