Initial support for multi-part (pseudo-articulated) ships

This commit is contained in:
Jonathan G Rennison
2023-03-14 00:16:31 +00:00
parent 5718730d68
commit 211fdd62b2
16 changed files with 216 additions and 58 deletions

View File

@@ -162,6 +162,15 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
return this->type == VEH_TRAIN || this->type == VEH_ROAD;
}
/**
* Check if the vehicle type supports articulation.
* @return True iff the vehicle is a train, road vehicle or ship.
*/
inline bool IsArticulatedCallbackVehicleType() const
{
return this->type == VEH_TRAIN || this->type == VEH_ROAD || this->type == VEH_SHIP;
}
/**
* Retrieve the NewGRF the engine is tied to.
* This is the GRF providing the Action 3.