#include <ai_event_types.hpp>

Public Member Functions | |
| AIEventEnginePreview (EngineID engine) | |
| char * | GetName () |
| Get the name of the offered engine. | |
| CargoID | GetCargoType () |
| Get the cargo-type of the offered engine. | |
| int32 | GetCapacity () |
| Get the capacity of the offered engine. | |
| int32 | GetMaxSpeed () |
| Get the maximum speed of the offered engine. | |
| Money | GetPrice () |
| Get the new cost of the offered engine. | |
| Money | GetRunningCost () |
| Get the running cost of the offered engine. | |
| AIVehicle::VehicleType | GetVehicleType () |
| Get the type of the offered engine. | |
| bool | AcceptPreview () |
| Accept the engine preview. | |
Static Public Member Functions | |
| static const char * | GetClassName () |
| static AIEventEnginePreview * | Convert (AIEvent *instance) |
| Convert an AIEvent to the real instance. | |
Private Attributes | |
| EngineID | engine |
You can get the same information about the offered engine as a real user would see in the offer window. And you can also accept the offer.
Definition at line 210 of file ai_event_types.hpp.
| AIEventEnginePreview::AIEventEnginePreview | ( | EngineID | engine | ) | [inline] |
| static AIEventEnginePreview* AIEventEnginePreview::Convert | ( | AIEvent * | instance | ) | [inline, static] |
Convert an AIEvent to the real instance.
| instance | The instance to convert. |
Definition at line 227 of file ai_event_types.hpp.
| char * AIEventEnginePreview::GetName | ( | ) |
Get the name of the offered engine.
Definition at line 14 of file ai_event_types.cpp.
| CargoID AIEventEnginePreview::GetCargoType | ( | ) |
Get the cargo-type of the offered engine.
In case it can transport 2 cargos, it returns the first.
Definition at line 24 of file ai_event_types.cpp.
| int32 AIEventEnginePreview::GetCapacity | ( | ) |
Get the capacity of the offered engine.
In case it can transport 2 cargos, it returns the first.
Definition at line 31 of file ai_event_types.cpp.
| int32 AIEventEnginePreview::GetMaxSpeed | ( | ) |
Get the maximum speed of the offered engine.
Definition at line 54 of file ai_event_types.cpp.
References _settings_game, VehicleSettings::plane_speed, and GameSettings::vehicle.
| Money AIEventEnginePreview::GetPrice | ( | ) |
Get the new cost of the offered engine.
Definition at line 62 of file ai_event_types.cpp.
| Money AIEventEnginePreview::GetRunningCost | ( | ) |
Get the running cost of the offered engine.
Definition at line 67 of file ai_event_types.cpp.
| AIVehicle::VehicleType AIEventEnginePreview::GetVehicleType | ( | ) |
Get the type of the offered engine.
Definition at line 72 of file ai_event_types.cpp.
References AIEvent::type, AIVehicle::VT_AIR, AIVehicle::VT_RAIL, AIVehicle::VT_ROAD, and AIVehicle::VT_WATER.
| bool AIEventEnginePreview::AcceptPreview | ( | ) |
Accept the engine preview.
Definition at line 83 of file ai_event_types.cpp.
References CMD_WANT_ENGINE_PREVIEW, and AIObject::DoCommand().
1.5.6