Fix #423: Max TE/weight should not be shown for maglevs

This commit is contained in:
Jonathan G Rennison
2022-09-16 12:32:44 +01:00
parent 5825fec5bf
commit fc5e20719d
9 changed files with 39 additions and 23 deletions

View File

@@ -321,6 +321,15 @@ public:
return this->GetCargoWeight(this->cargo.StoredCount());
}
/**
* Allows to know the acceleration type of a vehicle.
* @return Acceleration type of the vehicle.
*/
inline int GetAccelerationType() const
{
return GetRailTypeInfo(this->railtype)->acceleration_type;
}
protected: // These functions should not be called outside acceleration code.
/**
* Gets the speed a broken down train (low speed breakdown) is limited to.
@@ -439,15 +448,6 @@ protected: // These functions should not be called outside acceleration code.
return 15 * (512 + this->GetCurrentSpeed()) / 512;
}
/**
* Allows to know the acceleration type of a vehicle.
* @return Acceleration type of the vehicle.
*/
inline int GetAccelerationType() const
{
return GetRailTypeInfo(this->railtype)->acceleration_type;
}
/**
* Returns the slope steepness used by this vehicle.
* @return Slope steepness used by the vehicle.