summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-11-07 22:47:54 +0000
committerfrosch <frosch@openttd.org>2009-11-07 22:47:54 +0000
commitba1fc280e3b0c13baedc2ef54dabb2deec41c818 (patch)
treef8f51f5d18355d9205052bad2e90e068e9bfacb6 /src/tree_cmd.cpp
parent7984d90c40f4d55cad9f34d0acac27beb701a63a (diff)
downloadopenttd-ba1fc280e3b0c13baedc2ef54dabb2deec41c818.tar.xz
(svn r18005) -Codechange: Convert the Prices struct into an array and an enum.
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r--src/tree_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index 3720be8c0..d0dec00e2 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -368,7 +368,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
MarkTileDirtyByTile(tile);
}
/* 2x as expensive to add more trees to an existing tile */
- cost.AddCost(_price.build_trees * 2);
+ cost.AddCost(_price[PR_BUILD_TREES] * 2);
break;
case MP_WATER:
@@ -420,7 +420,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (_game_mode == GM_EDITOR && IsInsideMM(treetype, TREE_RAINFOREST, TREE_CACTUS))
SetTropicZone(tile, TROPICZONE_RAINFOREST);
}
- cost.AddCost(_price.build_trees);
+ cost.AddCost(_price[PR_BUILD_TREES]);
break;
default:
@@ -551,7 +551,7 @@ static CommandCost ClearTile_Trees(TileIndex tile, DoCommandFlag flags)
if (flags & DC_EXEC) DoClearSquare(tile);
- return CommandCost(EXPENSES_CONSTRUCTION, num * _price.remove_trees);
+ return CommandCost(EXPENSES_CONSTRUCTION, num * _price[PR_CLEAR_TREES]);
}
static void GetTileDesc_Trees(TileIndex tile, TileDesc *td)