summaryrefslogtreecommitdiff
path: root/bin/ai
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-02-15 20:14:50 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-03-03 09:15:39 +0100
commit5a5944867dfeaa556ec78c23af4796adb28a6a9f (patch)
treef735f1c944bbf765bbcdfe9311cc7ed86ed71135 /bin/ai
parent5d3ccae6c5bd3f328ad0d8e68ae7c69451b9ca48 (diff)
downloadopenttd-5a5944867dfeaa556ec78c23af4796adb28a6a9f.tar.xz
Add: Add parent_group_id parameter to CreateGroup()
Diffstat (limited to 'bin/ai')
-rw-r--r--bin/ai/compat_0.7.nut7
-rw-r--r--bin/ai/compat_1.0.nut7
-rw-r--r--bin/ai/compat_1.1.nut7
-rw-r--r--bin/ai/compat_1.2.nut7
-rw-r--r--bin/ai/compat_1.3.nut7
-rw-r--r--bin/ai/compat_1.4.nut7
-rw-r--r--bin/ai/compat_1.5.nut7
-rw-r--r--bin/ai/compat_1.6.nut7
-rw-r--r--bin/ai/compat_1.7.nut7
-rw-r--r--bin/ai/compat_1.8.nut7
-rw-r--r--bin/ai/regression/tst_regression/main.nut2
11 files changed, 71 insertions, 1 deletions
diff --git a/bin/ai/compat_0.7.nut b/bin/ai/compat_0.7.nut
index 98c03c673..86ab06bba 100644
--- a/bin/ai/compat_0.7.nut
+++ b/bin/ai/compat_0.7.nut
@@ -374,3 +374,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.0.nut b/bin/ai/compat_1.0.nut
index 627c949cc..6aa0e1a97 100644
--- a/bin/ai/compat_1.0.nut
+++ b/bin/ai/compat_1.0.nut
@@ -126,3 +126,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.1.nut b/bin/ai/compat_1.1.nut
index a47f3d5b1..3d7b7553e 100644
--- a/bin/ai/compat_1.1.nut
+++ b/bin/ai/compat_1.1.nut
@@ -63,3 +63,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.2.nut b/bin/ai/compat_1.2.nut
index 95ccabda2..594ba9835 100644
--- a/bin/ai/compat_1.2.nut
+++ b/bin/ai/compat_1.2.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.3.nut b/bin/ai/compat_1.3.nut
index fc8e06bf5..fb0f41d30 100644
--- a/bin/ai/compat_1.3.nut
+++ b/bin/ai/compat_1.3.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.4.nut b/bin/ai/compat_1.4.nut
index 169ead959..4bbb97160 100644
--- a/bin/ai/compat_1.4.nut
+++ b/bin/ai/compat_1.4.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.5.nut b/bin/ai/compat_1.5.nut
index 681a708be..b006f1733 100644
--- a/bin/ai/compat_1.5.nut
+++ b/bin/ai/compat_1.5.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.6.nut b/bin/ai/compat_1.6.nut
index 5242821d1..e57a3cb98 100644
--- a/bin/ai/compat_1.6.nut
+++ b/bin/ai/compat_1.6.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.7.nut b/bin/ai/compat_1.7.nut
index 93884e663..ae403d104 100644
--- a/bin/ai/compat_1.7.nut
+++ b/bin/ai/compat_1.7.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/compat_1.8.nut b/bin/ai/compat_1.8.nut
index f3fa1bc0a..ecf4accdd 100644
--- a/bin/ai/compat_1.8.nut
+++ b/bin/ai/compat_1.8.nut
@@ -15,3 +15,10 @@ AIBridge.GetName <- function(bridge_id)
{
return AIBridge._GetName(bridge_id, AIVehicle.VT_RAIL);
}
+
+/* 1.9 adds parent_group_id to CreateGroup function */
+AIGroup._CreateGroup <- AIGroup.CreateGroup;
+AIGroup.CreateGroup <- function(vehicle_type)
+{
+ return AIGroup._CreateGroup(vehicle_type, AIGroup.GROUP_INVALID);
+}
diff --git a/bin/ai/regression/tst_regression/main.nut b/bin/ai/regression/tst_regression/main.nut
index 8b92b6f88..7315f33f8 100644
--- a/bin/ai/regression/tst_regression/main.nut
+++ b/bin/ai/regression/tst_regression/main.nut
@@ -574,7 +574,7 @@ function Regression::Group()
local vehicle = AIVehicle.BuildVehicle(10000, 116);
print(" AIVehicle.BuildVehicle(): " + vehicle);
print(" GetNumEngines(): " + AIGroup.GetNumEngines(AIGroup.GROUP_ALL, 116));
- local group = AIGroup.CreateGroup(AIVehicle.VT_ROAD);
+ local group = AIGroup.CreateGroup(AIVehicle.VT_ROAD, AIGroup.GROUP_INVALID);
print(" CreateGroup(): " + group);
print(" MoveVehicle(): " + AIGroup.MoveVehicle(group, vehicle));
print(" GetNumEngines(): " + AIGroup.GetNumEngines(group, 116));