mirror of https://github.com/OpenTTD/OpenTTD
Merge branch 'ilmikko-town-rename' into allow-town-rename-mp
commit
8bbd817307
|
@ -536,6 +536,7 @@ struct EconomySettings {
|
|||
TownCargoGenMode town_cargogen_mode; ///< algorithm for generating cargo from houses, @see TownCargoGenMode
|
||||
bool allow_town_roads; ///< towns are allowed to build roads (always allowed when generating world / in SE)
|
||||
TownFounding found_town; ///< town founding.
|
||||
bool town_renaming_allowed; ///< users can rename towns, even in multiplayer
|
||||
PlaceHouses place_houses; ///< players are allowed to place town houses.
|
||||
bool station_noise_level; ///< build new airports when the town noise level is still within accepted limits
|
||||
uint16_t town_noise_population[4]; ///< population to base decision on noise evaluation (@see town_council_tolerance)
|
||||
|
|
|
@ -383,7 +383,11 @@ public:
|
|||
nvp->InitializeViewport(this, this->town->xy, ScaleZoomGUI(ZOOM_LVL_TOWN));
|
||||
|
||||
/* disable renaming town in network games if you are not the server */
|
||||
this->SetWidgetDisabledState(WID_TV_CHANGE_NAME, _networking && !_network_server);
|
||||
bool renaming_disabled = _networking && !_network_server;
|
||||
if (_settings_game.economy.town_renaming_allowed) {
|
||||
renaming_disabled = false;
|
||||
}
|
||||
this->SetWidgetDisabledState(WID_TV_CHANGE_NAME, renaming_disabled);
|
||||
}
|
||||
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
|
|
Loading…
Reference in New Issue