* A vehicle can leave the current station with cargo if: * 1. it can load cargo here OR * 2a. it could leave the last station with cargo AND * 2b. it doesn't have to unload all cargo here. */
| 2198 | * 2b. it doesn't have to unload all cargo here. |
| 2199 | */ |
| 2200 | bool Order::CanLeaveWithCargo(bool has_cargo) const |
| 2201 | { |
| 2202 | return this->GetLoadType() != OrderLoadType::NoLoad || (has_cargo && |
| 2203 | this->GetUnloadType() != OrderUnloadType::Unload && |
| 2204 | this->GetUnloadType() != OrderUnloadType::Transfer); |
| 2205 | } |
no test coverage detected