diff --git a/src/lang/english.txt b/src/lang/english.txt index be42f92e57..c44810e834 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1275,6 +1275,9 @@ STR_CONFIG_SETTING_HORIZONTAL_POS_RIGHT :Right STR_CONFIG_SETTING_SECONDS_VALUE :{COMMA}{NBSP}second{P 0 "" s} +STR_CONFIG_SETTING_INFINITE_MONEY :Infinite money: {STRING2} +STR_CONFIG_SETTING_INFINITE_MONEY_HELPTEXT :Allow unlimited spending and disable bankruptcy of companies + STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN :Maximum initial loan: {STRING2} STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Maximum amount a company can loan (without taking inflation into account) STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE :{CURRENCY_LONG} diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 7e4302d990..09e83b8a15 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -2117,6 +2117,7 @@ static SettingsContainer &GetSettingsTree() SettingsPage *accounting = main->Add(new SettingsPage(STR_CONFIG_SETTING_ACCOUNTING)); { + accounting->Add(new SettingEntry("difficulty.infinite_money")); accounting->Add(new SettingEntry("economy.inflation")); accounting->Add(new SettingEntry("difficulty.initial_interest")); accounting->Add(new SettingEntry("difficulty.max_loan")); diff --git a/src/settings_type.h b/src/settings_type.h index e9c6a60038..8a601b28b7 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -114,6 +114,7 @@ struct DifficultySettings { bool line_reverse_mode; ///< reversing at stations or not bool disasters; ///< are disasters enabled byte town_council_tolerance; ///< minimum required town ratings to be allowed to demolish stuff + bool infinite_money; ///< whether spending money despite negative balance is allowed }; /** Settings relating to viewport/smallmap scrolling. */ diff --git a/src/table/settings/difficulty_settings.ini b/src/table/settings/difficulty_settings.ini index 0c95a576c0..1dfacdb16a 100644 --- a/src/table/settings/difficulty_settings.ini +++ b/src/table/settings/difficulty_settings.ini @@ -294,3 +294,11 @@ min = 0 max = 3 cat = SC_BASIC +[SDT_BOOL] +var = difficulty.infinite_money +def = false +str = STR_CONFIG_SETTING_INFINITE_MONEY +strhelp = STR_CONFIG_SETTING_INFINITE_MONEY_HELPTEXT +cat = SC_BASIC +post_cb = [](auto) { SetWindowDirty(WC_STATUS_BAR, 0); } +