From dda6cab17a451da637b15ecdbfd6f8f64be9ab77 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 21 Feb 2008 19:09:10 +0000 Subject: (svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it. --- src/economy.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/economy.cpp') diff --git a/src/economy.cpp b/src/economy.cpp index 5d0acd2ad..643047764 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -914,6 +914,15 @@ void StartupEconomy() _economy.fluct = GB(Random(), 0, 8) + 168; } + +Money GetPriceByIndex(uint8 index) +{ + if (index > NUM_PRICES) return 0; + + return ((Money*)&_price)[index]; +} + + Pair SetupSubsidyDecodeParam(const Subsidy* s, bool mode) { TileIndex tile; -- cgit v1.2.3-54-g00ecf