This commit is contained in:
@@ -2426,6 +2426,30 @@ void Vehicle::HandleLoading(bool mode)
|
||||
this->IncrementImplicitOrderIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current vehicle has a full load order.
|
||||
* @return true Iff this vehicle has a full load order.
|
||||
*/
|
||||
bool Vehicle::HasFullLoadOrder() const
|
||||
{
|
||||
for (Order *o : this->Orders()) {
|
||||
if (o->IsType(OT_GOTO_STATION) && o->GetLoadType() & (OLFB_FULL_LOAD | OLF_FULL_LOAD_ANY)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current vehicle has a conditional order.
|
||||
* @return true Iff this vehicle has a conditional order.
|
||||
*/
|
||||
bool Vehicle::HasConditionalOrder() const
|
||||
{
|
||||
for (Order *o : this->Orders()) {
|
||||
if (o->IsType(OT_CONDITIONAL)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the current vehicle has an unbunching order.
|
||||
* @return true Iff this vehicle has an unbunching order.
|
||||
|
Reference in New Issue
Block a user