equal
deleted
inserted
replaced
328 case CLEAR_FIELDS: cost.AddCost(_price.clear_fields); break; |
328 case CLEAR_FIELDS: cost.AddCost(_price.clear_fields); break; |
329 case CLEAR_ROCKS: cost.AddCost(_price.clear_rocks); break; |
329 case CLEAR_ROCKS: cost.AddCost(_price.clear_rocks); break; |
330 default: break; |
330 default: break; |
331 } |
331 } |
332 |
332 |
|
333 if (_game_mode != GM_EDITOR && IsValidPlayer(_current_player)) { |
|
334 Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
|
335 if (t != NULL) |
|
336 ChangeTownRating(t, RATING_TREE_UP_STEP, RATING_TREE_MAXIMUM); |
|
337 } |
|
338 |
333 if (flags & DC_EXEC) { |
339 if (flags & DC_EXEC) { |
334 TreeType treetype; |
340 TreeType treetype; |
335 uint growth; |
341 uint growth; |
336 |
|
337 if (_game_mode != GM_EDITOR && IsValidPlayer(_current_player)) { |
|
338 Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
|
339 if (t != NULL) |
|
340 ChangeTownRating(t, RATING_TREE_UP_STEP, RATING_TREE_MAXIMUM); |
|
341 } |
|
342 |
342 |
343 treetype = (TreeType)p1; |
343 treetype = (TreeType)p1; |
344 if (treetype == TREE_INVALID) { |
344 if (treetype == TREE_INVALID) { |
345 treetype = GetRandomTreeType(tile, GB(Random(), 24, 8)); |
345 treetype = GetRandomTreeType(tile, GB(Random(), 24, 8)); |
346 if (treetype == TREE_INVALID) treetype = TREE_CACTUS; |
346 if (treetype == TREE_INVALID) treetype = TREE_CACTUS; |
486 |
486 |
487 static CommandCost ClearTile_Trees(TileIndex tile, byte flags) |
487 static CommandCost ClearTile_Trees(TileIndex tile, byte flags) |
488 { |
488 { |
489 uint num; |
489 uint num; |
490 |
490 |
491 if ((flags & DC_EXEC) && IsValidPlayer(_current_player)) { |
491 if (IsValidPlayer(_current_player)) { |
492 Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
492 Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); |
493 if (t != NULL) |
493 if (t != NULL) |
494 ChangeTownRating(t, RATING_TREE_DOWN_STEP, RATING_TREE_MINIMUM); |
494 ChangeTownRating(t, RATING_TREE_DOWN_STEP, RATING_TREE_MINIMUM); |
495 } |
495 } |
496 |
496 |