Chunnel: Tunnels are only allowed to cross sea.

This commit is contained in:
HackaLittleBit
2017-03-12 20:33:50 +00:00
committed by Jonathan G Rennison
parent 93a43da809
commit de24fed9d1
2 changed files with 3 additions and 1 deletions

View File

@@ -5012,6 +5012,7 @@ STR_ERROR_TUNNEL_RAMP_TOO_SHORT :{WHITE}... ramp
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_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
STR_ERROR_TOO_MANY_OBJECTS :{WHITE}... too many objects

View File

@@ -734,9 +734,10 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
end_tile += delta;
tiles++;
if (IsTileType(end_tile, MP_WATER) && IsSea(end_tile)) is_chunnel = true;
}
/* The water was passed */
is_chunnel = true;
if (!is_chunnel) return_cmd_error(STR_ERROR_CHUNNEL_ONLY_OVER_SEA);
head_tiles = 0;
found_tunnel_tile = INVALID_TILE;
}