Chunnel: Tunnels are only allowed to cross sea.
This commit is contained in:

committed by
Jonathan G Rennison

parent
93a43da809
commit
de24fed9d1
@@ -5012,6 +5012,7 @@ STR_ERROR_TUNNEL_RAMP_TOO_SHORT :{WHITE}... ramp
|
|||||||
STR_ERROR_TUNNEL_TOO_MANY :{WHITE}... too many tunnels
|
STR_ERROR_TUNNEL_TOO_MANY :{WHITE}... too many tunnels
|
||||||
STR_ERROR_NO_DRILLING_ABOVE_CHUNNEL :{WHITE}No oil rigs allowed above underwater tunnels.
|
STR_ERROR_NO_DRILLING_ABOVE_CHUNNEL :{WHITE}No oil rigs allowed above underwater tunnels.
|
||||||
STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY_FOR_CHUNNEL :{WHITE}Three tiles are needed to pass under the other tunnel.
|
STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY_FOR_CHUNNEL :{WHITE}Three tiles are needed to pass under the other tunnel.
|
||||||
|
STR_ERROR_CHUNNEL_ONLY_OVER_SEA :{WHITE}Underwater tunnels are only allowed to cross sea...
|
||||||
|
|
||||||
# Object related errors
|
# Object related errors
|
||||||
STR_ERROR_TOO_MANY_OBJECTS :{WHITE}... too many objects
|
STR_ERROR_TOO_MANY_OBJECTS :{WHITE}... too many objects
|
||||||
|
@@ -734,9 +734,10 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
|
|||||||
|
|
||||||
end_tile += delta;
|
end_tile += delta;
|
||||||
tiles++;
|
tiles++;
|
||||||
|
if (IsTileType(end_tile, MP_WATER) && IsSea(end_tile)) is_chunnel = true;
|
||||||
}
|
}
|
||||||
/* The water was passed */
|
/* The water was passed */
|
||||||
is_chunnel = true;
|
if (!is_chunnel) return_cmd_error(STR_ERROR_CHUNNEL_ONLY_OVER_SEA);
|
||||||
head_tiles = 0;
|
head_tiles = 0;
|
||||||
found_tunnel_tile = INVALID_TILE;
|
found_tunnel_tile = INVALID_TILE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user