equal
deleted
inserted
replaced
248 if (flags & DC_EXEC) { |
248 if (flags & DC_EXEC) { |
249 AddTreeCount(tile, 1); |
249 AddTreeCount(tile, 1); |
250 MarkTileDirtyByTile(tile); |
250 MarkTileDirtyByTile(tile); |
251 } |
251 } |
252 // 2x as expensive to add more trees to an existing tile |
252 // 2x as expensive to add more trees to an existing tile |
253 cost += _price.build_trees * 2; |
253 cost += _eco->GetPrice(CEconomy::BUILD_TREES) * 2; |
254 break; |
254 break; |
255 |
255 |
256 case MP_CLEAR: |
256 case MP_CLEAR: |
257 if (!IsTileOwner(tile, OWNER_NONE) || |
257 if (!IsTileOwner(tile, OWNER_NONE) || |
258 IsBridgeAbove(tile)) { |
258 IsBridgeAbove(tile)) { |
259 msg = STR_2804_SITE_UNSUITABLE; |
259 msg = STR_2804_SITE_UNSUITABLE; |
260 continue; |
260 continue; |
261 } |
261 } |
262 |
262 |
263 switch (GetClearGround(tile)) { |
263 switch (GetClearGround(tile)) { |
264 case CLEAR_FIELDS: cost += _price.clear_3; break; |
264 case CLEAR_FIELDS: cost += _eco->GetPrice(CEconomy::CLEAR_3); break; |
265 case CLEAR_ROCKS: cost += _price.clear_2; break; |
265 case CLEAR_ROCKS: cost += _eco->GetPrice(CEconomy::CLEAR_2); break; |
266 default: break; |
266 default: break; |
267 } |
267 } |
268 |
268 |
269 if (flags & DC_EXEC) { |
269 if (flags & DC_EXEC) { |
270 TreeType treetype; |
270 TreeType treetype; |
291 MarkTileDirtyByTile(tile); |
291 MarkTileDirtyByTile(tile); |
292 |
292 |
293 if (_game_mode == GM_EDITOR && IS_INT_INSIDE(treetype, TREE_RAINFOREST, TREE_CACTUS)) |
293 if (_game_mode == GM_EDITOR && IS_INT_INSIDE(treetype, TREE_RAINFOREST, TREE_CACTUS)) |
294 SetTropicZone(tile, TROPICZONE_RAINFOREST); |
294 SetTropicZone(tile, TROPICZONE_RAINFOREST); |
295 } |
295 } |
296 cost += _price.build_trees; |
296 cost += _eco->GetPrice(CEconomy::BUILD_TREES); |
297 break; |
297 break; |
298 |
298 |
299 default: |
299 default: |
300 msg = STR_2804_SITE_UNSUITABLE; |
300 msg = STR_2804_SITE_UNSUITABLE; |
301 break; |
301 break; |
437 num = GetTreeCount(tile) + 1; |
437 num = GetTreeCount(tile) + 1; |
438 if (IS_INT_INSIDE(GetTreeType(tile), TREE_RAINFOREST, TREE_CACTUS)) num *= 4; |
438 if (IS_INT_INSIDE(GetTreeType(tile), TREE_RAINFOREST, TREE_CACTUS)) num *= 4; |
439 |
439 |
440 if (flags & DC_EXEC) DoClearSquare(tile); |
440 if (flags & DC_EXEC) DoClearSquare(tile); |
441 |
441 |
442 return num * _price.remove_trees; |
442 return num * _eco->GetPrice(CEconomy::REMOVE_TREES); |
443 } |
443 } |
444 |
444 |
445 static void GetAcceptedCargo_Trees(TileIndex tile, AcceptedCargo ac) |
445 static void GetAcceptedCargo_Trees(TileIndex tile, AcceptedCargo ac) |
446 { |
446 { |
447 /* not used */ |
447 /* not used */ |