OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
10 #ifndef DISASTER_VEHICLE_H
11 #define DISASTER_VEHICLE_H
SpriteID image_override
Override for the default disaster vehicle sprite.
bool Tick() override
Calls the tick handler of the vehicle.
VehicleID big_ufo_destroyer_target
The big UFO that this destroyer is supposed to bomb.
@ ST_SMALL_UFO_SHADOW
Shadow of small UFO.
DisasterSubType
Different sub types of disaster vehicles.
@ ST_BIG_SUBMARINE
Big submarine, pops up in the oceans but doesn't do anything.
@ ST_AIRPLANE
Airplane destroying an oil refinery.
void UpdateDeltaXY() override
Updates the x and y offsets and the size of the sprite used for this vehicle.
@ VEH_INVALID
Non-existing type of vehicle.
@ ST_ZEPPELINER
Zeppelin, crashes at airports.
@ ST_BIG_UFO_SHADOW
Shadow of the big UFO.
Class defining several overloaded accessors so we don't have to cast vehicle types that often.
virtual ~DisasterVehicle()=default
We want to 'destruct' the right class.
uint32_t VehicleID
The type all our vehicle IDs have.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
Disasters, like submarines, skyrangers and their shadows, belong to this class.
Direction direction
facing
uint8_t flags
Flags about the state of the vehicle,.
uint8_t subtype
subtype (Filled with values from AircraftSubType/DisasterSubType/EffectVehicleType/GroundVehicleSubty...
@ ST_HELICOPTER_SHADOW
Shadow of helicopter.
@ ST_SMALL_SUBMARINE
Small submarine, pops up in the oceans but doesn't do anything.
@ ST_BIG_UFO_DESTROYER_SHADOW
Shadow of the aircraft.
@ ST_AIRPLANE_SHADOW
Shadow of airplane.
@ ST_HELICOPTER
Helicopter destroying a factory.
Direction
Defines the 8 directions on the map.
@ ST_HELICOPTER_ROTORS
Rotors of helicopter.
@ ST_BIG_UFO_DESTROYER
Aircraft the will bomb the big UFO.
@ ST_BIG_UFO
Big UFO, finds a piece of railroad to "park" on.
void UpdatePosition()
Update the position of the vehicle.
@ ST_ZEPPELINER_SHADOW
Shadow of the zeppelin.
uint16_t state
Action stage of the disaster vehicle.
DisasterVehicle()
For use by saveload.
@ ST_SMALL_UFO
Small UFO, tries to find a road vehicle to destroy.