Fix #11137: assertion failure due to interpreting string as number

This commit is contained in:
Rubidium 2023-07-14 22:51:46 +02:00 committed by rubidium42
parent e4be7f4a45
commit a184e7f793
3 changed files with 7 additions and 6 deletions

View File

@ -1234,6 +1234,8 @@ STR_CONFIG_SETTING_HORIZONTAL_POS_LEFT :Left
STR_CONFIG_SETTING_HORIZONTAL_POS_CENTER :Centre
STR_CONFIG_SETTING_HORIZONTAL_POS_RIGHT :Right
STR_CONFIG_SETTING_SECONDS_VALUE :{COMMA}{NBSP}second{P 0 "" s}
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}
@ -1449,7 +1451,6 @@ STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Minimal amount
STR_CONFIG_SETTING_ERRMSG_DURATION :Duration of error message: {STRING2}
STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT :Duration for displaying error messages in a red window. Note that some (critical) error messages are not closed automatically after this time, but must be closed manually
STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE :{COMMA} second{P 0 "" s}
STR_CONFIG_SETTING_HOVER_DELAY :Show tooltips: {STRING2}
STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Delay before tooltips are displayed when hovering the mouse over some interface element. Alternatively tooltips are bound to the right mouse button when this value is set to 0.
@ -1946,9 +1947,9 @@ STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :None
STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Initial city size multiplier: {STRING2}
STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Average size of cities relative to normal towns at start of the game
STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL :Update distribution graph every {STRING2}{NBSP}second{P 0:2 "" s}
STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL :Update distribution graph every {STRING2}
STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL_HELPTEXT :Time between subsequent recalculations of the link graph. Each recalculation calculates the plans for one component of the graph. That means that a value X for this setting does not mean the whole graph will be updated every X seconds. Only some component will. The shorter you set it the more CPU time will be necessary to calculate it. The longer you set it the longer it will take until the cargo distribution starts on new routes.
STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME :Take {STRING2}{NBSP}second{P 0:2 "" s} for recalculation of distribution graph
STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME :Take {STRING2} for recalculation of distribution graph
STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME_HELPTEXT :Time taken for each recalculation of a link graph component. When a recalculation is started, a thread is spawned which is allowed to run for this number of seconds. The shorter you set this the more likely it is that the thread is not finished when it's supposed to. Then the game stops until it is ("lag"). The longer you set it the longer it takes for the distribution to be updated when routes change.
STR_CONFIG_SETTING_DISTRIBUTION_PAX :Distribution mode for passengers: {STRING2}

View File

@ -169,7 +169,7 @@ min = 0
max = 20
str = STR_CONFIG_SETTING_ERRMSG_DURATION
strhelp = STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT
strval = STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE
strval = STR_CONFIG_SETTING_SECONDS_VALUE
[SDTC_VAR]
var = gui.hover_delay_ms

View File

@ -42,7 +42,7 @@ min = 4
max = 90
interval = 1
str = STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL
strval = STR_JUST_COMMA
strval = STR_CONFIG_SETTING_SECONDS_VALUE
strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL_HELPTEXT
extra = offsetof(LinkGraphSettings, recalc_interval)
@ -55,7 +55,7 @@ min = 1
max = 9000
interval = 1
str = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME
strval = STR_JUST_COMMA
strval = STR_CONFIG_SETTING_SECONDS_VALUE
strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME_HELPTEXT
extra = offsetof(LinkGraphSettings, recalc_time)