MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / FreightWagonMult

Function FreightWagonMult

src/train_cmd.cpp:68–72  ·  view source on GitHub ↗

* Return the cargo weight multiplier to use for a rail vehicle * @param cargo Cargo type to get multiplier for * @return Cargo weight multiplier */

Source from the content-addressed store, hash-verified

66 * @return Cargo weight multiplier
67 */
68uint8_t FreightWagonMult(CargoType cargo)
69{
70 if (!CargoSpec::Get(cargo)->is_freight) return 1;
71 return _settings_game.vehicle.freight_trains;
72}
73
74/** Checks if lengths of all rail vehicles are valid. If not, shows an error message. */
75void CheckTrainsLengths()

Callers 3

TrainDetailsCargoTabFunction · 0.85
TrainDetailsCapacityTabFunction · 0.85
DrawTrainDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected