(svn r18283) -Feature: [NewGRF] Add new price bases for removing industries, building/removing unmovables (new objects), building/removing rail-waypoints/buoys, interacting with town-authority, building foundations, funding primary industries (when not prospecting) and towns.

If a GRF does not set price multipliers for these new prices, but for the previously used ones, the old modifiers will be propagated to the new bases.
This commit is contained in:
frosch
2009-11-24 22:15:42 +00:00
parent dc71450b0f
commit 13a72bb345
13 changed files with 123 additions and 88 deletions

View File

@@ -699,7 +699,7 @@ CommandCost CheckFlatLandBelow(TileIndex tile, uint w, uint h, DoCommandFlag fla
(HasBit(invalid_dirs, DIAGDIR_NW) && !(tileh & SLOPE_NW))) {
return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED);
}
cost.AddCost(_price[PR_TERRAFORM]);
cost.AddCost(_price[PR_BUILD_FOUNDATION]);
flat_z += TILE_HEIGHT;
}
@@ -1375,7 +1375,7 @@ CommandCost CmdRemoveFromRailWaypoint(TileIndex start, DoCommandFlag flags, uint
TileArea ta(start, end);
SmallVector<Waypoint *, 4> affected_stations;
return RemoveFromRailBaseStation(ta, affected_stations, flags, _price[PR_CLEAR_DEPOT_TRAIN], HasBit(p2, 0));
return RemoveFromRailBaseStation(ta, affected_stations, flags, _price[PR_CLEAR_WAYPOINT_RAIL], HasBit(p2, 0));
}
@@ -3257,11 +3257,11 @@ static CommandCost TerraformTile_Station(TileIndex tile, DoCommandFlag flags, ui
DiagDirection direction = AxisToDiagDir(GetRailStationAxis(tile));
if (!AutoslopeCheckForEntranceEdge(tile, z_new, tileh_new, direction)) break;
if (!AutoslopeCheckForEntranceEdge(tile, z_new, tileh_new, ReverseDiagDir(direction))) break;
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_TERRAFORM]);
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
}
case STATION_AIRPORT:
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_TERRAFORM]);
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
case STATION_TRUCK:
case STATION_BUS: {
@@ -3270,7 +3270,7 @@ static CommandCost TerraformTile_Station(TileIndex tile, DoCommandFlag flags, ui
if (IsDriveThroughStopTile(tile)) {
if (!AutoslopeCheckForEntranceEdge(tile, z_new, tileh_new, ReverseDiagDir(direction))) break;
}
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_TERRAFORM]);
return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_BUILD_FOUNDATION]);
}
default: break;