diff options
author | peter1138 <peter1138@openttd.org> | 2008-02-21 19:09:10 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-02-21 19:09:10 +0000 |
commit | f6e4dc4d8c48d635e4f31d6f04498bbf6076ab68 (patch) | |
tree | ea01512db1a1157040bbc860c2b76afcf0fe4eee /src/economy.cpp | |
parent | 67bf63ddff5ff88cb1770a16d1c9e697bddec55c (diff) | |
download | openttd-f6e4dc4d8c48d635e4f31d6f04498bbf6076ab68.tar.xz |
(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.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; |