Merge branch 'master' into jgrpp
This commit is contained in:
@@ -823,7 +823,7 @@ static CommandCost ClearTile_Town(TileIndex tile, DoCommandFlag flags)
|
||||
&& !(flags & DC_NO_TEST_TOWN_RATING)
|
||||
&& !_cheats.magic_bulldozer.value
|
||||
&& !_extra_cheats.town_rating.value
|
||||
&& _settings_game.difficulty.town_council_tolerance != TOWN_COUNCIL_INDIFFERENT) {
|
||||
&& _settings_game.difficulty.town_council_tolerance != TOWN_COUNCIL_PERMISSIVE) {
|
||||
SetDParam(0, t->index);
|
||||
return_cmd_error(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS);
|
||||
}
|
||||
@@ -3953,12 +3953,15 @@ static void UpdateTownUnwanted(Town *t)
|
||||
*/
|
||||
CommandCost CheckIfAuthorityAllowsNewStation(TileIndex tile, DoCommandFlag flags)
|
||||
{
|
||||
/* The required rating is hardcoded to RATING_VERYPOOR (see below), not the authority attitude setting, so we can bail out like this. */
|
||||
if (_settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_PERMISSIVE) return CommandCost();
|
||||
|
||||
if (!Company::IsValidID(_current_company) || (flags & DC_NO_TEST_TOWN_RATING)) return CommandCost();
|
||||
|
||||
Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
|
||||
if (t == nullptr) return CommandCost();
|
||||
|
||||
if (t->ratings[_current_company] > RATING_VERYPOOR || _settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_INDIFFERENT) return CommandCost();
|
||||
if (t->ratings[_current_company] > RATING_VERYPOOR || _settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_PERMISSIVE) return CommandCost();
|
||||
|
||||
SetDParam(0, t->index);
|
||||
return_cmd_error(STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS);
|
||||
@@ -4140,14 +4143,14 @@ CommandCost CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
if (_settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_INDIFFERENT) {
|
||||
if (_settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_PERMISSIVE) {
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
/* minimum rating needed to be allowed to remove stuff */
|
||||
static const int needed_rating[][TOWN_RATING_CHECK_TYPE_COUNT] = {
|
||||
/* ROAD_REMOVE, TUNNELBRIDGE_REMOVE */
|
||||
{ RATING_ROAD_NEEDED_PERMISSIVE, RATING_TUNNEL_BRIDGE_NEEDED_PERMISSIVE}, // Permissive
|
||||
{ RATING_ROAD_NEEDED_LENIENT, RATING_TUNNEL_BRIDGE_NEEDED_LENIENT}, // Lenient
|
||||
{ RATING_ROAD_NEEDED_NEUTRAL, RATING_TUNNEL_BRIDGE_NEEDED_NEUTRAL}, // Neutral
|
||||
{ RATING_ROAD_NEEDED_HOSTILE, RATING_TUNNEL_BRIDGE_NEEDED_HOSTILE}, // Hostile
|
||||
};
|
||||
|
Reference in New Issue
Block a user