summaryrefslogtreecommitdiff
path: root/src/clear_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-11-27 16:02:13 +0000
committerbelugas <belugas@openttd.org>2007-11-27 16:02:13 +0000
commite07925a5cbddc5a45197ef7147e9165eae1b4d5a (patch)
treeaee628dd42ccd2800cd318427a96731d0c6cc442 /src/clear_cmd.cpp
parenta22bdeb8e302d309f57a556665138d1f56bfe783 (diff)
downloadopenttd-e07925a5cbddc5a45197ef7147e9165eae1b4d5a.tar.xz
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
While at it, remove one unused entry on the clear_price_table array. It is based on ground type, and the unused one was referencing a non existing one.
Diffstat (limited to 'src/clear_cmd.cpp')
-rw-r--r--src/clear_cmd.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp
index a39bf24a6..2974aa04a 100644
--- a/src/clear_cmd.cpp
+++ b/src/clear_cmd.cpp
@@ -438,20 +438,19 @@ CommandCost CmdPurchaseLandArea(TileIndex tile, uint32 flags, uint32 p1, uint32
MarkTileDirtyByTile(tile);
}
- return cost.AddCost(_price.purchase_land * 10);
+ return cost.AddCost(_price.clear_roughland * 10);
}
static CommandCost ClearTile_Clear(TileIndex tile, byte flags)
{
static const Money* clear_price_table[] = {
- &_price.clear_1,
- &_price.purchase_land,
- &_price.clear_2,
- &_price.clear_3,
- &_price.purchase_land,
- &_price.purchase_land,
- &_price.clear_2, // XXX unused?
+ &_price.clear_grass,
+ &_price.clear_roughland,
+ &_price.clear_rocks,
+ &_price.clear_fields,
+ &_price.clear_roughland,
+ &_price.clear_roughland,
};
CommandCost price;
@@ -484,7 +483,7 @@ CommandCost CmdSellLandArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) DoClearSquare(tile);
- return CommandCost(- _price.purchase_land * 2);
+ return CommandCost(- _price.clear_roughland * 2);
}