diff --git a/src/table/settings/difficulty_settings.ini b/src/table/settings/difficulty_settings.ini index 4e8e1044a9..358e613cef 100644 --- a/src/table/settings/difficulty_settings.ini +++ b/src/table/settings/difficulty_settings.ini @@ -8,7 +8,7 @@ ; and in the savegame PATS chunk. [pre-amble] -const std::array _old_diff_settings{"max_no_competitors", "competitor_start_time", "number_towns", "industry_density", "max_loan", "initial_interest", "vehicle_costs", "competitor_speed", "competitor_intelligence", "vehicle_breakdowns", "subsidy_multiplier", "construction_cost", "terrain_type", "quantity_sea_lakes", "economy", "line_reverse_mode", "disasters", "town_council_tolerance"}; +const std::array _old_diff_settings{"max_no_competitors", "competitor_start_time", "number_towns", "industry_density", "max_loan_percentage", "initial_interest", "vehicle_costs", "competitor_speed", "competitor_intelligence", "vehicle_breakdowns", "subsidy_multiplier", "construction_cost", "terrain_type", "quantity_sea_lakes", "economy", "line_reverse_mode", "disasters", "town_council_tolerance"}; uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM]; uint8_t _old_diff_level; ///< Old difficulty level from old savegames @@ -106,15 +106,16 @@ strval = STR_FUNDING_ONLY cat = SC_BASIC [SDT_VAR] -var = difficulty.max_loan +var = difficulty.max_loan_percentage type = SLE_UINT32 from = SLV_97 -flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO | SF_GUI_CURRENCY | SF_GUI_0_IS_SPECIAL -def = 300000 -min = LOAN_INTERVAL -max = MAX_LOAN_LIMIT -pre_cb = [](auto &new_value) { new_value = (new_value + LOAN_INTERVAL / 2) / LOAN_INTERVAL * LOAN_INTERVAL; return true; } -interval = LOAN_INTERVAL +flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO | SF_GUI_0_IS_SPECIAL +def = 100 +min = 10 +max = 6000000 +pre_cb = [](auto &new_value) { new_value = (new_value + 10 / 2) / 10 * 10; return true; } +post_cb = [](auto &new_value) { difficulity.max_loan = ((new_value/100)* 300000) * GetCurrency().rate; return true;} +interval = 10 str = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN strhelp = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT strval = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE