From ba1fc280e3b0c13baedc2ef54dabb2deec41c818 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 7 Nov 2009 22:47:54 +0000 Subject: (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. --- src/tree_cmd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tree_cmd.cpp') 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) -- cgit v1.2.3-54-g00ecf