summaryrefslogtreecommitdiff
path: root/src/script/api/ai/ai_order.hpp.sq
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-12-13 00:43:59 +0000
committermichi_cc <michi_cc@openttd.org>2011-12-13 00:43:59 +0000
commita085ea9e4b9078c647304e85d4c03980b71ced22 (patch)
tree0402e72db8caaf57ca38b3dd71312f9375eb389c /src/script/api/ai/ai_order.hpp.sq
parent34ffd08a19e1156260223256d87a4cdfa7a080e0 (diff)
downloadopenttd-a085ea9e4b9078c647304e85d4c03980b71ced22.tar.xz
(svn r23506) -Add: [NoAI] Support for dealing with aircraft range.
Diffstat (limited to 'src/script/api/ai/ai_order.hpp.sq')
-rw-r--r--src/script/api/ai/ai_order.hpp.sq4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_order.hpp.sq b/src/script/api/ai/ai_order.hpp.sq
index 006424572..9916c5808 100644
--- a/src/script/api/ai/ai_order.hpp.sq
+++ b/src/script/api/ai/ai_order.hpp.sq
@@ -24,6 +24,7 @@ void SQAIOrder_Register(Squirrel *engine)
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_BASE, "ERR_ORDER_BASE");
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NONE, "AIOF_NONE");
SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NON_STOP_INTERMEDIATE, "AIOF_NON_STOP_INTERMEDIATE");
SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NON_STOP_DESTINATION, "AIOF_NON_STOP_DESTINATION");
@@ -67,9 +68,11 @@ void SQAIOrder_Register(Squirrel *engine)
ScriptError::RegisterErrorMap(STR_ERROR_NO_MORE_SPACE_FOR_ORDERS, ScriptOrder::ERR_ORDER_TOO_MANY);
ScriptError::RegisterErrorMap(STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION, ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION);
+ ScriptError::RegisterErrorMap(STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE, ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE);
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_MANY, "ERR_ORDER_TOO_MANY");
ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION, "ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION");
+ ScriptError::RegisterErrorMapString(ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, "ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE");
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii");
@@ -108,6 +111,7 @@ void SQAIOrder_Register(Squirrel *engine)
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::CopyOrders, "CopyOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ShareOrders, "ShareOrders", 3, ".ii");
SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::UnshareOrders, "UnshareOrders", 2, ".i");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDistance, "GetOrderDistance", 4, ".iii");
SQAIOrder.PostRegister(engine);
}