summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings.cpp11
-rw-r--r--src/table/settings.h5
2 files changed, 14 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index aed2e9206..5d4e713be 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -921,6 +921,17 @@ static bool InvalidateIndustryViewWindow(int32 p1)
return true;
}
+/**
+ * Update the town authority window after a town authority setting change.
+ * @param p1 Unused.
+ * @return Always true.
+ */
+static bool RedrawTownAuthority(int32 p1)
+{
+ SetWindowClassesDirty(WC_TOWN_AUTHORITY);
+ return true;
+}
+
/*
* A: competitors
* B: competitor start time. Deprecated since savegame version 110.
diff --git a/src/table/settings.h b/src/table/settings.h
index 97adf9d7f..fc3b9c234 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -42,6 +42,7 @@ static bool InvalidateVehTimetableWindow(int32 p1);
static bool InvalidateCompanyLiveryWindow(int32 p1);
static bool InvalidateNewGRFChangeWindows(int32 p1);
static bool InvalidateIndustryViewWindow(int32 p1);
+static bool RedrawTownAuthority(int32 p1);
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1);
@@ -448,8 +449,8 @@ const SettingDesc _settings[] = {
SDT_CONDVAR(GameSettings, construction.industry_platform, SLE_UINT8,148, SL_MAX_VERSION, 0, 0, 1, 0, 4, 0, STR_CONFIG_SETTING_INDUSTRY_PLATFORM, NULL),
SDT_BOOL(GameSettings, economy.multiple_industry_per_town, 0, 0, false, STR_CONFIG_SETTING_MULTIPINDTOWN, NULL),
SDT_CONDNULL( 1, 0, 140),
- SDT_BOOL(GameSettings, economy.bribe, 0, 0, true, STR_CONFIG_SETTING_BRIBE, NULL),
- SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL),
+ SDT_BOOL(GameSettings, economy.bribe, 0, 0, true, STR_CONFIG_SETTING_BRIBE, RedrawTownAuthority),
+ SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, RedrawTownAuthority),
SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL),
SDT_VAR(GameSettings, game_creation.snow_line_height, SLE_UINT8, 0, 0, DEF_SNOWLINE_HEIGHT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL),
SDT_CONDNULL( 4, 0, 143),