Allow overriding town settings on a per-town basis

Add a setting for whether this is allowed for non-privileged
multiplayer clients
This commit is contained in:
Jonathan G Rennison
2022-10-23 22:07:51 +01:00
parent e1defedb2a
commit a8361cd608
14 changed files with 331 additions and 30 deletions

View File

@@ -27,6 +27,7 @@ static bool TownCouncilToleranceAdjust(int32 &new_value);
static void DifficultyNoiseChange(int32 new_value);
static void DifficultyMoneyCheatMultiplayerChange(int32 new_value);
static void DifficultyRenameTownsMultiplayerChange(int32 new_value);
static void DifficultyOverrideTownSettingsMultiplayerChange(int32 new_value);
static void MaxNoAIsChange(int32 new_value);
static bool CheckRoadSide(int32 &new_value);
static void RoadSideChanged(int32 new_value);
@@ -476,6 +477,15 @@ post_cb = DifficultyRenameTownsMultiplayerChange
cat = SC_EXPERT
patxname = ""cheat.difficulty.rename_towns_in_multiplayer""
[SDT_BOOL]
var = difficulty.override_town_settings_in_multiplayer
def = false
str = STR_CONFIG_SETTING_OVERRIDE_TOWN_SETTINGS_MULTIPLAYER
strhelp = STR_CONFIG_SETTING_OVERRIDE_TOWN_SETTINGS_MULTIPLAYER_HELPTEXT
post_cb = DifficultyOverrideTownSettingsMultiplayerChange
cat = SC_EXPERT
patxname = ""cheat.difficulty.override_town_settings_in_multiplayer""
[SDTG_VAR]
name = ""diff_level""
var = _old_diff_level