diff options
author | frosch <frosch@openttd.org> | 2009-02-11 18:33:27 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-02-11 18:33:27 +0000 |
commit | 3e3a158610d34c87420e450c3974bab48520254a (patch) | |
tree | c3d4c06161fcb435137b74863bd91a36d86effcf /src | |
parent | 3728df83239306587750739d323605bebe5b4005 (diff) | |
download | openttd-3e3a158610d34c87420e450c3974bab48520254a.tar.xz |
(svn r15449) -Codechange: Rename DC_NO_TOWN_RATING to DC_NO_TEST_TOWN_RATING as that is what it does.
Diffstat (limited to 'src')
-rw-r--r-- | src/command_type.h | 20 | ||||
-rw-r--r-- | src/town_cmd.cpp | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/command_type.h b/src/command_type.h index a94517563..883a0f7bd 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -294,16 +294,16 @@ enum { * This enums defines some flags which can be used for the commands. */ enum DoCommandFlag { - DC_NONE = 0x000, ///< no flag is set - DC_EXEC = 0x001, ///< execute the given command - DC_AUTO = 0x002, ///< don't allow building on structures - DC_QUERY_COST = 0x004, ///< query cost only, don't build. - DC_NO_WATER = 0x008, ///< don't allow building on water - DC_NO_RAIL_OVERLAP = 0x010, ///< don't allow overlap of rails (used in buildrail) - DC_NO_TOWN_RATING = 0x020, ///< town rating does not disallow you from building - DC_BANKRUPT = 0x040, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases - DC_AUTOREPLACE = 0x080, ///< autoreplace/autorenew is in progress, this shall disable vehicle limits when building, and ignore certain restrictions when undoing things (like vehicle attach callback) - DC_ALL_TILES = 0x100, ///< allow this command also on MP_VOID tiles + DC_NONE = 0x000, ///< no flag is set + DC_EXEC = 0x001, ///< execute the given command + DC_AUTO = 0x002, ///< don't allow building on structures + DC_QUERY_COST = 0x004, ///< query cost only, don't build. + DC_NO_WATER = 0x008, ///< don't allow building on water + DC_NO_RAIL_OVERLAP = 0x010, ///< don't allow overlap of rails (used in buildrail) + DC_NO_TEST_TOWN_RATING = 0x020, ///< town rating does not disallow you from building + DC_BANKRUPT = 0x040, ///< company bankrupts, skip money check, skip vehicle on tile check in some cases + DC_AUTOREPLACE = 0x080, ///< autoreplace/autorenew is in progress, this shall disable vehicle limits when building, and ignore certain restrictions when undoing things (like vehicle attach callback) + DC_ALL_TILES = 0x100, ///< allow this command also on MP_VOID tiles }; DECLARE_ENUM_AS_BIT_SET(DoCommandFlag); diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index a03f50623..b16afa08c 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -531,7 +531,7 @@ static CommandCost ClearTile_Town(TileIndex tile, DoCommandFlag flags) Town *t = _cleared_town = GetTownByTile(tile); if (IsValidCompanyID(_current_company)) { - if (rating > t->ratings[_current_company] && !(flags & DC_NO_TOWN_RATING) && !_cheats.magic_bulldozer.value) { + if (rating > t->ratings[_current_company] && !(flags & DC_NO_TEST_TOWN_RATING) && !_cheats.magic_bulldozer.value) { SetDParam(0, t->index); return_cmd_error(STR_2009_LOCAL_AUTHORITY_REFUSES); } @@ -2495,11 +2495,11 @@ static void UpdateTownUnwanted(Town *t) /** * Checks whether the local authority allows construction of a new station (rail, road, airport, dock) on the given tile * @param tile The tile where the station shall be constructed. - * @param flags Command flags. DC_NO_TOWN_RATING is tested. + * @param flags Command flags. DC_NO_TEST_TOWN_RATING is tested. */ bool CheckIfAuthorityAllowsNewStation(TileIndex tile, DoCommandFlag flags) { - if (!IsValidCompanyID(_current_company) || (flags & DC_NO_TOWN_RATING)) return true; + if (!IsValidCompanyID(_current_company) || (flags & DC_NO_TEST_TOWN_RATING)) return true; Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority); if (t == NULL) return true; @@ -2642,7 +2642,7 @@ bool CheckforTownRating(DoCommandFlag flags, Town *t, byte type) */ int modemod = _default_rating_settings[_settings_game.difficulty.town_council_tolerance][type]; - if (GetRating(t) < 16 + modemod && !(flags & DC_NO_TOWN_RATING)) { + if (GetRating(t) < 16 + modemod && !(flags & DC_NO_TEST_TOWN_RATING)) { SetDParam(0, t->index); _error_message = STR_2009_LOCAL_AUTHORITY_REFUSES; return false; |