From c70b11724323ec8de7ea219415217f49d86ad043 Mon Sep 17 00:00:00 2001 From: Victor Aguilera Diaz <189733068+Dkijas@users.noreply.github.com> Date: Thu, 3 Sep 2026 14:02:12 +0200 Subject: [PATCH] FIX: prevent shorter bridge construction in tutorial chapter 3 The permission for the bridge span covered every height from the ground level up to the bridge deck. Scenario allow rules are consulted before the forbid rules, so that single permission also covered the tiles between the two bridge heads at ground level, and the player could end a shorter bridge there instead of building the one the chapter asks for. Restrict the permission to the deck plane. The deck stays buildable while the intermediate ground tiles remain forbidden, so only the intended bridge is possible. clear_way_tool_cube gets the identical geometry, otherwise the rule would not be removed once the bridge is finished. Measured on pak64 with tutorial64.sve: the intended bridge still builds in both directions, and also when the bridge heads already carry rail; the shorter bridge is refused, with no change to the world and no cost. Co-Authored-By: Claude Opus 5 (1M context) --- class/class_chapter_03.nut | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/class_chapter_03.nut b/class/class_chapter_03.nut index 3a8eccd..0c33328 100644 --- a/class/class_chapter_03.nut +++ b/class/class_chapter_03.nut @@ -650,7 +650,7 @@ class tutorial.chapter_03 extends basic_chapter // rules for bridge build local cube = select_cube(bridge2_coords.b, bridge2_coords.a, "bridge") rules.forbid_way_tool_rect(player_all, tool_build_bridge, wt_rail, 0, cube[2], cube[3], get_message(5) ) - rules.allow_way_tool_cube(player_all, tool_build_bridge, wt_rail, 0, cube[0], cube[1]) + rules.allow_way_tool_cube(player_all, tool_build_bridge, wt_rail, 0, cube[0], coord3d(cube[1].x, cube[1].y, cube[0].z)) } } //Para el puente @@ -671,7 +671,7 @@ class tutorial.chapter_03 extends basic_chapter // clear bridge build rules local cube = select_cube(bridge2_coords.b, bridge2_coords.a, "bridge") rules.clear_way_tool_rect(player_all, tool_build_bridge, wt_rail, 0, cube[2], cube[3], true) - rules.clear_way_tool_cube(player_all, tool_build_bridge, wt_rail, 0, cube[0], cube[1], false) + rules.clear_way_tool_cube(player_all, tool_build_bridge, wt_rail, 0, cube[0], coord3d(cube[1].x, cube[1].y, cube[0].z), false) } }