Codechange: Use SQInteger for generic numbers in script_engine

This commit is contained in:
glx22
2023-02-11 16:31:43 +01:00
committed by Loïc Guilloux
parent 2f40bf8097
commit 6b8b4c392f
2 changed files with 19 additions and 24 deletions

View File

@@ -89,7 +89,7 @@ public:
* @pre IsValidEngine(engine_id).
* @return The capacity of the engine.
*/
static int32 GetCapacity(EngineID engine_id);
static SQInteger GetCapacity(EngineID engine_id);
/**
* Get the reliability of an engine. The value is between 0 and 100, where
@@ -100,7 +100,7 @@ public:
* @pre GetVehicleType(engine_id) != ScriptVehicle::VT_TRAIN || !IsWagon(engine_id).
* @return The reliability the engine has.
*/
static int32 GetReliability(EngineID engine_id);
static SQInteger GetReliability(EngineID engine_id);
/**
* Get the maximum speed of an engine.
@@ -111,7 +111,7 @@ public:
* This is mph / 1.6, which is roughly km/h.
* To get km/h multiply this number by 1.00584.
*/
static int32 GetMaxSpeed(EngineID engine_id);
static SQInteger GetMaxSpeed(EngineID engine_id);
/**
* Get the new cost of an engine.
@@ -128,7 +128,7 @@ public:
* @returns The maximum age of a new engine in days.
* @note Age is in days; divide by 366 to get per year.
*/
static int32 GetMaxAge(EngineID engine_id);
static SQInteger GetMaxAge(EngineID engine_id);
/**
* Get the running cost of an engine.
@@ -146,7 +146,7 @@ public:
* @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD) && !IsWagon(engine_id).
* @return The power of the engine in hp.
*/
static int32 GetPower(EngineID engine_id);
static SQInteger GetPower(EngineID engine_id);
/**
* Get the weight of an engine.
@@ -155,7 +155,7 @@ public:
* @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD).
* @return The weight of the engine in metric tons.
*/
static int32 GetWeight(EngineID engine_id);
static SQInteger GetWeight(EngineID engine_id);
/**
* Get the maximum tractive effort of an engine.
@@ -164,7 +164,7 @@ public:
* @pre (GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL || GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD) && !IsWagon(engine_id).
* @return The maximum tractive effort of the engine in kN.
*/
static int32 GetMaxTractiveEffort(EngineID engine_id);
static SQInteger GetMaxTractiveEffort(EngineID engine_id);
/**
* Get the date this engine was designed.
@@ -286,7 +286,7 @@ public:
* not be compared with map distances
* @see ScriptOrder::GetOrderDistance
*/
static uint GetMaximumOrderDistance(EngineID engine_id);
static SQInteger GetMaximumOrderDistance(EngineID engine_id);
/**
* Allows a company to use an engine before its intro date or after retirement.