mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 17:02:37 +01:00
Codechange: rename CargoID to CargoType and amend related variables/comments
This commit is contained in:
@@ -66,7 +66,7 @@ bool IsValidImageIndex<VEH_TRAIN>(uint8_t image_index)
|
||||
* @param cargo Cargo type to get multiplier for
|
||||
* @return Cargo weight multiplier
|
||||
*/
|
||||
uint8_t FreightWagonMult(CargoID cargo)
|
||||
uint8_t FreightWagonMult(CargoType cargo)
|
||||
{
|
||||
if (!CargoSpec::Get(cargo)->is_freight) return 1;
|
||||
return _settings_game.vehicle.freight_trains;
|
||||
@@ -649,7 +649,7 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
|
||||
v->cargo_type = e->GetDefaultCargoType();
|
||||
assert(IsValidCargoID(v->cargo_type));
|
||||
assert(IsValidCargoType(v->cargo_type));
|
||||
v->cargo_cap = rvi->capacity;
|
||||
v->refit_cap = 0;
|
||||
|
||||
@@ -774,7 +774,7 @@ CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engin
|
||||
v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL;
|
||||
v->spritenum = rvi->image_index;
|
||||
v->cargo_type = e->GetDefaultCargoType();
|
||||
assert(IsValidCargoID(v->cargo_type));
|
||||
assert(IsValidCargoType(v->cargo_type));
|
||||
v->cargo_cap = rvi->capacity;
|
||||
v->refit_cap = 0;
|
||||
v->last_station_visited = INVALID_STATION;
|
||||
|
||||
Reference in New Issue
Block a user