Event Vehicle Crash, indicating a vehicle of yours is crashed. More...
#include <script_event_types.hpp>
Public Types | |
| enum | CrashReason { CRASH_TRAIN, CRASH_RV_LEVEL_CROSSING, CRASH_RV_UFO, CRASH_PLANE_LANDING, CRASH_AIRCRAFT_NO_AIRPORT, CRASH_FLOODED } |
The reasons for vehicle crashes. More... | |
Public Member Functions | |
| ScriptEventVehicleCrashed (VehicleID vehicle, TileIndex crash_site, CrashReason crash_reason) | |
| VehicleID | GetVehicleID () |
| Get the VehicleID of the crashed vehicle. | |
| TileIndex | GetCrashSite () |
| Find the tile the vehicle crashed. | |
| CrashReason | GetCrashReason () |
| Get the reason for crashing. | |
Static Public Member Functions | |
| static ScriptEventVehicleCrashed * | Convert (ScriptEvent *instance) |
| Convert an ScriptEvent to the real instance. | |
Private Attributes | |
| TileIndex | crash_site |
| The location of the crash. | |
| VehicleID | vehicle |
| The crashed vehicle. | |
| CrashReason | crash_reason |
| The reason for crashing. | |
Event Vehicle Crash, indicating a vehicle of yours is crashed.
It contains the crash site, the crashed vehicle and the reason for the crash. ai game
Definition at line 24 of file script_event_types.hpp.
The reasons for vehicle crashes.
| CRASH_TRAIN |
Two trains collided. |
| CRASH_RV_LEVEL_CROSSING |
Road vehicle got under a train. |
| CRASH_RV_UFO |
Road vehicle got under a landing ufo. |
| CRASH_PLANE_LANDING |
Plane crashed on landing. |
| CRASH_AIRCRAFT_NO_AIRPORT |
Aircraft crashed after it found not a single airport for landing. |
| CRASH_FLOODED |
Vehicle was flooded. |
Definition at line 29 of file script_event_types.hpp.
| ScriptEventVehicleCrashed::ScriptEventVehicleCrashed | ( | VehicleID | vehicle, | |
| TileIndex | crash_site, | |||
| CrashReason | crash_reason | |||
| ) | [inline] |
| vehicle | The vehicle that crashed. | |
| crash_site | Where the vehicle crashed. | |
| crash_reason | The reason why the vehicle crashed. |
Definition at line 43 of file script_event_types.hpp.
| static ScriptEventVehicleCrashed* ScriptEventVehicleCrashed::Convert | ( | ScriptEvent * | instance | ) | [inline, static] |
Convert an ScriptEvent to the real instance.
| instance | The instance to convert. |
Definition at line 55 of file script_event_types.hpp.
| CrashReason ScriptEventVehicleCrashed::GetCrashReason | ( | ) | [inline] |
Get the reason for crashing.
Definition at line 73 of file script_event_types.hpp.
References crash_reason.
| TileIndex ScriptEventVehicleCrashed::GetCrashSite | ( | ) | [inline] |
Find the tile the vehicle crashed.
Definition at line 67 of file script_event_types.hpp.
References crash_site.
| VehicleID ScriptEventVehicleCrashed::GetVehicleID | ( | ) | [inline] |
Get the VehicleID of the crashed vehicle.
Definition at line 61 of file script_event_types.hpp.
References vehicle.
1.7.1