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

Method CanLoadOrUnload

src/order_cmd.cpp:2186–2192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2184}
2185
2186bool Order::CanLoadOrUnload() const
2187{
2188 return (this->IsType(OT_GOTO_STATION) || this->IsType(OT_IMPLICIT)) &&
2189 !this->GetNonStopType().Test(OrderNonStopFlag::NoDestination) &&
2190 (this->GetLoadType() != OrderLoadType::NoLoad ||
2191 this->GetUnloadType() != OrderUnloadType::NoUnload);
2192}
2193
2194/**
2195 * A vehicle can leave the current station with cargo if:

Callers 1

GetNextDecisionNodeMethod · 0.80

Calls 5

IsTypeMethod · 0.95
GetNonStopTypeMethod · 0.95
GetLoadTypeMethod · 0.95
GetUnloadTypeMethod · 0.95
TestMethod · 0.80

Tested by

no test coverage detected