if (!AIRoad.AreRoadTilesConnected(prev_tile, new_tile)) { local isOmniInfra = AIRoad.IsRoadTile(new_tile) || AIBridge.IsBridgeTile(new_tile) || AITunnel.IsTunnelTile(new_tile); local isOwnedInfra = AIRoad.IsRoadStationTile(new_tile) || AIRoad.IsRoadDepotTile(new_tile); local isSelfOwnedInfra = isOwnedInfra && AITile.GetOwner(new_tile) == AICompany.ResolveCompanyID(AICompany.COMPANY_SELF); local multiplier = (isOmniInfra || isSelfOwnedInfra) ? 2 : 1; cost += self._cost_no_existing_road * multiplier; }