Add road/tram type flag to disallow tunnels

This commit is contained in:
Jonathan G Rennison
2023-02-19 15:03:18 +00:00
parent 3497d0dcdb
commit 663a3969a0
9 changed files with 32 additions and 5 deletions

View File

@@ -966,6 +966,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
case TRANSPORT_ROAD:
roadtype = Extract<RoadType, 0, 6>(p1);
if (!ValParamRoadType(roadtype)) return CMD_ERROR;
if (RoadNoTunnels(roadtype)) return_cmd_error(STR_ERROR_TUNNEL_DISALLOWED_ROAD);
break;
default: return CMD_ERROR;