Allow various settings to be changed in multiplayer

If the corresponding TTDPatch flag bit has not been observed by a NewGRF
This commit is contained in:
Jonathan G Rennison
2022-11-10 22:34:14 +00:00
parent 2f4f862480
commit 2af2c56d19
4 changed files with 40 additions and 8 deletions

View File

@@ -1701,6 +1701,17 @@ static void TownZoneCustomValueChanged(int32 new_value)
if (_settings_game.economy.town_zone_calc_mode) UpdateTownRadii();
}
static bool CheckTTDPatchSettingFlag(uint flag)
{
extern bool HasTTDPatchFlagBeenObserved(uint flag);
if (_networking && HasTTDPatchFlagBeenObserved(flag)) {
ShowErrorMessage(STR_CONFIG_SETTING_NETWORK_CHANGE_NOT_ALLOWED, STR_CONFIG_SETTING_NETWORK_CHANGE_NOT_ALLOWED_NEWGRF, WL_ERROR);
return false;
}
return true;
}
/**
* Replace a passwords that are a literal asterisk with an empty string.
* @param newval The new string value for this password field.