In CvPlot::canBuild there's this code:
This is to prevent you from building a route on water if it's supposed to be on land and vice versa. The issue is because it's inside the if(getRouteType() != NO_ROUTE) statement it will only be run if the plot already HAS a route. This allows you to build roads and even railroads on water if you have a worker that can cross it without embarking. Which isn't possible in the base game, but may be possible in mods.
Code:
if(eRoute != NO_ROUTE)
{
if(getRouteType() != NO_ROUTE)
{
if (isWater() && !thisBuildInfo.IsWater())
{
return false;
}
*snip*
}
bValid = true;
}
This is to prevent you from building a route on water if it's supposed to be on land and vice versa. The issue is because it's inside the if(getRouteType() != NO_ROUTE) statement it will only be run if the plot already HAS a route. This allows you to build roads and even railroads on water if you have a worker that can cross it without embarking. Which isn't possible in the base game, but may be possible in mods.