From 2aa14cc54bc7ab05a84d6f50ee772c6f40fd6099 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Sat, 5 Mar 2011 18:28:10 +0000 Subject: [PATCH] (svn r22204) -Change: Make the base costs for building and demolishing NewObjects also local to the individual NewGRFs --- src/newgrf_object.h | 4 ++-- src/table/pricebase.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/newgrf_object.h b/src/newgrf_object.h index 1c023a7a02..243d0f3a33 100644 --- a/src/newgrf_object.h +++ b/src/newgrf_object.h @@ -74,13 +74,13 @@ struct ObjectSpec { * Get the cost for building a structure of this type. * @return The cost for building. */ - Money GetBuildCost() const { return (_price[PR_BUILD_OBJECT] * this->build_cost_multiplier); } + Money GetBuildCost() const { return GetPrice(PR_BUILD_OBJECT, this->build_cost_multiplier, this->grf_prop.grffile, 0); } /** * Get the cost for clearing a structure of this type. * @return The cost for clearing. */ - Money GetClearCost() const { return (_price[PR_CLEAR_OBJECT] * this->clear_cost_multiplier); } + Money GetClearCost() const { return GetPrice(PR_CLEAR_OBJECT, this->clear_cost_multiplier, this->grf_prop.grffile, 0); } bool IsAvailable() const; uint Index() const; diff --git a/src/table/pricebase.h b/src/table/pricebase.h index 662a763d47..84d23b3bd7 100644 --- a/src/table/pricebase.h +++ b/src/table/pricebase.h @@ -60,8 +60,8 @@ extern const PriceBaseSpec _price_base_specs[] = { { 5600, PCAT_RUNNING, GSF_SHIPS, INVALID_PRICE }, ///< PR_RUNNING_SHIP {1000000, PCAT_CONSTRUCTION, GSF_END, INVALID_PRICE }, ///< PR_BUILD_INDUSTRY { 1600, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_HOUSE }, ///< PR_CLEAR_INDUSTRY - { 40, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_ROUGH }, ///< PR_BUILD_OBJECT - { 40, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_ROUGH }, ///< PR_CLEAR_OBJECT + { 40, PCAT_CONSTRUCTION, GSF_OBJECTS, PR_CLEAR_ROUGH }, ///< PR_BUILD_OBJECT + { 40, PCAT_CONSTRUCTION, GSF_OBJECTS, PR_CLEAR_ROUGH }, ///< PR_CLEAR_OBJECT { 600, PCAT_CONSTRUCTION, GSF_END, PR_BUILD_DEPOT_TRAIN }, ///< PR_BUILD_WAYPOINT_RAIL { 80, PCAT_CONSTRUCTION, GSF_END, PR_CLEAR_DEPOT_TRAIN }, ///< PR_CLEAR_WAYPOINT_RAIL { 350, PCAT_CONSTRUCTION, GSF_END, PR_BUILD_STATION_DOCK }, ///< PR_BUILD_WAYPOINT_BUOY