diff options
author | frosch <frosch@openttd.org> | 2019-12-18 00:48:03 +0100 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-12-23 17:23:20 +0000 |
commit | b769eb30c43ccbc4e60b8b7df024253ac55d2265 (patch) | |
tree | a2d3b30374e475f588d92cc2b00c20833b081eee /src/rail.cpp | |
parent | 6fa217dfc8afbd06bbc46462a2b6affc35268b5b (diff) | |
download | openttd-b769eb30c43ccbc4e60b8b7df024253ac55d2265.tar.xz |
Fix: Setting the default railtype to 'first/last available' did not work with NewGRF defined railtypes.
Diffstat (limited to 'src/rail.cpp')
-rw-r--r-- | src/rail.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/rail.cpp b/src/rail.cpp index f3c2c3dcc..63afa379e 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -209,21 +209,6 @@ bool ValParamRailtype(const RailType rail) } /** - * Returns the "best" railtype a company can build. - * As the AI doesn't know what the BEST one is, we have our own priority list - * here. When adding new railtypes, modify this function - * @param company the company "in action" - * @return The "best" railtype a company has available - */ -RailType GetBestRailtype(const CompanyID company) -{ - if (HasRailtypeAvail(company, RAILTYPE_MAGLEV)) return RAILTYPE_MAGLEV; - if (HasRailtypeAvail(company, RAILTYPE_MONO)) return RAILTYPE_MONO; - if (HasRailtypeAvail(company, RAILTYPE_ELECTRIC)) return RAILTYPE_ELECTRIC; - return RAILTYPE_RAIL; -} - -/** * Add the rail types that are to be introduced at the given date. * @param current The currently available railtypes. * @param date The date for the introduction comparisons. |