From bc85eaacc814dc3bbd63a04977283240a1ef025b Mon Sep 17 00:00:00 2001
From: Yona-TYT <yonatan.el.amigo@gmail.com>
Date: Thu, 21 Nov 2024 12:34:20 -0400
Subject: [PATCH] Fix Test

---
 tests/scenario.nut            |  2 +-
 tests/tests/test_scenario.nut | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/scenario.nut b/tests/scenario.nut
index d755cdb7f..f6a77e0e0 100644
--- a/tests/scenario.nut
+++ b/tests/scenario.nut
@@ -84,7 +84,7 @@ function get_result_text(pl)
 }
 
 
-function is_tool_allowed(pl, tool_id, wt)
+function is_tool_allowed(pl, tool_id, wt, name)
 {
 	return true
 }
diff --git a/tests/tests/test_scenario.nut b/tests/tests/test_scenario.nut
index 3be1f88ff..7adf91a99 100644
--- a/tests/tests/test_scenario.nut
+++ b/tests/tests/test_scenario.nut
@@ -29,7 +29,7 @@ function test_scenario_rules_allow_forbid_way_tool_rect()
 	local rail = way_desc_x.get_available_ways(wt_rail, st_flat)[0]
 	local pl = player_x(0)
 
-	rules.forbid_way_tool_rect(0, tool_build_way, wt_road, coord(2, 2), coord(5, 5), "Foo Bar")
+	rules.forbid_way_tool_rect(0, tool_build_way, wt_road, road.get_name(), coord(2, 2), coord(5, 5), "Foo Bar")
 
 	// Fully in forbiden zone
 	{
@@ -110,7 +110,7 @@ function test_scenario_rules_allow_forbid_way_tool_cube()
 	local road = way_desc_x.get_available_ways(wt_road, st_flat)[0]
 	local pl = player_x(0)
 
-	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, coord3d(2, 2, 1), coord3d(5, 5, 2), "Foo Bar")
+	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, road.get_name(), coord3d(2, 2, 1), coord3d(5, 5, 2), "Foo Bar")
 
 	// build below
 	{
@@ -153,7 +153,7 @@ function test_scenario_rules_allow_forbid_way_tool_cube()
 	}
 
 	rules.clear()
-	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, coord3d(0, 0, 1), coord3d(0, 0, 1), "Foo Bar")
+	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, road.get_name(), coord3d(0, 0, 1), coord3d(0, 0, 1), "Foo Bar")
 
 	// build double height slope through forbidden cube
 	{
@@ -188,7 +188,7 @@ function test_scenario_rules_allow_forbid_tool_stacked_rect()
 	local setslope = command_x.set_slope
 	local road_desc = way_desc_x.get_available_ways(wt_road, st_flat)[0]
 
-	rules.forbid_way_tool_rect(0, tool_build_way, wt_road, coord(1, 1), coord(14, 14), "Foo Bar 1")
+	rules.forbid_way_tool_rect(0, tool_build_way, wt_road, road_desc.get_name(), coord(1, 1), coord(14, 14), "Foo Bar 1")
 
 	// build in outer allowed ring, near map border
 	{
@@ -222,7 +222,7 @@ function test_scenario_rules_allow_forbid_tool_stacked_rect()
 			])
 	}
 
-	rules.allow_way_tool_rect(0, tool_build_way, wt_road, coord(2, 2), coord(13, 13))
+	rules.allow_way_tool_rect(0, tool_build_way, wt_road, road_desc.get_name(), coord(2, 2), coord(13, 13))
 
 	// try building in allowed ring, does not work because rules cannot be stacked
 	{
@@ -254,7 +254,7 @@ function test_scenario_rules_allow_forbid_tool_stacked_cube()
 	local setslope = command_x.set_slope
 	local road_desc = way_desc_x.get_available_ways(wt_road, st_flat)[0]
 
-	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, coord3d(1, 1, 0), coord3d(14, 14, 0), "Foo Bar 1")
+	rules.forbid_way_tool_cube(0, tool_build_way, wt_road, road_desc.get_name(), coord3d(1, 1, 0), coord3d(14, 14, 0), "Foo Bar 1")
 
 	// build in outer allowed ring, near map border
 	{
@@ -288,7 +288,7 @@ function test_scenario_rules_allow_forbid_tool_stacked_cube()
 			])
 	}
 
-	rules.allow_way_tool_cube(0, tool_build_way, wt_road, coord3d(2, 2, 0), coord3d(13, 13, 0))
+	rules.allow_way_tool_cube(0, tool_build_way, wt_road, road_desc.get_name(), coord3d(2, 2, 0), coord3d(13, 13, 0))
 
 	// try building in allowed ring, does not work because rules cannot be stacked
 	{
-- 
2.47.0

