Loading

Revision differences

Old revision #p0fosxr56New revision #psiivpgdr
10  10  
11    /* middle tile */  11    /* middle tile */  
12    WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;  12    WaterClass wc_middle = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL;  
13    ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);  13   
14    if (ret.Failed()) return ret;  14    if (!IsWaterTile(tile)) {
15    cost.AddCost(ret);  15        ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
   16        if (ret.Failed()) return ret;
   17        cost.AddCost(ret);
   18        cost.AddCost(_price[PR_BUILD_CANAL]);
   19    }
16  20  
17    /* lower tile */  21    /* lower tile */  
18    WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;  22    WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;  
  
50        if (c != NULL) {  54        if (c != NULL) {  
51            /* Counts for the water. */  55            /* Counts for the water. */  
52            if (!IsWaterTile(tile - delta)) c->infrastructure.water++;  56            if (!IsWaterTile(tile - delta)) c->infrastructure.water++;  
  57            if (!IsWaterTile(tile)) c->infrastructure.water++;  
53            if (!IsWaterTile(tile + delta)) c->infrastructure.water++;  58            if (!IsWaterTile(tile + delta)) c->infrastructure.water++;  
54            /* Count for the lock itself. */  59            /* Count for the lock itself. */  
55            c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock is three tiles.  60            c->infrastructure.water += 3 * LOCK_DEPOT_TILE_FACTOR; // Lock is three tiles.