mirror of https://github.com/OpenTTD/OpenTTD.git
(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.
This commit is contained in:
parent
9402d4054a
commit
1682d5d679
|
@ -438,20 +438,19 @@ CommandCost CmdPurchaseLandArea(TileIndex tile, uint32 flags, uint32 p1, uint32
|
||||||
MarkTileDirtyByTile(tile);
|
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 CommandCost ClearTile_Clear(TileIndex tile, byte flags)
|
||||||
{
|
{
|
||||||
static const Money* clear_price_table[] = {
|
static const Money* clear_price_table[] = {
|
||||||
&_price.clear_1,
|
&_price.clear_grass,
|
||||||
&_price.purchase_land,
|
&_price.clear_roughland,
|
||||||
&_price.clear_2,
|
&_price.clear_rocks,
|
||||||
&_price.clear_3,
|
&_price.clear_fields,
|
||||||
&_price.purchase_land,
|
&_price.clear_roughland,
|
||||||
&_price.purchase_land,
|
&_price.clear_roughland,
|
||||||
&_price.clear_2, // XXX unused?
|
|
||||||
};
|
};
|
||||||
CommandCost price;
|
CommandCost price;
|
||||||
|
|
||||||
|
@ -484,7 +483,7 @@ CommandCost CmdSellLandArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
|
|
||||||
if (flags & DC_EXEC) DoClearSquare(tile);
|
if (flags & DC_EXEC) DoClearSquare(tile);
|
||||||
|
|
||||||
return CommandCost(- _price.purchase_land * 2);
|
return CommandCost(- _price.clear_roughland * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -791,10 +791,10 @@ static const Money _price_base[NUM_PRICES] = {
|
||||||
65000, ///< ship_base
|
65000, ///< ship_base
|
||||||
20, ///< build_trees
|
20, ///< build_trees
|
||||||
250, ///< terraform
|
250, ///< terraform
|
||||||
20, ///< clear_1
|
20, ///< clear_grass
|
||||||
40, ///< purchase_land
|
40, ///< clear_roughland
|
||||||
200, ///< clear_2
|
200, ///< clear_rocks
|
||||||
500, ///< clear_3
|
500, ///< clear_fields
|
||||||
20, ///< remove_trees
|
20, ///< remove_trees
|
||||||
-70, ///< remove_rail
|
-70, ///< remove_rail
|
||||||
10, ///< remove_signals
|
10, ///< remove_signals
|
||||||
|
|
|
@ -242,10 +242,10 @@ struct Prices {
|
||||||
Money ship_base;
|
Money ship_base;
|
||||||
Money build_trees;
|
Money build_trees;
|
||||||
Money terraform;
|
Money terraform;
|
||||||
Money clear_1;
|
Money clear_grass;
|
||||||
Money purchase_land;
|
Money clear_roughland;
|
||||||
Money clear_2;
|
Money clear_rocks;
|
||||||
Money clear_3;
|
Money clear_fields;
|
||||||
Money remove_trees;
|
Money remove_trees;
|
||||||
Money remove_rail;
|
Money remove_rail;
|
||||||
Money remove_signals;
|
Money remove_signals;
|
||||||
|
|
|
@ -419,7 +419,7 @@ CommandCost CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p
|
||||||
|
|
||||||
if (water_ground) {
|
if (water_ground) {
|
||||||
cost.AddCost(-_price.clear_water);
|
cost.AddCost(-_price.clear_water);
|
||||||
cost.AddCost(_price.purchase_land);
|
cost.AddCost(_price.clear_roughland);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
|
|
|
@ -324,8 +324,8 @@ CommandCost CmdPlantTree(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (GetClearGround(tile)) {
|
switch (GetClearGround(tile)) {
|
||||||
case CLEAR_FIELDS: cost.AddCost(_price.clear_3); break;
|
case CLEAR_FIELDS: cost.AddCost(_price.clear_fields); break;
|
||||||
case CLEAR_ROCKS: cost.AddCost(_price.clear_2); break;
|
case CLEAR_ROCKS: cost.AddCost(_price.clear_rocks); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,7 @@ static CommandCost ClearTile_Water(TileIndex tile, byte flags)
|
||||||
if (slope == SLOPE_N || slope == SLOPE_E || slope == SLOPE_S || slope == SLOPE_W) {
|
if (slope == SLOPE_N || slope == SLOPE_E || slope == SLOPE_S || slope == SLOPE_W) {
|
||||||
return CommandCost(_price.clear_water);
|
return CommandCost(_price.clear_water);
|
||||||
} else {
|
} else {
|
||||||
return CommandCost(_price.purchase_land);
|
return CommandCost(_price.clear_roughland);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue