diff options
author | michi_cc <michi_cc@openttd.org> | 2011-12-13 00:43:59 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-12-13 00:43:59 +0000 |
commit | a085ea9e4b9078c647304e85d4c03980b71ced22 (patch) | |
tree | 0402e72db8caaf57ca38b3dd71312f9375eb389c /src/script/api/ai/ai_event_types.hpp.sq | |
parent | 34ffd08a19e1156260223256d87a4cdfa7a080e0 (diff) | |
download | openttd-a085ea9e4b9078c647304e85d4c03980b71ced22.tar.xz |
(svn r23506) -Add: [NoAI] Support for dealing with aircraft range.
Diffstat (limited to 'src/script/api/ai/ai_event_types.hpp.sq')
-rw-r--r-- | src/script/api/ai/ai_event_types.hpp.sq | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_event_types.hpp.sq b/src/script/api/ai/ai_event_types.hpp.sq index 5bdbaccf1..bb46ed724 100644 --- a/src/script/api/ai/ai_event_types.hpp.sq +++ b/src/script/api/ai/ai_event_types.hpp.sq @@ -346,3 +346,18 @@ void SQAIEventTownFounded_Register(Squirrel *engine) SQAIEventTownFounded.PostRegister(engine); } + + +template <> const char *GetClassName<ScriptEventAircraftDestTooFar, ST_AI>() { return "AIEventAircraftDestTooFar"; } + +void SQAIEventAircraftDestTooFar_Register(Squirrel *engine) +{ + DefSQClass<ScriptEventAircraftDestTooFar, ST_AI> SQAIEventAircraftDestTooFar("AIEventAircraftDestTooFar"); + SQAIEventAircraftDestTooFar.PreRegister(engine, "AIEvent"); + + SQAIEventAircraftDestTooFar.DefSQStaticMethod(engine, &ScriptEventAircraftDestTooFar::Convert, "Convert", 2, ".x"); + + SQAIEventAircraftDestTooFar.DefSQMethod(engine, &ScriptEventAircraftDestTooFar::GetVehicleID, "GetVehicleID", 1, "x"); + + SQAIEventAircraftDestTooFar.PostRegister(engine); +} |