1
0
Fork 0

Update difficulty_settings.ini: replaced max_loan with max_loan_percentage

and made max_loan update after the percentage is changed
pull/12974/head
AviationGamerX 2024-09-17 01:01:48 +03:00 committed by GitHub
parent 220c7ea108
commit f883bd67bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 8 deletions

View File

@ -8,7 +8,7 @@
; and in the savegame PATS chunk. ; and in the savegame PATS chunk.
[pre-amble] [pre-amble]
const std::array<std::string, GAME_DIFFICULTY_NUM> _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<std::string, GAME_DIFFICULTY_NUM> _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]; uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM];
uint8_t _old_diff_level; ///< Old difficulty level from old savegames uint8_t _old_diff_level; ///< Old difficulty level from old savegames
@ -106,15 +106,16 @@ strval = STR_FUNDING_ONLY
cat = SC_BASIC cat = SC_BASIC
[SDT_VAR] [SDT_VAR]
var = difficulty.max_loan var = difficulty.max_loan_percentage
type = SLE_UINT32 type = SLE_UINT32
from = SLV_97 from = SLV_97
flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO | SF_GUI_CURRENCY | SF_GUI_0_IS_SPECIAL flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO | SF_GUI_0_IS_SPECIAL
def = 300000 def = 100
min = LOAN_INTERVAL min = 10
max = MAX_LOAN_LIMIT max = 6000000
pre_cb = [](auto &new_value) { new_value = (new_value + LOAN_INTERVAL / 2) / LOAN_INTERVAL * LOAN_INTERVAL; return true; } pre_cb = [](auto &new_value) { new_value = (new_value + 10 / 2) / 10 * 10; return true; }
interval = LOAN_INTERVAL 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 str = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN
strhelp = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT strhelp = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT
strval = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE strval = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_VALUE