OpenTTD Source 20241224-master-gf74b0cf984
|
Information about a ship vehicle. More...
#include <engine_type.h>
Public Member Functions | |
uint | ApplyWaterClassSpeedFrac (uint raw_speed, bool is_ocean) const |
Apply ocean/canal speed fraction to a velocity. | |
Data Fields | |
uint8_t | image_index |
uint8_t | cost_factor |
uint8_t | running_cost |
uint8_t | acceleration |
Acceleration (1 unit = 1/3.2 mph per tick = 0.5 km-ish/h per tick) | |
uint16_t | max_speed |
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h) | |
uint16_t | capacity |
SoundID | sfx |
bool | old_refittable |
Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask. | |
uint8_t | visual_effect |
Bitstuffed NewGRF visual effect data. | |
uint8_t | ocean_speed_frac |
Fraction of maximum speed for ocean tiles. | |
uint8_t | canal_speed_frac |
Fraction of maximum speed for canal/river tiles. | |
Information about a ship vehicle.
Definition at line 67 of file engine_type.h.
|
inline |
Apply ocean/canal speed fraction to a velocity.
Definition at line 81 of file engine_type.h.
References canal_speed_frac, and ocean_speed_frac.
Referenced by Ship::UpdateCache().
uint8_t ShipVehicleInfo::acceleration |
Acceleration (1 unit = 1/3.2 mph per tick = 0.5 km-ish/h per tick)
Definition at line 71 of file engine_type.h.
Referenced by AfterLoadGame(), CmdBuildShip(), and ShipVehicleChangeInfo().
uint8_t ShipVehicleInfo::canal_speed_frac |
Fraction of maximum speed for canal/river tiles.
Definition at line 78 of file engine_type.h.
Referenced by ApplyWaterClassSpeedFrac(), CYapfCostShipT< Types >::PfCalcCost(), and ShipVehicleChangeInfo().
uint16_t ShipVehicleInfo::capacity |
Definition at line 73 of file engine_type.h.
uint8_t ShipVehicleInfo::cost_factor |
Definition at line 69 of file engine_type.h.
uint8_t ShipVehicleInfo::image_index |
Definition at line 68 of file engine_type.h.
uint16_t ShipVehicleInfo::max_speed |
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h)
Definition at line 72 of file engine_type.h.
Referenced by ShipVehicleChangeInfo(), and Ship::UpdateCache().
uint8_t ShipVehicleInfo::ocean_speed_frac |
Fraction of maximum speed for ocean tiles.
Definition at line 77 of file engine_type.h.
Referenced by ApplyWaterClassSpeedFrac(), CYapfCostShipT< Types >::PfCalcCost(), and ShipVehicleChangeInfo().
bool ShipVehicleInfo::old_refittable |
Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask.
Definition at line 75 of file engine_type.h.
Referenced by CalculateRefitMasks(), and ShipVehicleChangeInfo().
uint8_t ShipVehicleInfo::running_cost |
Definition at line 70 of file engine_type.h.
SoundID ShipVehicleInfo::sfx |
Definition at line 74 of file engine_type.h.
uint8_t ShipVehicleInfo::visual_effect |
Bitstuffed NewGRF visual effect data.
Definition at line 76 of file engine_type.h.
Referenced by ShipVehicleChangeInfo(), and Vehicle::UpdateVisualEffect().