summaryrefslogtreecommitdiff
path: root/src/script/api/ai/ai_order.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-29 23:29:20 +0000
committertruebrain <truebrain@openttd.org>2011-11-29 23:29:20 +0000
commit7158aaea3100fbae72c75645800592117375f897 (patch)
tree30b4f0058553c0246ea3c5d773972bbafedac5b7 /src/script/api/ai/ai_order.hpp.sq
parente60747a6043d42b872d02ba667f99187b5d3f1d7 (diff)
downloadopenttd-7158aaea3100fbae72c75645800592117375f897.tar.xz
(svn r23373) -Add: move the AI API to script/api/ai, and move the Squirrel C++ glue templates to script/api/template
Diffstat (limited to 'src/script/api/ai/ai_order.hpp.sq')
-rw-r--r--src/script/api/ai/ai_order.hpp.sq113
1 files changed, 113 insertions, 0 deletions
diff --git a/src/script/api/ai/ai_order.hpp.sq b/src/script/api/ai/ai_order.hpp.sq
new file mode 100644
index 000000000..006424572
--- /dev/null
+++ b/src/script/api/ai/ai_order.hpp.sq
@@ -0,0 +1,113 @@
+/* $Id$ */
+
+/*
+ * This file is part of OpenTTD.
+ * 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.
+ * 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.
+ * 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/>.
+ */
+
+/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
+
+#include "../script_order.hpp"
+#include "../template/template_order.hpp.sq"
+
+
+template <> const char *GetClassName<ScriptOrder, ST_AI>() { return "AIOrder"; }
+
+void SQAIOrder_Register(Squirrel *engine)
+{
+ DefSQClass<ScriptOrder, ST_AI> SQAIOrder("AIOrder");
+ SQAIOrder.PreRegister(engine);
+ SQAIOrder.AddConstructor<void (ScriptOrder::*)(), 1>(engine, "x");
+
+ 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::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");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_UNLOAD, "AIOF_UNLOAD");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_TRANSFER, "AIOF_TRANSFER");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NO_UNLOAD, "AIOF_NO_UNLOAD");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_FULL_LOAD, "AIOF_FULL_LOAD");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_FULL_LOAD_ANY, "AIOF_FULL_LOAD_ANY");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NO_LOAD, "AIOF_NO_LOAD");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_SERVICE_IF_NEEDED, "AIOF_SERVICE_IF_NEEDED");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_STOP_IN_DEPOT, "AIOF_STOP_IN_DEPOT");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_GOTO_NEAREST_DEPOT, "AIOF_GOTO_NEAREST_DEPOT");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_NON_STOP_FLAGS, "AIOF_NON_STOP_FLAGS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_UNLOAD_FLAGS, "AIOF_UNLOAD_FLAGS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_LOAD_FLAGS, "AIOF_LOAD_FLAGS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_DEPOT_FLAGS, "AIOF_DEPOT_FLAGS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::AIOF_INVALID, "AIOF_INVALID");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_LOAD_PERCENTAGE, "OC_LOAD_PERCENTAGE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_RELIABILITY, "OC_RELIABILITY");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_MAX_SPEED, "OC_MAX_SPEED");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_AGE, "OC_AGE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REQUIRES_SERVICE, "OC_REQUIRES_SERVICE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_UNCONDITIONALLY, "OC_UNCONDITIONALLY");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_REMAINING_LIFETIME, "OC_REMAINING_LIFETIME");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::OC_INVALID, "OC_INVALID");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_EQUALS, "CF_EQUALS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_NOT_EQUALS, "CF_NOT_EQUALS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_THAN, "CF_LESS_THAN");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_LESS_EQUALS, "CF_LESS_EQUALS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_THAN, "CF_MORE_THAN");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_MORE_EQUALS, "CF_MORE_EQUALS");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_TRUE, "CF_IS_TRUE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_IS_FALSE, "CF_IS_FALSE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::CF_INVALID, "CF_INVALID");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_CURRENT, "ORDER_CURRENT");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::ORDER_INVALID, "ORDER_INVALID");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_NEAR, "STOPLOCATION_NEAR");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_MIDDLE, "STOPLOCATION_MIDDLE");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_FAR, "STOPLOCATION_FAR");
+ SQAIOrder.DefSQConst(engine, ScriptOrder::STOPLOCATION_INVALID, "STOPLOCATION_INVALID");
+
+ 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::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");
+
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidVehicleOrder, "IsValidVehicleOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoStationOrder, "IsGotoStationOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoDepotOrder, "IsGotoDepotOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsGotoWaypointOrder, "IsGotoWaypointOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsConditionalOrder, "IsConditionalOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsVoidOrder, "IsVoidOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsRefitOrder, "IsRefitOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsCurrentOrderPartOfOrderList, "IsCurrentOrderPartOfOrderList", 2, ".i");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::ResolveOrderPosition, "ResolveOrderPosition", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AreOrderFlagsValid, "AreOrderFlagsValid", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::IsValidConditionalOrder, "IsValidConditionalOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCount, "GetOrderCount", 2, ".i");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderDestination, "GetOrderDestination", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderFlags, "GetOrderFlags", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderJumpTo, "GetOrderJumpTo", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCondition, "GetOrderCondition", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareFunction, "GetOrderCompareFunction", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderCompareValue, "GetOrderCompareValue", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetStopLocation, "GetStopLocation", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::GetOrderRefit, "GetOrderRefit", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderJumpTo, "SetOrderJumpTo", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCondition, "SetOrderCondition", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareFunction, "SetOrderCompareFunction", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderCompareValue, "SetOrderCompareValue", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetStopLocation, "SetStopLocation", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderRefit, "SetOrderRefit", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendOrder, "AppendOrder", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::AppendConditionalOrder, "AppendConditionalOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertOrder, "InsertOrder", 5, ".iiii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::InsertConditionalOrder, "InsertConditionalOrder", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::RemoveOrder, "RemoveOrder", 3, ".ii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SetOrderFlags, "SetOrderFlags", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::MoveOrder, "MoveOrder", 4, ".iii");
+ SQAIOrder.DefSQStaticMethod(engine, &ScriptOrder::SkipToOrder, "SkipToOrder", 3, ".ii");
+ 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.PostRegister(engine);
+}