Fix #9521: Don't load at just removed docks that were part of a multi-dock station...
[openttd-github.git] / src / disaster_vehicle.h
blobdff97a69e95ba1c00b3be50bf86665ebf450a15f
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file disaster_vehicle.h All disaster vehicles. */
10 #ifndef DISASTER_VEHICLE_H
11 #define DISASTER_VEHICLE_H
13 #include "vehicle_base.h"
15 /** Different sub types of disaster vehicles. */
16 enum DisasterSubType {
17 ST_ZEPPELINER, ///< Zeppelin, crashes at airports.
18 ST_ZEPPELINER_SHADOW, ///< Shadow of the zeppelin.
19 ST_SMALL_UFO, ///< Small UFO, tries to find a road vehicle to destroy.
20 ST_SMALL_UFO_SHADOW, ///< Shadow of small UFO
21 ST_AIRPLANE, ///< Airplane destroying an oil refinery
22 ST_AIRPLANE_SHADOW, ///< Shadow of airplane
23 ST_HELICOPTER, ///< Helicopter destroying a factory.
24 ST_HELICOPTER_SHADOW, ///< Shadow of helicopter.
25 ST_HELICOPTER_ROTORS, ///< Rotors of helicopter.
26 ST_BIG_UFO, ///< Big UFO, finds a piece of railroad to "park" on
27 ST_BIG_UFO_SHADOW, ///< Shadow of the big UFO
28 ST_BIG_UFO_DESTROYER, ///< Aircraft the will bomb the big UFO
29 ST_BIG_UFO_DESTROYER_SHADOW, ///< Shadow of the aircraft.
30 ST_SMALL_SUBMARINE, ///< Small submarine, pops up in the oceans but doesn't do anything
31 ST_BIG_SUBMARINE, ///< Big submarine, pops up in the oceans but doesn't do anything
34 /**
35 * Disasters, like submarines, skyrangers and their shadows, belong to this class.
37 struct DisasterVehicle FINAL : public SpecializedVehicle<DisasterVehicle, VEH_DISASTER> {
38 SpriteID image_override; ///< Override for the default disaster vehicle sprite.
39 VehicleID big_ufo_destroyer_target; ///< The big UFO that this destroyer is supposed to bomb.
40 byte flags; ///< Flags about the state of the vehicle, @see AirVehicleFlags
42 /** For use by saveload. */
43 DisasterVehicle() : SpecializedVehicleBase() {}
44 DisasterVehicle(int x, int y, Direction direction, DisasterSubType subtype, VehicleID big_ufo_destroyer_target = VEH_INVALID);
45 /** We want to 'destruct' the right class. */
46 virtual ~DisasterVehicle() {}
48 void UpdatePosition(int x, int y, int z);
49 void UpdateDeltaXY();
50 void UpdateImage();
51 bool Tick();
54 #endif /* DISASTER_VEHICLE_H */