diff options
author | alberth <alberth@openttd.org> | 2010-02-15 11:04:27 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-02-15 11:04:27 +0000 |
commit | c0933e825ad662db1f75f5456e2303c437b8cb31 (patch) | |
tree | 6e7c245b75129b83c30226a661ebed6543ef3e38 /src | |
parent | 6553f499910bfa2acd71fce94b2995ea6d89e5d3 (diff) | |
download | openttd-c0933e825ad662db1f75f5456e2303c437b8cb31.tar.xz |
(svn r19138) -Codechange: Rename CheckMultipleIndustryInTown() to FindTownForIndustry().
Diffstat (limited to 'src')
-rw-r--r-- | src/industry_cmd.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 846bb6222..d11cc5b95 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1277,7 +1277,13 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = { CheckNewIndustry_OilRig, ///< CHECK_OIL_RIG }; -static const Town *CheckMultipleIndustryInTown(TileIndex tile, int type) +/** Find a town for the industry, while checking for multiple industries in the same town. + * @param tile Position of the industry to build. + * @param type Industry type. + * @param [out] err_mesg Error message, if any. + * @return Town for the new industry, \c NULL if no good town can be found. + */ +static const Town *FindTownForIndustry(TileIndex tile, int type) { const Town *t; const Industry *i; @@ -1701,7 +1707,7 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCo if (!custom_shape_check && _settings_game.game_creation.land_generator == LG_TERRAGENESIS && _generating_world && !_ignore_restrictions && !CheckIfCanLevelIndustryPlatform(tile, DC_NO_WATER, it, type)) return NULL; if (!CheckIfFarEnoughFromIndustry(tile, type)) return NULL; - const Town *t = CheckMultipleIndustryInTown(tile, type); + const Town *t = FindTownForIndustry(tile, type); if (t == NULL) return NULL; if (!CheckIfIndustryIsAllowed(tile, type, t)) return NULL; |