Update to 14.0-beta1
This commit is contained in:
@@ -8,16 +8,17 @@
|
||||
; company changes them, it changes for all players.
|
||||
|
||||
[pre-amble]
|
||||
static void UpdateAllServiceInterval(int32 new_value);
|
||||
static bool CanUpdateServiceInterval(VehicleType type, int32 &new_value);
|
||||
static void UpdateServiceInterval(VehicleType type, int32 new_value);
|
||||
static void UpdateAllServiceInterval(int32_t new_value);
|
||||
static bool CanUpdateServiceInterval(VehicleType type, int32_t &new_value);
|
||||
static void UpdateServiceInterval(VehicleType type, int32_t new_value);
|
||||
static void SettingsValueAbsolute(const IntSettingDesc &sd, uint first_param, int32_t value);
|
||||
|
||||
static const SettingVariant _company_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for CompanySettings.$var exceeds storage size");
|
||||
@@ -30,6 +31,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -49,13 +53,14 @@ cat = SC_BASIC
|
||||
[SDT_VAR]
|
||||
var = engine_renew_months
|
||||
type = SLE_INT16
|
||||
flags = SF_PER_COMPANY | SF_GUI_NEGATIVE_IS_SPECIAL
|
||||
flags = SF_PER_COMPANY
|
||||
def = 6
|
||||
min = -12
|
||||
max = 12
|
||||
str = STR_CONFIG_SETTING_AUTORENEW_MONTHS
|
||||
strhelp = STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE
|
||||
val_cb = SettingsValueAbsolute
|
||||
|
||||
[SDT_VAR]
|
||||
var = engine_renew_money
|
||||
@@ -83,9 +88,10 @@ post_cb = UpdateAllServiceInterval
|
||||
var = vehicle.servint_trains
|
||||
type = SLE_UINT16
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
def = DEF_SERVINT_DAYS_TRAINS
|
||||
min = MIN_SERVINT_MINUTES
|
||||
max = MAX_SERVINT_DAYS
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SERVINT_TRAINS
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
@@ -96,9 +102,10 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_TRAIN, new_value); }
|
||||
var = vehicle.servint_roadveh
|
||||
type = SLE_UINT16
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 150
|
||||
min = 5
|
||||
max = 800
|
||||
def = DEF_SERVINT_DAYS_ROADVEH
|
||||
min = MIN_SERVINT_MINUTES
|
||||
max = MAX_SERVINT_DAYS
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
@@ -109,9 +116,10 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_ROAD, new_value); }
|
||||
var = vehicle.servint_ships
|
||||
type = SLE_UINT16
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 360
|
||||
min = 5
|
||||
max = 800
|
||||
def = DEF_SERVINT_DAYS_SHIPS
|
||||
min = MIN_SERVINT_MINUTES
|
||||
max = MAX_SERVINT_DAYS
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SERVINT_SHIPS
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
@@ -122,9 +130,10 @@ post_cb = [](auto new_value) { UpdateServiceInterval(VEH_SHIP, new_value); }
|
||||
var = vehicle.servint_aircraft
|
||||
type = SLE_UINT16
|
||||
flags = SF_PER_COMPANY | SF_GUI_0_IS_SPECIAL
|
||||
def = 100
|
||||
min = 5
|
||||
max = 800
|
||||
def = DEF_SERVINT_DAYS_AIRCRAFT
|
||||
min = MIN_SERVINT_MINUTES
|
||||
max = MAX_SERVINT_DAYS
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SERVINT_AIRCRAFT
|
||||
strhelp = STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_SERVINT_VALUE
|
||||
|
||||
@@ -11,7 +11,7 @@ static const SettingVariant _currency_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_SSTR = SDT_SSTR(CurrencySpec, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
@@ -25,6 +25,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -50,8 +53,8 @@ cat = SC_BASIC
|
||||
var = to_euro
|
||||
type = SLE_INT32
|
||||
def = 0
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR
|
||||
|
||||
[SDT_SSTR]
|
||||
var = prefix
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
[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"};
|
||||
|
||||
uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8 _old_diff_level; ///< Old difficulty level from old savegames
|
||||
uint16_t _old_diff_custom[GAME_DIFFICULTY_NUM];
|
||||
uint8_t _old_diff_level; ///< Old difficulty level from old savegames
|
||||
|
||||
static void DifficultyNoiseChange(int32 new_value);
|
||||
static void MaxNoAIsChange(int32 new_value);
|
||||
static void DifficultyNoiseChange(int32_t new_value);
|
||||
static void MaxNoAIsChange(int32_t new_value);
|
||||
|
||||
static const SettingVariant _difficulty_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -36,6 +36,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -57,6 +60,15 @@ interval = 1
|
||||
post_cb = MaxNoAIsChange
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = difficulty.competitors_interval
|
||||
type = SLE_UINT16
|
||||
from = SLV_AI_START_DATE
|
||||
def = 10
|
||||
min = MIN_COMPETITORS_INTERVAL
|
||||
max = MAX_COMPETITORS_INTERVAL
|
||||
interval = 1
|
||||
|
||||
[SDT_VAR]
|
||||
var = difficulty.competitor_start_time
|
||||
type = SLE_UINT8
|
||||
@@ -99,7 +111,7 @@ from = SLV_97
|
||||
flags = SF_NEWGAME_ONLY | SF_SCENEDIT_TOO | SF_GUI_CURRENCY | SF_GUI_0_IS_SPECIAL
|
||||
def = 300000
|
||||
min = LOAN_INTERVAL
|
||||
max = 2000000000
|
||||
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
|
||||
str = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN
|
||||
@@ -195,6 +207,7 @@ max = 5000
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SUBSIDY_DURATION
|
||||
strhelp = STR_CONFIG_SETTING_SUBSIDY_DURATION_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
strval = STR_CONFIG_SETTING_SUBSIDY_DURATION_VALUE
|
||||
|
||||
[SDT_VAR]
|
||||
@@ -285,3 +298,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); }
|
||||
|
||||
|
||||
@@ -8,14 +8,16 @@
|
||||
; and in the savegame PATS chunk.
|
||||
|
||||
[pre-amble]
|
||||
static void TownFoundingChanged(int32 new_value);
|
||||
static void TownFoundingChanged(int32_t new_value);
|
||||
static void ChangeTimekeepingUnits(int32_t new_value);
|
||||
static void ChangeMinutesPerYear(int32_t new_value);
|
||||
|
||||
static const SettingVariant _economy_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -28,6 +30,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -123,6 +128,7 @@ var = economy.bribe
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_BRIBE
|
||||
strhelp = STR_CONFIG_SETTING_BRIBE_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_TOWN_AUTHORITY); }
|
||||
cat = SC_BASIC
|
||||
|
||||
@@ -132,6 +138,7 @@ from = SLV_79
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_ALLOW_EXCLUSIVE
|
||||
strhelp = STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_TOWN_AUTHORITY); }
|
||||
cat = SC_BASIC
|
||||
|
||||
@@ -174,26 +181,6 @@ strval = STR_CONFIG_SETTING_ECONOMY_TYPE_ORIGINAL
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_INDUSTRY_VIEW); }
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_BOOL]
|
||||
var = economy.allow_shares
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_ALLOW_SHARES
|
||||
strhelp = STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_COMPANY); }
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.min_years_for_shares
|
||||
type = SLE_UINT8
|
||||
from = SLV_TRADING_AGE
|
||||
def = 6
|
||||
min = 0
|
||||
max = 255
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES
|
||||
strhelp = STR_CONFIG_SETTING_MIN_YEARS_FOR_SHARES_HELPTEXT
|
||||
strval = STR_JUST_INT
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.feeder_payment_share
|
||||
type = SLE_UINT8
|
||||
@@ -300,3 +287,57 @@ str = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE
|
||||
strhelp = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_COMPANY_INFRASTRUCTURE); }
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.timekeeping_units
|
||||
type = SLE_UINT8
|
||||
flags = SF_GUI_DROPDOWN | SF_NEWGAME_ONLY | SF_SCENEDIT_TOO
|
||||
def = TKU_CALENDAR
|
||||
min = TKU_CALENDAR
|
||||
max = TKU_WALLCLOCK
|
||||
str = STR_CONFIG_SETTING_TIMEKEEPING_UNITS
|
||||
strval = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR
|
||||
strhelp = STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT
|
||||
post_cb = ChangeTimekeepingUnits
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.minutes_per_calendar_year
|
||||
type = SLE_UINT16
|
||||
flags = SF_GUI_0_IS_SPECIAL | SF_NO_NETWORK
|
||||
def = CalendarTime::DEF_MINUTES_PER_YEAR
|
||||
min = CalendarTime::FROZEN_MINUTES_PER_YEAR
|
||||
max = CalendarTime::MAX_MINUTES_PER_YEAR
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_MINUTES_PER_YEAR
|
||||
strhelp = STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE
|
||||
pre_cb = [](auto) { return _game_mode == GM_MENU || _settings_game.economy.timekeeping_units == 1; }
|
||||
post_cb = ChangeMinutesPerYear
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.town_cargo_scale
|
||||
type = SLE_UINT16
|
||||
flags = SF_NO_NETWORK
|
||||
def = DEF_CARGO_SCALE
|
||||
min = MIN_CARGO_SCALE
|
||||
max = MAX_CARGO_SCALE
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_TOWN_CARGO_SCALE
|
||||
strhelp = STR_CONFIG_SETTING_TOWN_CARGO_SCALE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_CARGO_SCALE_VALUE
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = economy.industry_cargo_scale
|
||||
type = SLE_UINT16
|
||||
flags = SF_NO_NETWORK
|
||||
def = DEF_CARGO_SCALE
|
||||
min = MIN_CARGO_SCALE
|
||||
max = MAX_CARGO_SCALE
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE
|
||||
strhelp = STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_CARGO_SCALE_VALUE
|
||||
cat = SC_BASIC
|
||||
|
||||
@@ -11,27 +11,27 @@
|
||||
[pre-amble]
|
||||
static constexpr std::initializer_list<const char*> _roadsides{"left", "right"};
|
||||
|
||||
static void StationSpreadChanged(int32 new_value);
|
||||
static void UpdateConsists(int32 new_value);
|
||||
static void TrainAccelerationModelChanged(int32 new_value);
|
||||
static void RoadVehAccelerationModelChanged(int32 new_value);
|
||||
static void TrainSlopeSteepnessChanged(int32 new_value);
|
||||
static void RoadVehSlopeSteepnessChanged(int32 new_value);
|
||||
static bool CheckRoadSide(int32 &new_value);
|
||||
static bool CheckDynamicEngines(int32 &new_value);
|
||||
static void StationCatchmentChanged(int32 new_value);
|
||||
static void MaxVehiclesChanged(int32 new_value);
|
||||
static void StationSpreadChanged(int32_t new_value);
|
||||
static void UpdateConsists(int32_t new_value);
|
||||
static void TrainAccelerationModelChanged(int32_t new_value);
|
||||
static void RoadVehAccelerationModelChanged(int32_t new_value);
|
||||
static void TrainSlopeSteepnessChanged(int32_t new_value);
|
||||
static void RoadVehSlopeSteepnessChanged(int32_t new_value);
|
||||
static bool CheckRoadSide(int32_t &new_value);
|
||||
static bool CheckDynamicEngines(int32_t &new_value);
|
||||
static void StationCatchmentChanged(int32_t new_value);
|
||||
static void MaxVehiclesChanged(int32_t new_value);
|
||||
|
||||
static const SettingVariant _game_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -46,6 +46,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -78,6 +81,13 @@ str = STR_CONFIG_SETTING_SERVICEATHELIPAD
|
||||
strhelp = STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDT_BOOL]
|
||||
var = order.station_length_loading_penalty
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY
|
||||
strhelp = STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDT_BOOL]
|
||||
var = order.gradual_loading
|
||||
from = SLV_40
|
||||
@@ -221,7 +231,7 @@ var = vehicle.smoke_amount
|
||||
type = SLE_UINT8
|
||||
from = SLV_145
|
||||
flags = SF_GUI_DROPDOWN
|
||||
def = 1
|
||||
def = 2
|
||||
min = 0
|
||||
max = 2
|
||||
str = STR_CONFIG_SETTING_SMOKE_AMOUNT
|
||||
|
||||
@@ -7,26 +7,27 @@
|
||||
; GUI settings as stored in the main configuration file ("openttd.cfg").
|
||||
|
||||
[pre-amble]
|
||||
static void v_PositionMainToolbar(int32 new_value);
|
||||
static void v_PositionStatusbar(int32 new_value);
|
||||
static void RedrawSmallmap(int32 new_value);
|
||||
static void UpdateLinkgraphColours(int32 new_value);
|
||||
static void InvalidateCompanyLiveryWindow(int32 new_value);
|
||||
static void InvalidateNewGRFChangeWindows(int32 new_value);
|
||||
static void ZoomMinMaxChanged(int32 new_value);
|
||||
static void SpriteZoomMinChanged(int32 new_value);
|
||||
static bool CanChangeTimetableMode(int32_t &new_value);
|
||||
static void v_PositionMainToolbar(int32_t new_value);
|
||||
static void v_PositionStatusbar(int32_t new_value);
|
||||
static void RedrawSmallmap(int32_t new_value);
|
||||
static void UpdateLinkgraphColours(int32_t new_value);
|
||||
static void InvalidateCompanyLiveryWindow(int32_t new_value);
|
||||
static void InvalidateNewGRFChangeWindows(int32_t new_value);
|
||||
static void ZoomMinMaxChanged(int32_t new_value);
|
||||
static void SpriteZoomMinChanged(int32_t new_value);
|
||||
|
||||
static constexpr std::initializer_list<const char*> _autosave_interval{"off", "monthly", "quarterly", "half year", "yearly"};
|
||||
static constexpr std::initializer_list<const char*> _osk_activation{"disabled", "double", "single", "immediately"};
|
||||
static constexpr std::initializer_list<const char*> _savegame_date{"long", "short", "iso"};
|
||||
static constexpr std::initializer_list<const char*> _right_click_close{"no", "yes", "except sticky"};
|
||||
|
||||
static const SettingVariant _gui_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -40,6 +41,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -48,17 +52,13 @@ extra = 0
|
||||
startup = false
|
||||
|
||||
|
||||
[SDTC_OMANY]
|
||||
var = gui.autosave
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 1
|
||||
max = 4
|
||||
full = _autosave_interval
|
||||
str = STR_CONFIG_SETTING_AUTOSAVE
|
||||
strhelp = STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT
|
||||
strval = STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF
|
||||
cat = SC_BASIC
|
||||
[SDTC_VAR]
|
||||
var = gui.autosave_interval
|
||||
type = SLE_UINT32
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 10
|
||||
min = 0
|
||||
max = 1440
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.threaded_saves
|
||||
@@ -82,7 +82,9 @@ var = gui.show_finances
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_SHOWFINANCES
|
||||
str_cb = SettingTitleWallclock
|
||||
strhelp = STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_VAR]
|
||||
@@ -126,16 +128,21 @@ cat = SC_BASIC
|
||||
[SDTC_BOOL]
|
||||
var = gui.smooth_scroll
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_SMOOTH_SCROLLING
|
||||
strhelp = STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.right_mouse_wnd_close
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
[SDTC_OMANY]
|
||||
var = gui.right_click_wnd_close
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = RCC_NO
|
||||
min = RCC_NO
|
||||
max = RCC_YES_EXCEPT_STICKY
|
||||
full = _right_click_close
|
||||
str = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE
|
||||
strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_NO
|
||||
cat = SC_BASIC
|
||||
|
||||
; We might need to emulate a right mouse button on mac
|
||||
@@ -169,7 +176,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
|
||||
@@ -348,6 +355,17 @@ str = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR
|
||||
strhelp = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT
|
||||
strval = STR_COLOUR_DARK_BLUE
|
||||
|
||||
[SDTC_VAR]
|
||||
var = gui.starting_colour_secondary
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = COLOUR_END
|
||||
min = 0
|
||||
max = COLOUR_END
|
||||
str = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_SECONDARY
|
||||
strhelp = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_SECONDARY_HELPTEXT
|
||||
strval = STR_COLOUR_SECONDARY_DARK_BLUE
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.auto_remove_signals
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
@@ -408,14 +426,19 @@ str = STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS
|
||||
strhelp = STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_COMPANIES_OFF
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.timetable_in_ticks
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
str = STR_CONFIG_SETTING_TIMETABLE_IN_TICKS
|
||||
strhelp = STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT
|
||||
[SDTC_VAR]
|
||||
var = gui.timetable_mode
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 0
|
||||
min = 0
|
||||
max = 2
|
||||
str = STR_CONFIG_SETTING_TIMETABLE_MODE
|
||||
strhelp = STR_CONFIG_SETTING_TIMETABLE_MODE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_TIMETABLE_MODE_DAYS
|
||||
pre_cb = CanChangeTimetableMode
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_VEHICLE_TIMETABLE, VIWD_MODIFY_ORDERS); }
|
||||
cat = SC_EXPERT
|
||||
cat = SC_ADVANCED
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.timetable_arrival_departure
|
||||
@@ -484,8 +507,8 @@ var = gui.coloured_news_year
|
||||
type = SLE_INT32
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 2000
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_COLOURED_NEWS_YEAR
|
||||
strhelp = STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT
|
||||
@@ -496,13 +519,13 @@ cat = SC_EXPERT
|
||||
var = gui.cycle_signal_types
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 0
|
||||
min = 0
|
||||
max = 1
|
||||
def = SIGNAL_CYCLE_GROUP
|
||||
min = SIGNAL_CYCLE_GROUP
|
||||
max = SIGNAL_CYCLE_ALL
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES
|
||||
strhelp = STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS
|
||||
strval = STR_CONFIG_SETTING_CYCLE_SIGNAL_GROUP
|
||||
cat = SC_ADVANCED
|
||||
|
||||
[SDTC_VAR]
|
||||
@@ -531,8 +554,8 @@ var = gui.semaphore_build_before
|
||||
type = SLE_INT32
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 1950
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE
|
||||
strhelp = STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT
|
||||
@@ -545,6 +568,7 @@ flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_WARN_INCOME_LESS
|
||||
strhelp = STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_VAR]
|
||||
@@ -578,13 +602,14 @@ cat = SC_BASIC
|
||||
var = gui.stop_location
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 2
|
||||
def = 1
|
||||
min = 0
|
||||
max = 2
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_STOP_LOCATION
|
||||
strhelp = STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END
|
||||
post_cb = [](auto) { SetWindowClassesDirty(WC_VEHICLE_ORDERS); }
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_BOOL]
|
||||
@@ -675,7 +700,7 @@ cat = SC_BASIC
|
||||
var = gui.station_gui_group_order
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 0
|
||||
def = 3
|
||||
min = 0
|
||||
max = 5
|
||||
interval = 1
|
||||
@@ -779,7 +804,7 @@ cat = SC_EXPERT
|
||||
var = gui.ai_developer_tools
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_AI_SETTINGS); }
|
||||
post_cb = [](auto) { InvalidateWindowClassesData(WC_GAME_OPTIONS); InvalidateWindowClassesData(WC_SCRIPT_DEBUG); InvalidateWindowClassesData(WC_SCRIPT_SETTINGS); }
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_BOOL]
|
||||
|
||||
@@ -12,7 +12,7 @@ static const SettingVariant _linkgraph_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -25,6 +25,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -37,26 +40,26 @@ startup = false
|
||||
var = linkgraph.recalc_interval
|
||||
type = SLE_UINT16
|
||||
from = SLV_183
|
||||
def = 4
|
||||
min = 2
|
||||
max = 32
|
||||
interval = 2
|
||||
str = STR_CONFIG_SETTING_LINKGRAPH_INTERVAL
|
||||
strval = STR_JUST_COMMA
|
||||
strhelp = STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT
|
||||
def = 8
|
||||
min = 4
|
||||
max = 90
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL
|
||||
strval = STR_CONFIG_SETTING_SECONDS_VALUE
|
||||
strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_INTERVAL_HELPTEXT
|
||||
extra = offsetof(LinkGraphSettings, recalc_interval)
|
||||
|
||||
[SDT_VAR]
|
||||
var = linkgraph.recalc_time
|
||||
type = SLE_UINT16
|
||||
from = SLV_183
|
||||
def = 16
|
||||
def = 32
|
||||
min = 1
|
||||
max = 4096
|
||||
max = 9000
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_LINKGRAPH_TIME
|
||||
strval = STR_JUST_COMMA
|
||||
strhelp = STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT
|
||||
str = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME
|
||||
strval = STR_CONFIG_SETTING_SECONDS_VALUE
|
||||
strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME_HELPTEXT
|
||||
extra = offsetof(LinkGraphSettings, recalc_time)
|
||||
|
||||
[SDT_VAR]
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
; in the savegame PATS chunk. These settings are not sync'd over the network.
|
||||
|
||||
[pre-amble]
|
||||
uint8 _old_units; ///< Old units from old savegames
|
||||
static void SettingsValueVelocityUnit(const IntSettingDesc &sd, uint first_param, int32_t value);
|
||||
|
||||
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR"};
|
||||
uint8_t _old_units; ///< Old units from old savegames
|
||||
|
||||
static constexpr std::initializer_list<const char*> _locale_currencies{"GBP", "USD", "EUR", "JPY", "ATS", "BEF", "CHF", "CZK", "DEM", "DKK", "ESP", "FIM", "FRF", "GRD", "HUF", "ISK", "ITL", "NLG", "NOK", "PLN", "RON", "RUR", "SIT", "SEK", "TRY", "SKK", "BRL", "EEK", "LTL", "KRW", "ZAR", "custom", "GEL", "IRR", "RUB", "MXN", "NTD", "CNY", "HKD", "INR", "IDR", "MYR", "LVL"};
|
||||
static constexpr std::initializer_list<const char*> _locale_units{"imperial", "metric", "si", "gameunits"};
|
||||
|
||||
static_assert(_locale_currencies.size() == CURRENCY_END);
|
||||
@@ -19,8 +21,8 @@ static const SettingVariant _locale_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_SSTR = SDT_SSTR(GameSettings, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
@@ -35,6 +37,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -73,13 +78,27 @@ type = SLE_UINT8
|
||||
from = SLV_184
|
||||
flags = SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 1
|
||||
max = 3
|
||||
max = 4
|
||||
full = _locale_units
|
||||
post_cb = [](auto) { MarkWholeScreenDirty(); }
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL
|
||||
val_cb = SettingsValueVelocityUnit
|
||||
|
||||
[SDT_OMANY]
|
||||
var = locale.units_velocity_nautical
|
||||
type = SLE_UINT8
|
||||
from = SLV_VELOCITY_NAUTICAL
|
||||
flags = SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
|
||||
def = 1
|
||||
max = 4
|
||||
full = _locale_units
|
||||
post_cb = [](auto) { MarkWholeScreenDirty(); }
|
||||
cat = SC_BASIC
|
||||
str = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_NAUTICAL
|
||||
strhelp = STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT
|
||||
val_cb = SettingsValueVelocityUnit
|
||||
|
||||
[SDT_OMANY]
|
||||
var = locale.units_power
|
||||
|
||||
@@ -25,11 +25,11 @@ static const SettingVariant _misc_settings_table[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $var, $def, 0, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -43,6 +43,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -94,13 +97,6 @@ max = 2
|
||||
full = _support8bppmodes
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_SSTR]
|
||||
name = ""graphicsset""
|
||||
type = SLE_STRQ
|
||||
var = BaseGraphics::ini_set
|
||||
def = nullptr
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTG_SSTR]
|
||||
name = ""soundsset""
|
||||
type = SLE_STRQ
|
||||
@@ -265,6 +261,18 @@ name = ""mono_aa""
|
||||
var = _fcsettings.mono.aa
|
||||
def = false
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = HAS_TRUETYPE_FONT
|
||||
name = ""global_aa""
|
||||
var = _fcsettings.global_aa
|
||||
def = true
|
||||
|
||||
[SDTG_BOOL]
|
||||
ifdef = HAS_TRUETYPE_FONT
|
||||
name = ""prefer_sprite_font""
|
||||
var = _fcsettings.prefer_sprite
|
||||
def = false
|
||||
|
||||
[SDTG_VAR]
|
||||
name = ""sprite_cache_size_px""
|
||||
type = SLE_UINT
|
||||
|
||||
@@ -12,9 +12,9 @@ static const SettingVariant _multimedia_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_LIST = SDTC_LIST( $var, $type, $flags, $def, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -27,6 +27,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -54,7 +57,9 @@ var = sound.new_year
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_SOUND_NEW_YEAR
|
||||
str_cb = SettingTitleWallclock
|
||||
strhelp = STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT
|
||||
help_cb = SettingHelpWallclock
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = sound.confirm
|
||||
|
||||
@@ -7,13 +7,19 @@
|
||||
; Network settings as stored in the private configuration file ("private.cfg").
|
||||
|
||||
[pre-amble]
|
||||
static constexpr std::initializer_list<const char*> _use_relay_service{"never", "ask", "allow"};
|
||||
static constexpr std::initializer_list<const char*> _participate_survey{"ask", "no", "yes"};
|
||||
|
||||
static const SettingVariant _network_private_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_SSTR = SDTC_SSTR( $var, $type, $flags, $def, $length, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
|
||||
[defaults]
|
||||
flags = SF_NONE
|
||||
@@ -23,6 +29,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -66,3 +75,31 @@ length = 0
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = """"
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = network.no_http_content_downloads
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_OMANY]
|
||||
var = network.use_relay_service
|
||||
type = SLE_UINT8
|
||||
flags = SF_GUI_DROPDOWN | SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = URS_ASK
|
||||
min = URS_NO
|
||||
max = URS_ALLOW
|
||||
full = _use_relay_service
|
||||
str = STR_CONFIG_SETTING_USE_RELAY_SERVICE
|
||||
strhelp = STR_CONFIG_SETTING_USE_RELAY_SERVICE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_USE_RELAY_SERVICE_NEVER
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDTC_OMANY]
|
||||
var = network.participate_survey
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = PS_ASK
|
||||
min = PS_ASK
|
||||
max = PS_YES
|
||||
full = _participate_survey
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
|
||||
[pre-amble]
|
||||
static void UpdateClientConfigValues();
|
||||
void ChangeNetworkRestartTime(bool reset);
|
||||
|
||||
static constexpr std::initializer_list<const char*> _server_game_type{"local", "public", "invite-only"};
|
||||
static constexpr std::initializer_list<const char*> _use_relay_service{"never", "ask", "allow"};
|
||||
|
||||
static const SettingVariant _network_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -32,6 +32,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -67,6 +70,15 @@ min = 1
|
||||
max = 65535
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.commands_per_frame_server
|
||||
type = SLE_UINT16
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
|
||||
def = 16
|
||||
min = 1
|
||||
max = 65535
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.max_commands_in_queue
|
||||
type = SLE_UINT16
|
||||
@@ -229,10 +241,20 @@ var = network.restart_game_year
|
||||
type = SLE_INT32
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY
|
||||
def = 0
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR
|
||||
interval = 1
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.restart_hours
|
||||
type = SLE_UINT16
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY
|
||||
def = 0
|
||||
min = 0
|
||||
max = UINT16_MAX
|
||||
interval = 1
|
||||
post_cb = [](auto) { ChangeNetworkRestartTime(false); }
|
||||
|
||||
[SDTC_VAR]
|
||||
var = network.min_active_clients
|
||||
type = SLE_UINT8
|
||||
@@ -246,22 +268,3 @@ var = network.reload_cfg
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
|
||||
def = false
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = network.no_http_content_downloads
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_OMANY]
|
||||
var = network.use_relay_service
|
||||
type = SLE_UINT8
|
||||
flags = SF_GUI_DROPDOWN | SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = URS_ASK
|
||||
min = URS_NO
|
||||
max = URS_ALLOW
|
||||
full = _use_relay_service
|
||||
str = STR_CONFIG_SETTING_USE_RELAY_SERVICE
|
||||
strhelp = STR_CONFIG_SETTING_USE_RELAY_SERVICE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_USE_RELAY_SERVICE_NEVER
|
||||
cat = SC_BASIC
|
||||
|
||||
@@ -13,7 +13,7 @@ static const SettingVariant _news_display_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -26,6 +26,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
||||
@@ -31,12 +31,12 @@ static const SettingVariant _old_gameopt_settings_table[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_NULL = SDT_NULL( $length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -53,6 +53,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -142,15 +145,6 @@ min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
|
||||
max = UINT8_MAX
|
||||
to = SLV_22
|
||||
|
||||
[SDTC_OMANY]
|
||||
var = gui.autosave
|
||||
type = SLE_UINT8
|
||||
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
|
||||
def = 1
|
||||
max = 4
|
||||
full = _autosave_interval
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_OMANY]
|
||||
var = vehicle.road_side
|
||||
type = SLE_UINT8
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
; and in the savegame PATS chunk.
|
||||
|
||||
[pre-amble]
|
||||
static void InvalidateShipPathCache(int32 new_value);
|
||||
static void InvalidateShipPathCache(int32_t new_value);
|
||||
|
||||
static const SettingVariant _pathfinding_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -28,6 +28,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -38,10 +41,9 @@ startup = false
|
||||
|
||||
[SDT_BOOL]
|
||||
var = pf.forbid_90_deg
|
||||
def = false
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_FORBID_90_DEG
|
||||
strhelp = STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT
|
||||
post_cb = InvalidateShipPathCache
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDT_BOOL]
|
||||
@@ -169,7 +171,7 @@ cat = SC_EXPERT
|
||||
[SDT_VAR]
|
||||
var = pf.npf.npf_max_search_nodes
|
||||
type = SLE_UINT
|
||||
def = 10000
|
||||
def = AYSTAR_DEF_MAX_SEARCH_NODES
|
||||
min = 500
|
||||
max = 100000
|
||||
cat = SC_EXPERT
|
||||
@@ -326,7 +328,7 @@ cat = SC_EXPERT
|
||||
var = pf.yapf.max_search_nodes
|
||||
type = SLE_UINT
|
||||
from = SLV_28
|
||||
def = 10000
|
||||
def = AYSTAR_DEF_MAX_SEARCH_NODES
|
||||
min = 500
|
||||
max = 1000000
|
||||
cat = SC_EXPERT
|
||||
|
||||
@@ -8,15 +8,14 @@
|
||||
; and in the savegame PATS chunk.
|
||||
|
||||
[pre-amble]
|
||||
static constexpr std::initializer_list<const char*> _settings_profiles{"easy", "medium", "hard"};
|
||||
|
||||
static const SettingVariant _script_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -30,6 +29,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -38,20 +40,6 @@ extra = 0
|
||||
startup = false
|
||||
|
||||
|
||||
[SDT_OMANY]
|
||||
var = script.settings_profile
|
||||
type = SLE_UINT8
|
||||
from = SLV_178
|
||||
flags = SF_GUI_DROPDOWN
|
||||
def = SP_EASY
|
||||
min = SP_EASY
|
||||
max = SP_HARD
|
||||
full = _settings_profiles
|
||||
str = STR_CONFIG_SETTING_AI_PROFILE
|
||||
strhelp = STR_CONFIG_SETTING_AI_PROFILE_HELPTEXT
|
||||
strval = STR_CONFIG_SETTING_AI_PROFILE_EASY
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = script.script_max_opcode_till_suspend
|
||||
type = SLE_UINT32
|
||||
|
||||
@@ -17,8 +17,8 @@ static const SettingVariant _win32_settings_table[] = {
|
||||
};
|
||||
#endif /* _WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@@ -31,6 +31,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
||||
@@ -13,8 +13,8 @@ static const SettingVariant _window_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for WindowDesc.$var exceeds storage size");
|
||||
@@ -27,6 +27,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
; basically construction and game_creation settings.
|
||||
|
||||
[pre-amble]
|
||||
static bool CheckMaxHeightLevel(int32 &new_value);
|
||||
static bool CheckFreeformEdges(int32 &new_value);
|
||||
static void UpdateFreeformEdges(int32 new_value);
|
||||
static bool CheckMaxHeightLevel(int32_t &new_value);
|
||||
static bool CheckFreeformEdges(int32_t &new_value);
|
||||
static void UpdateFreeformEdges(int32_t new_value);
|
||||
|
||||
static const SettingVariant _world_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -34,6 +34,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
@@ -122,9 +125,9 @@ cat = SC_BASIC
|
||||
[SDT_VAR]
|
||||
var = game_creation.starting_year
|
||||
type = SLE_INT32
|
||||
def = DEF_START_YEAR
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR
|
||||
def = CalendarTime::DEF_START_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_STARTING_YEAR
|
||||
strval = STR_JUST_INT
|
||||
@@ -135,9 +138,9 @@ var = game_creation.ending_year
|
||||
type = SLE_INT32
|
||||
from = SLV_ENDING_YEAR
|
||||
flags = SF_GUI_0_IS_SPECIAL
|
||||
def = DEF_END_YEAR
|
||||
min = MIN_YEAR
|
||||
max = MAX_YEAR - 1
|
||||
def = CalendarTime::DEF_END_YEAR
|
||||
min = CalendarTime::MIN_YEAR
|
||||
max = CalendarTime::MAX_YEAR - 1
|
||||
interval = 1
|
||||
str = STR_CONFIG_SETTING_ENDING_YEAR
|
||||
strhelp = STR_CONFIG_SETTING_ENDING_YEAR_HELPTEXT
|
||||
@@ -196,6 +199,7 @@ strval = STR_VARIETY_NONE
|
||||
var = game_creation.generation_seed
|
||||
type = SLE_UINT32
|
||||
from = SLV_30
|
||||
flags = SF_NOT_IN_CONFIG
|
||||
def = GENERATE_NEW_SEED
|
||||
min = 0
|
||||
max = UINT32_MAX
|
||||
@@ -523,6 +527,13 @@ str = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD
|
||||
strhelp = STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_BOOL]
|
||||
var = construction.crossing_with_competitor
|
||||
def = true
|
||||
str = STR_CONFIG_SETTING_CROSSING_WITH_COMPETITOR
|
||||
strhelp = STR_CONFIG_SETTING_CROSSING_WITH_COMPETITOR_HELPTEXT
|
||||
cat = SC_BASIC
|
||||
|
||||
[SDT_VAR]
|
||||
var = construction.raw_industry_construction
|
||||
type = SLE_UINT8
|
||||
|
||||
Reference in New Issue
Block a user