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

Method HasFullLoadOrder

src/vehicle.cpp:2442–2447  ·  view source on GitHub ↗

* Check if the current vehicle has a full load order. * @return true Iff this vehicle has a full load order. */

Source from the content-addressed store, hash-verified

2440 * @return true Iff this vehicle has a full load order.
2441 */
2442bool Vehicle::HasFullLoadOrder() const
2443{
2444 return std::ranges::any_of(this->Orders(), [](const Order &o) {
2445 return o.IsType(OT_GOTO_STATION) && o.IsFullLoadOrder();
2446 });
2447}
2448
2449/**
2450 * Check if the current vehicle has a conditional order.

Callers 2

CmdInsertOrderFunction · 0.80
CmdModifyOrderFunction · 0.80

Calls 3

OrdersMethod · 0.95
IsTypeMethod · 0.80
IsFullLoadOrderMethod · 0.80

Tested by

no test coverage detected