Codechange: rename CargoID to CargoType and amend related variables/comments

This commit is contained in:
Rubidium
2025-01-22 18:08:59 +01:00
committed by rubidium42
parent d05cc2ef92
commit e894a5880c
129 changed files with 1009 additions and 1009 deletions

View File

@@ -53,7 +53,7 @@ public:
* @pre IsValidEngine(engine_id).
* @return The cargo-type of the engine.
*/
static CargoID GetCargoType(EngineID engine_id);
static CargoType GetCargoType(EngineID engine_id);
/**
* Check if the cargo of an engine can be refitted to your requested. If
@@ -61,26 +61,26 @@ public:
* In case of articulated vehicles the function decides whether at least one
* part can carry the cargo.
* @param engine_id The engine to check for refitting.
* @param cargo_id The cargo to check for refitting.
* @param cargo_type The cargo to check for refitting.
* @pre IsValidEngine(engine_id).
* @pre ScriptCargo::IsValidCargo(cargo_id).
* @pre ScriptCargo::IsValidCargo(cargo_type).
* @return True if the engine can carry this cargo, either via refit, or
* by default.
*/
static bool CanRefitCargo(EngineID engine_id, CargoID cargo_id);
static bool CanRefitCargo(EngineID engine_id, CargoType cargo_type);
/**
* Check if the engine can pull a wagon with the given cargo.
* @param engine_id The engine to check.
* @param cargo_id The cargo to check.
* @param cargo_type The cargo to check.
* @pre IsValidEngine(engine_id).
* @pre GetVehicleType(engine_id) == ScriptVehicle::VT_RAIL.
* @pre ScriptCargo::IsValidCargo(cargo_id).
* @pre ScriptCargo::IsValidCargo(cargo_type).
* @return True if the engine can pull wagons carrying this cargo.
* @note This function is not exhaustive; a true here does not mean
* that the vehicle can pull the wagons, a false does mean it can't.
*/
static bool CanPullCargo(EngineID engine_id, CargoID cargo_id);
static bool CanPullCargo(EngineID engine_id, CargoType cargo_type);
/**
* Get the capacity of an engine. In case it can transport multiple cargoes, it