1
0
Fork 0

Feature: Infinite money mode

pull/11902/head
merni-ns 2024-01-27 23:09:48 +05:30
parent d3c673e20b
commit cb0d4ab97b
4 changed files with 13 additions and 0 deletions

View File

@ -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_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 :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_HELPTEXT :Maximum amount a company can loan (without taking inflation into account)
STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE :{CURRENCY_LONG} STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE :{CURRENCY_LONG}

View File

@ -2117,6 +2117,7 @@ static SettingsContainer &GetSettingsTree()
SettingsPage *accounting = main->Add(new SettingsPage(STR_CONFIG_SETTING_ACCOUNTING)); 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("economy.inflation"));
accounting->Add(new SettingEntry("difficulty.initial_interest")); accounting->Add(new SettingEntry("difficulty.initial_interest"));
accounting->Add(new SettingEntry("difficulty.max_loan")); accounting->Add(new SettingEntry("difficulty.max_loan"));

View File

@ -114,6 +114,7 @@ struct DifficultySettings {
bool line_reverse_mode; ///< reversing at stations or not bool line_reverse_mode; ///< reversing at stations or not
bool disasters; ///< are disasters enabled bool disasters; ///< are disasters enabled
byte town_council_tolerance; ///< minimum required town ratings to be allowed to demolish stuff 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. */ /** Settings relating to viewport/smallmap scrolling. */

View File

@ -294,3 +294,11 @@ min = 0
max = 3 max = 3
cat = SC_BASIC 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); }