forked from mirror/OpenTTD
(svn r21517) -Codechange: Add IsGroundVehicle function to the Engine class.
This commit is contained in:
@@ -87,6 +87,15 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
|
||||
uint GetDisplayWeight() const;
|
||||
uint GetDisplayMaxTractiveEffort() const;
|
||||
Date GetLifeLengthInDays() const;
|
||||
|
||||
/**
|
||||
* Check if the engine is a ground vehicle.
|
||||
* @return True iff the engine is a train or a road vehicle.
|
||||
*/
|
||||
FORCEINLINE bool IsGroundVehicle() const
|
||||
{
|
||||
return this->type == VEH_TRAIN || this->type == VEH_ROAD;
|
||||
}
|
||||
};
|
||||
|
||||
struct EngineIDMapping {
|
||||
|
Reference in New Issue
Block a user