OpenTTD Source 20251019-master-g9f7f314f81
|
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 = 0 |
uint8_t | cost_factor = 0 |
uint8_t | running_cost = 0 |
uint8_t | acceleration = 1 |
Acceleration (1 unit = 1/3.2 mph per tick = 0.5 km-ish/h per tick) | |
uint16_t | max_speed = 0 |
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h) | |
uint16_t | capacity = 0 |
SoundID | sfx {} |
bool | old_refittable = 0 |
Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask. | |
uint8_t | visual_effect = VE_DEFAULT |
Bitstuffed NewGRF visual effect data. | |
uint8_t | ocean_speed_frac = 0 |
Fraction of maximum speed for ocean tiles. | |
uint8_t | canal_speed_frac = 0 |
Fraction of maximum speed for canal/river tiles. | |
Information about a ship vehicle.
Definition at line 99 of file engine_type.h.
|
inline |
Apply ocean/canal speed fraction to a velocity.
Definition at line 113 of file engine_type.h.
References canal_speed_frac, and ocean_speed_frac.
Referenced by CYapfCostShipT< Types >::PfCalcCost(), and Ship::UpdateCache().
uint8_t ShipVehicleInfo::acceleration = 1 |
Acceleration (1 unit = 1/3.2 mph per tick = 0.5 km-ish/h per tick)
Definition at line 103 of file engine_type.h.
Referenced by AfterLoadGame(), CmdBuildShip(), and ShipVehicleChangeInfo().
uint8_t ShipVehicleInfo::canal_speed_frac = 0 |
Fraction of maximum speed for canal/river tiles.
Definition at line 110 of file engine_type.h.
Referenced by ApplyWaterClassSpeedFrac(), CYapfCostShipT< Types >::PfCalcCost(), and ShipVehicleChangeInfo().
uint16_t ShipVehicleInfo::capacity = 0 |
Definition at line 105 of file engine_type.h.
uint8_t ShipVehicleInfo::cost_factor = 0 |
Definition at line 101 of file engine_type.h.
uint8_t ShipVehicleInfo::image_index = 0 |
Definition at line 100 of file engine_type.h.
uint16_t ShipVehicleInfo::max_speed = 0 |
Maximum speed (1 unit = 1/3.2 mph = 0.5 km-ish/h)
Definition at line 104 of file engine_type.h.
Referenced by CYapfCostShipT< Types >::PfCalcCost(), ShipVehicleChangeInfo(), and Ship::UpdateCache().
uint8_t ShipVehicleInfo::ocean_speed_frac = 0 |
Fraction of maximum speed for ocean tiles.
Definition at line 109 of file engine_type.h.
Referenced by ApplyWaterClassSpeedFrac(), CYapfCostShipT< Types >::PfCalcCost(), and ShipVehicleChangeInfo().
bool ShipVehicleInfo::old_refittable = 0 |
Is ship refittable; only used during initialisation. Later use EngineInfo::refit_mask.
Definition at line 107 of file engine_type.h.
Referenced by CalculateRefitMasks(), and ShipVehicleChangeInfo().
uint8_t ShipVehicleInfo::running_cost = 0 |
Definition at line 102 of file engine_type.h.
SoundID ShipVehicleInfo::sfx {} |
Definition at line 106 of file engine_type.h.
uint8_t ShipVehicleInfo::visual_effect = VE_DEFAULT |
Bitstuffed NewGRF visual effect data.
Definition at line 108 of file engine_type.h.
Referenced by ShipVehicleChangeInfo().