From dc77647ea4a2becac4eff3190970cb35671b0131 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 25 May 2008 19:17:03 +0000 Subject: (svn r13251) -Codechange: rename _patches to _settings as that is more logic. -Codechange: move all Settings into substructs of _settings in a way that they are logically grouped. --- src/tree_cmd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/tree_cmd.cpp') diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 1942c48b8..2ff5ba9a3 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -249,7 +249,7 @@ void PlaceTreesRandomly() if (CanPlantTreesOnTile(tile, true)) { PlaceTree(tile, r); - if (_patches.tree_placer != TP_IMPROVED) continue; + if (_settings.game_creation.tree_placer != TP_IMPROVED) continue; /* Place a number of trees based on the tile height. * This gives a cool effect of multiple trees close together. @@ -296,11 +296,11 @@ void GenerateTrees() { uint i, total; - if (_patches.tree_placer == TP_NONE) return; + if (_settings.game_creation.tree_placer == TP_NONE) return; if (_opt.landscape != LT_TOYLAND) PlaceMoreTrees(); - switch (_patches.tree_placer) { + switch (_settings.game_creation.tree_placer) { case TP_ORIGINAL: i = _opt.landscape == LT_ARCTIC ? 15 : 6; break; case TP_IMPROVED: i = _opt.landscape == LT_ARCTIC ? 4 : 2; break; default: NOT_REACHED(); return; @@ -390,7 +390,7 @@ CommandCost CmdPlantTree(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) } if (_game_mode != GM_EDITOR && IsValidPlayer(_current_player)) { - Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); + Town *t = ClosestTownFromTile(tile, _settings.economy.dist_local_authority); if (t != NULL) ChangeTownRating(t, RATING_TREE_UP_STEP, RATING_TREE_MAXIMUM); } @@ -533,7 +533,7 @@ static CommandCost ClearTile_Trees(TileIndex tile, byte flags) uint num; if (IsValidPlayer(_current_player)) { - Town *t = ClosestTownFromTile(tile, _patches.dist_local_authority); + Town *t = ClosestTownFromTile(tile, _settings.economy.dist_local_authority); if (t != NULL) ChangeTownRating(t, RATING_TREE_DOWN_STEP, RATING_TREE_MINIMUM); } -- cgit v1.2.3-54-g00ecf