Use compatibility table for loading non-table OPTS, PATS chunks

pull/611/head
Jonathan G Rennison 7 months ago
parent d948abd040
commit 581ed5b98f

@ -91,6 +91,7 @@
#include "table/strings.h"
#include "table/settings.h"
#include "table/settings_compat.h"
#include <algorithm>
#include <vector>
@ -3113,55 +3114,79 @@ void IConsoleListSettings(const char *prefilter, bool show_defaults)
IConsolePrintF(CC_WARNING, "Use 'setting' command to change a value");
}
/**
* Load handler for settings, which don't go in the PATX chunk, and which are a cross-reference to another setting
* @param osd SettingDesc struct containing all information
* @param object can be either nullptr in which case we load global variables or
* a pointer to a struct which is getting saved
*/
static void LoadSettingsXref(const SettingDesc *osd, void *object) {
DEBUG(sl, 3, "PATS chunk: Loading xref setting: '%s'", osd->xref.target);
const SettingDesc *setting_xref = GetSettingFromFullName(osd->xref.target);
assert(setting_xref != nullptr);
// Generate a new SaveLoad from the xref target using the version params from the source
SaveLoad sld = setting_xref->save;
sld.version_from = osd->save.version_from;
sld.version_to = osd->save.version_to;
sld.ext_feature_test = osd->save.ext_feature_test;
if (!SlObjectMember(object, sld)) return;
if (setting_xref->IsIntSetting()) {
const IntSettingDesc *int_setting = setting_xref->AsIntSetting();
int64 val = int_setting->Read(object);
if (osd->xref.conv != nullptr) val = osd->xref.conv(val);
int_setting->MakeValueValidAndWrite(object, val);
}
}
struct LoadSettingsItem {
SettingsCompat compat;
const SettingDesc *setting;
};
std::vector<LoadSettingsItem> _gameopt_compat_items;
std::vector<LoadSettingsItem> _settings_compat_items;
/**
* Save and load handler for settings, except for those which go in the PATX chunk
* Load handler for settings from old-style non-table OPTS and PATS chunks
* @param settings SettingDesc struct containing all information
* @param compat Compatibility table
* @param items Load items (filled in on first run)
* @param object can be either nullptr in which case we load global variables or
* a pointer to a struct which is getting saved
*/
static void LoadSettings(const SettingTable &settings, void *object)
static void LoadSettings(const SettingTable &settings, std::initializer_list<SettingsCompat> compat, std::vector<LoadSettingsItem> &items, void *object)
{
extern SaveLoadVersion _sl_version;
if (items.empty()) {
/* Populate setting references */
for (auto &osd : settings) {
if (osd->flags & SF_NOT_IN_SAVE) continue;
if (osd->patx_name != nullptr) continue;
const SaveLoad &sld = osd->save;
if (osd->xref.target != nullptr) {
if (sld.ext_feature_test.IsFeaturePresent(_sl_version, sld.version_from, sld.version_to)) LoadSettingsXref(osd.get(), object);
continue;
btree::btree_multimap<std::string_view, const SettingDesc *> names;
for (auto &osd : settings) {
if (osd->flags & SF_NOT_IN_SAVE) continue;
if (osd->name == nullptr) continue;
names.insert({osd->name, osd.get()});
}
for (const SettingsCompat &c : compat) {
if (c.type == SettingsCompatType::Setting || c.type == SettingsCompatType::Xref) {
auto iters = names.equal_range(c.name);
assert_msg(iters.first != iters.second, "Setting: %s", c.name.c_str());
for (auto it = iters.first; it != iters.second; ++it) {
items.push_back({ c, it->second });
}
} else {
items.push_back({ c, nullptr });
}
}
}
extern SaveLoadVersion _sl_version;
if (!SlObjectMember(object, osd->save)) continue;
if (osd->IsIntSetting()) {
const IntSettingDesc *int_setting = osd->AsIntSetting();
int_setting->MakeValueValidAndWrite(object, int_setting->Read(object));
for (LoadSettingsItem &item : items) {
switch (item.compat.type) {
case SettingsCompatType::Null:
if (item.compat.ext_feature_test.IsFeaturePresent(_sl_version, item.compat.version_from, item.compat.version_to)) SlSkipBytes(item.compat.length);
break;
case SettingsCompatType::Setting:
if (!SlObjectMember(object, item.setting->save)) continue;
if (item.setting->IsIntSetting()) {
const IntSettingDesc *int_setting = item.setting->AsIntSetting();
int_setting->MakeValueValidAndWrite(object, int_setting->Read(object));
}
break;
case SettingsCompatType::Xref:
if (item.compat.ext_feature_test.IsFeaturePresent(_sl_version, item.compat.version_from, item.compat.version_to)) {
DEBUG(sl, 3, "PATS chunk: Loading xref setting: '%s'", item.compat.name.c_str());
/* Generate a new SaveLoad from the xref target using the version params from the source */
SaveLoad sld = item.setting->save;
sld.version_from = item.compat.version_from;
sld.version_to = item.compat.version_to;
sld.ext_feature_test = item.compat.ext_feature_test;
if (!SlObjectMember(object, sld)) continue;
if (item.setting->IsIntSetting()) {
const IntSettingDesc *int_setting = item.setting->AsIntSetting();
int64 val = int_setting->Read(object);
if (item.compat.xrefconv != nullptr) val = item.compat.xrefconv(val);
int_setting->MakeValueValidAndWrite(object, val);
}
}
break;
}
}
}
@ -3450,7 +3475,7 @@ static void Load_OPTS()
* a networking environment. This ensures for example that the local
* autosave-frequency stays when joining a network-server */
PrepareOldDiffCustom();
LoadSettings(_old_gameopt_settings, &_settings_game);
LoadSettings(_old_gameopt_settings, _gameopt_compat, _gameopt_compat_items, &_settings_game);
HandleOldDiffCustom(true);
}
@ -3459,12 +3484,12 @@ static void Load_PATS()
/* Copy over default setting since some might not get loaded in
* a networking environment. This ensures for example that the local
* currency setting stays when joining a network-server */
LoadSettings(_settings, &_settings_game);
LoadSettings(_settings, _settings_compat, _settings_compat_items, &_settings_game);
}
static void Check_PATS()
{
LoadSettings(_settings, &_load_check_data.settings);
LoadSettings(_settings, _settings_compat, _settings_compat_items, &_load_check_data.settings);
}
static void Load_PATX()

@ -109,21 +109,10 @@ struct SettingDescEnumEntry {
StringID str;
};
struct SettingsXref {
const char *target;
OnXrefValueConvert *conv;
SettingsXref() : target(nullptr), conv(nullptr) {}
SettingsXref(const char *target_, OnXrefValueConvert *conv_) : target(target_), conv(conv_) {}
};
/** Properties of config file settings. */
struct SettingDesc {
struct XrefContructorTag {};
SettingDesc(const SaveLoad &save, const char *name, SettingFlag flags, OnGuiCtrl *guiproc, bool startup, const char *patx_name) :
name(name), flags(flags), guiproc(guiproc), startup(startup), save(save), patx_name(patx_name) {}
SettingDesc(XrefContructorTag tag, SaveLoad save, SettingsXref xref) :
name(nullptr), flags(SF_NONE), guiproc(nullptr), startup(false), save(save), patx_name(nullptr), xref(xref) {}
virtual ~SettingDesc() = default;
const char *name; ///< Name of the setting. Used in configuration file and for console
@ -133,7 +122,6 @@ struct SettingDesc {
SaveLoad save; ///< Internal structure (going to savegame, parts to config)
const char *patx_name; ///< Name to save/load setting from in PATX chunk, if nullptr save/load from PATS chunk as normal
SettingsXref xref; ///< Details of SettingDesc to use instead of the contents of this one, useful for loading legacy savegames, if target field nullptr save/load as normal
bool IsEditable(bool do_command = false) const;
SettingType GetType() const;
@ -353,16 +341,6 @@ struct NullSettingDesc : SettingDesc {
bool IsSameValue(const IniItem *item, void *object) const override { NOT_REACHED(); }
};
/** Setting cross-reference type. */
struct XrefSettingDesc : SettingDesc {
XrefSettingDesc(const SaveLoad &save, SettingsXref xref) :
SettingDesc(SettingDesc::XrefContructorTag(), save, xref) {}
void FormatValue(char *buf, const char *last, const void *object) const override { NOT_REACHED(); }
void ParseValue(const IniItem *item, void *object) const override { NOT_REACHED(); }
bool IsSameValue(const IniItem *item, void *object) const override { NOT_REACHED(); }
};
typedef std::initializer_list<std::unique_ptr<const SettingDesc>> SettingTable;
const SettingDesc *GetSettingFromName(const char *name);
@ -376,4 +354,20 @@ bool SetSettingValue(const StringSettingDesc *sd, const std::string value, bool
void IterateSettingsTables(std::function<void(const SettingTable &, void *)> handler);
enum class SettingsCompatType : uint8 {
Null,
Setting,
Xref,
};
struct SettingsCompat {
std::string name; ///< Name of the field.
SettingsCompatType type; ///< Compat type
uint16 length; ///< Length of the NULL field.
SaveLoadVersion version_from; ///< Save/load the variable starting from this savegame version.
SaveLoadVersion version_to; ///< Save/load the variable before this savegame version.
SlXvFeatureTest ext_feature_test; ///< Extended feature test
OnXrefValueConvert *xrefconv; ///< Value conversion for xref
};
#endif /* SETTINGS_INTERNAL_H */

@ -28,6 +28,7 @@ add_files(
road_land.h
roadtypes.h
roadveh_movement.h
settings_compat.h
sprites.h
station_land.h
strgen_tables.h

@ -131,6 +131,3 @@ static void UpdateTimeSettings(int32 new_value);
#define SDTC_OMANY(var, type, flags, def, max, full, str, strhelp, strval, pre_check, post_callback, from, to, extver, cat, guiproc, startup, patxname)\
SDTG_OMANY(#var, type, flags, _settings_client.var, def, max, full, str, strhelp, strval, pre_check, post_callback, from, to, extver, cat, guiproc, startup, patxname)
#define SDT_XREF(from, to, extver, xref, xrefcvt)\
NSD(Xref, SLE_CONDNULL_X(0, from, to, extver), SettingsXref(xref, xrefcvt))

@ -156,20 +156,6 @@ min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
max = UINT8_MAX
to = SLV_22
;;game_creation.desert_amount
[SDT_NULL]
length = 2
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_NULL]
length = 1
from = SLV_22
to = SLV_165
[SDT_NULL]
length = 1
to = SLV_23
[SDT_OMANY]
var = vehicle.road_side
type = SLE_UINT8

@ -157,9 +157,7 @@ SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $ma
SDT_SSTR = SDT_SSTR(GameSettings, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $extver, $cat | $patchcat, $guiproc, $startup, $patxname),
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $extver, $cat | $patchcat, $guiproc, $startup, $patxname),
SDT_ENUM = SDT_ENUM(GameSettings, $var, $type, $flags, $def, $str, $strhelp, $pre_cb, $post_cb, $from, $to, $extver, $cat | $patchcat, $guiproc, $startup, $patxname, $enumlist),
SDT_NULL = SDT_NULL($length, $from, $to, $extver),
SDT_NAMED_NULL = SDT_NAMED_NULL($name, $length, $from, $to, $extver, $patxname),
SDT_XREF = SDT_XREF( $from, $to, $extver, $xref, $xrefcvt),
SDT_LINKGRAPH_PER_CARGO = SDT_ENUM(GameSettings, linkgraph.distribution_per_cargo[$linkgraph_cargo], SLE_UINT8, $flags | SF_NOT_IN_CONFIG | SF_NO_NEWGAME, DT_PER_CARGO_DEFAULT, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_HELPTEXT, $pre_cb, $post_cb, $from, $to, SlXvFeatureTest(XSLFTO_AND, XSLFI_LINKGRAPH_MODES), SC_EXPERT | SC_PATCH, LinkGraphDistributionSettingGUI, false, nullptr, _linkgraph_mode_per_cargo),
@ -188,8 +186,6 @@ patchcat = SC_NONE
startup = false
extver = SlXvFeatureTest()
patxname = nullptr
xref = <this parameter must be set>
xrefcvt = nullptr
enumlist = <this parameter must be set>
@ -494,14 +490,6 @@ min = 0
max = 3
cat = SC_BASIC
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""order.old_timetable_separation""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_BOOL]
var = order.old_timetable_separation
def = true
@ -549,27 +537,6 @@ strhelp = STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT
strval = STR_CLIMATE_TEMPERATE_LANDSCAPE
cat = SC_BASIC
; Snow line upper byte
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
; Snow line (or snow_line_height * TILE_HEIGHT)
[SDT_NULL]
length = 1
from = SLV_97
to = SLV_164
;;game_creation.desert_amount
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
;;game_creation.tree_line
[SDT_NULL]
length = 2
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_OMANY]
var = vehicle.road_side
type = SLE_UINT8
@ -604,11 +571,6 @@ post_cb = [](auto) { InvalidateWindowClassesData(WC_SMALLMAP, 2); }
cat = SC_ADVANCED
extver = SlXvFeatureTest(XSLFTO_OR, XSLFI_HEIGHT_8_BIT, 1, 1)
;; construction.allow_more_heightlevels
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = game_creation.heightmap_height
type = SLE_UINT8
@ -787,14 +749,6 @@ strhelp = STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH_HELPTEXT
strval = STR_CONFIG_SETTING_TILE_LENGTH
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x0F); }
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 2)
xref = ""construction.old_simulated_wormhole_signals""
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
xref = ""construction.old_simulated_wormhole_signals""
[SDT_VAR]
var = construction.max_bridge_height
type = SLE_UINT8
@ -822,11 +776,6 @@ str = STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH
strhelp = STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH_HELPTEXT
strval = STR_CONFIG_SETTING_TILE_LENGTH
;; construction.max_chunnel_exit_length
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_233)
[SDT_BOOL]
var = construction.chunnel
def = false
@ -848,19 +797,6 @@ cat = SC_BASIC
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SIG_TUNNEL_BRIDGE, 1, 7)
patxname = ""signal_tunnel_bridge.construction.simulated_wormhole_signals""
[SDT_XREF]
xref = ""construction.maximum_signal_evaluations""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""construction.chunnel""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
;; construction.longbridges
[SDT_NULL]
length = 1
to = SLV_159
[SDT_VAR]
var = construction.train_signal_side
type = SLE_UINT8
@ -896,21 +832,6 @@ strhelp = STR_CONFIG_SETTING_TOWN_LAYOUT_HELPTEXT
strval = STR_CONFIG_SETTING_TOWN_LAYOUT_DEFAULT
post_cb = TownFoundingChanged
;; economy.town_construction_cost
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.station_rating_type
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.scale_industry_production
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 7)
[SDT_BOOL]
var = economy.allow_town_roads
from = SLV_113
@ -919,14 +840,6 @@ str = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS
strhelp = STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x62); }
[SDT_XREF]
xref = ""economy.old_town_cargo_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.day_length_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = economy.found_town
type = SLE_UINT8
@ -988,10 +901,6 @@ cat = SC_BASIC
patchcat = SC_PATCH
patxname = ""economy.allow_town_bridges""
[SDT_XREF]
xref = ""economy.old_town_cargo_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = economy.town_cargogen_mode
type = SLE_UINT8
@ -1006,10 +915,6 @@ strhelp = STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT
strval = STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL
cat = SC_ADVANCED
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
xref = ""economy.max_town_heightlevel""
[SDT_VAR]
var = economy.max_town_heightlevel
type = SLE_UINT8
@ -1330,10 +1235,6 @@ strval = STR_JUST_INT
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_TOWN_CARGO_ADJ, 1, 1)
patxname = ""town_cargo_adj.economy.town_cargo_factor""
[SDT_XREF]
xref = ""economy.old_town_cargo_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_VAR]
var = economy.town_cargo_scale_factor
type = SLE_INT16
@ -1497,14 +1398,6 @@ str = STR_CONFIG_SETTING_FORBID_90_DEG
strhelp = STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT
cat = SC_EXPERT
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
xref = ""pf.back_of_one_way_pbs_waiting_point""
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
xref = ""pf.back_of_one_way_pbs_waiting_point""
[SDT_BOOL]
var = pf.back_of_one_way_pbs_waiting_point
def = true
@ -1527,11 +1420,6 @@ strhelp = STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT
strval = STR_CONFIG_SETTING_TILE_LENGTH
cat = SC_BASIC
; vehicle.mammoth_trains
[SDT_NULL]
length = 1
to = SLV_159
[SDT_VAR]
var = vehicle.smoke_amount
type = SLE_UINT8
@ -1544,16 +1432,6 @@ str = STR_CONFIG_SETTING_SMOKE_AMOUNT
strhelp = STR_CONFIG_SETTING_SMOKE_AMOUNT_HELPTEXT
strval = STR_CONFIG_SETTING_NONE
; order.gotodepot
[SDT_NULL]
length = 1
to = SLV_159
;; order.gotodepot
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
; path finder
[SDT_BOOL]
@ -1603,7 +1481,6 @@ to = SLV_87
def = true
cat = SC_EXPERT
##
[SDT_VAR]
var = pf.pathfinder_for_trains
type = SLE_UINT8
@ -1684,11 +1561,6 @@ cat = SC_EXPERT
patchcat = SC_PATCH
patxname = ""vehicle.no_introduce_vehicles_after""
;; vehicle.exact_intro_date
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_VAR]
var = vehicle.max_trains
type = SLE_UINT16
@ -1798,11 +1670,6 @@ strhelp = STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x5D); }
post_cb = UpdateConsists
;; vehicle.slow_road_vehicles_in_curves
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP, SL_JOKER_1_25)
xref = ""vehicle.slow_road_vehicles_in_curves""
[SDT_BOOL]
var = vehicle.slow_road_vehicles_in_curves
def = true
@ -1812,10 +1679,6 @@ cat = SC_BASIC
patchcat = SC_PATCH
patxname = ""slow_road_vehicles_in_curves.vehicle.slow_road_vehicles_in_curves""
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
xref = ""vehicle.train_speed_adaptation""
[SDT_BOOL]
var = vehicle.train_speed_adaptation
def = false
@ -1849,32 +1712,6 @@ strval = STR_JUST_COMMA
pre_cb = [](int32 &new_value) -> bool { return CheckTTDPatchSettingFlag(0x58); }
post_cb = UpdateConsists
;; vehicle.freight_mult_to_passengers
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; ticks_per_minute
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
; order.timetabling
[SDT_NULL]
length = 1
from = SLV_67
to = SLV_159
extver = SlXvFeatureTest(XSLFTO_OR, XSLFI_CHILLPP, SL_CHILLPP_232)
;; order.timetable_automated
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""order.old_timetable_separation""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = vehicle.plane_speed
type = SLE_UINT8
@ -1909,14 +1746,6 @@ strhelp = STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT
strval = STR_CONFIG_SETTING_PLANE_CRASHES_NONE
cat = SC_BASIC
[SDT_XREF]
xref = ""vehicle.improved_breakdowns""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""vehicle.improved_breakdowns""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_BOOL]
var = vehicle.improved_breakdowns
def = false
@ -1969,11 +1798,6 @@ strhelp = STR_CONFIG_SETTING_DRIVE_THROUGH_TRAIN_DEPOT_HELPTEXT
patchcat = SC_PATCH
patxname = ""drive_through_train_depot.vehicle.drive_through_train_depot""
; station.join_stations
[SDT_NULL]
length = 1
to = SLV_159
[SDTC_BOOL]
var = gui.sg_full_load_any
from = SLV_22
@ -1991,36 +1815,12 @@ var = order.selectgoods
def = true
cat = SC_EXPERT
;; economy.deliver_goods
;; vehicle.cargo_wait_time
[SDT_NULL]
length = 2
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; order.automatic_timetable_separation
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
;; order.timetable_auto_travel_buffer
;; order.timetable_auto_load_buffer
;; order.timetable_auto_travel_rounding
;; order.timetable_auto_load_rounding
[SDT_NULL]
length = 4
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP, SL_JOKER_1_24)
[SDTC_BOOL]
var = gui.sg_new_nonstop
from = SLV_22
to = SLV_93
def = false
; station.nonuniform_stations
[SDT_NULL]
length = 1
to = SLV_159
[SDT_VAR]
var = station.station_spread
type = SLE_UINT8
@ -2137,10 +1937,6 @@ strhelp = STR_CONFIG_SETTING_ENABLE_ROAD_CUSTOM_BRIDGE_HEADS_HELPTEXT
patchcat = SC_PATCH
patxname = ""custom_bridge_heads.construction.road_custom_bridge_heads""
[SDT_XREF]
xref = ""construction.road_custom_bridge_heads""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_BOOL]
var = construction.rail_custom_bridge_heads
def = true
@ -2266,17 +2062,6 @@ str = STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS
strhelp = STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT
post_cb = [](auto) { CloseWindowById(WC_SELECT_STATION, 0); }
;; construction.traffic_lights
;; construction.towns_build_traffic_lights
;; construction.allow_building_tls_in_towns
;; construction.traffic_lights_green_phase
;; construction.max_tlc_size
;; construction.max_tlc_distance
[SDT_NULL]
length = 6
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
##
[SDT_BOOL]
var = economy.inflation
def = false
@ -2340,27 +2125,6 @@ def = false
str = STR_CONFIG_SETTING_MULTIPINDTOWN
strhelp = STR_CONFIG_SETTING_MULTIPINDTOWN_HELPTEXT
;; economy.allow_automatic_industries
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 4)
;; construction.extra_industry_placement_logic
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_NULL]
length = 1
to = SLV_141
;; economy.minimum_distance_town
;; economy.minimum_distance_industry
;; economy.minimum_distance_ind_town
[SDT_NULL]
length = 6
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_BOOL]
var = economy.bribe
def = true
@ -2404,16 +2168,6 @@ str = STR_CONFIG_SETTING_ALLOW_GIVE_MONEY
strhelp = STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT
cat = SC_BASIC
;; game_creation.tree_line_height
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
; Snow line upper byte
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = game_creation.snow_line_height
type = SLE_UINT8
@ -2456,21 +2210,6 @@ post_cb = ClimateThresholdModeChanged
patchcat = SC_PATCH
patxname = ""climate.game_creation.climate_threshold_mode""
;;game_creation.desert_amount
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
;;game_creation.tree_line
[SDT_NULL]
length = 2
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
;;game_creation.desert_amount
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_VAR]
var = game_creation.snow_coverage
type = SLE_UINT8
@ -2499,11 +2238,6 @@ strhelp = STR_CONFIG_SETTING_DESERT_COVERAGE_HELPTEXT
strval = STR_CONFIG_SETTING_DESERT_COVERAGE_VALUE
cat = SC_BASIC
[SDT_NULL]
length = 4
to = SLV_144
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, 0, 0)
[SDT_VAR]
var = game_creation.starting_year
type = SLE_INT32
@ -2515,10 +2249,6 @@ str = STR_CONFIG_SETTING_STARTING_YEAR
strval = STR_JUST_INT
cat = SC_BASIC
[SDT_NULL]
length = 4
to = SLV_105
[SDT_VAR]
var = game_creation.ending_year
type = SLE_INT32
@ -2579,59 +2309,6 @@ strhelp = STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT
strval = STR_CONFIG_SETTING_PERCENTAGE
cat = SC_EXPERT
[SDT_XREF]
xref = ""economy.day_length_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.price_mult[0-70]
[SDT_NULL]
length = 71
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.price_rails[0-15]
[SDT_NULL]
length = 16
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.rail_maintenance[0-15]
[SDT_NULL]
length = 16
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
; note that this has changed format in SpringPP 2.1.147
[SDT_XREF]
xref = ""vehicle.pay_for_repair""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""vehicle.repair_cost""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.town_consumption_rate
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.town_pop_*
[SDT_NULL]
length = 6
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.town_consumption_rates[0-2][0-2]
[SDT_NULL]
length = 18
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.town_effects[0-2]
[SDT_NULL]
length = 3
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
;; economy.grow_if_one_delivered
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_VAR]
var = economy.town_growth_rate
type = SLE_INT8
@ -2845,21 +2522,12 @@ str = STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER
strhelp = STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT
strval = STR_JUST_COMMA
;; economy.town_growth_cargo, economy.town_pop_need_goods, economy.larger_town_growth_cargo, economy.larger_town_pop_need_goods
[SDT_NULL]
length = 10
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_BOOL]
var = economy.mod_road_rebuild
from = SLV_77
def = true
cat = SC_EXPERT
[SDT_XREF]
xref = ""construction.maximum_signal_evaluations""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_VAR]
var = economy.town_min_distance
type = SLE_UINT16
@ -2873,82 +2541,6 @@ strval = STR_JUST_INT
patchcat = SC_PATCH
patxname = ""town_min_distance.economy.town_min_distance""
[SDT_XREF]
xref = ""economy.town_min_distance""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[0]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[1]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[2]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[3]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.sharing_fee[0]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.sharing_fee[1]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.sharing_fee[2]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.sharing_fee[3]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.sharing_payment_in_debt""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[0]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[1]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[2]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.infrastructure_sharing[3]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.sharing_fee[0]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.sharing_fee[1]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.sharing_fee[2]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.sharing_fee[3]""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""economy.sharing_payment_in_debt""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_VAR]
var = construction.maximum_signal_evaluations
type = SLE_UINT16
@ -3069,15 +2661,6 @@ extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_INFRA_SHARING)
patchcat = SC_PATCH
patxname = ""infra_sharing.economy.sharing_payment_in_debt""
[SDT_XREF]
xref = ""economy.day_length_factor""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
; previously ai-new setting.
[SDT_NULL]
length = 1
to = SLV_106
[SDT_OMANY]
var = script.settings_profile
type = SLE_UINT8
@ -3228,66 +2811,6 @@ strhelp = STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT
post_cb = [](auto) { InvalidateWindowClassesData(WC_COMPANY_INFRASTRUCTURE); }
cat = SC_BASIC
[SDT_XREF]
xref = ""economy.infrastructure_maintenance""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
;; construction.traffic_lights...
[SDT_NULL]
length = 6
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_XREF]
xref = ""linkgraph.recalc_interval""
xrefcvt = LinkGraphDistModeXrefChillPP
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.distribution_pax""
xrefcvt = LinkGraphDistModeXrefChillPP
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.distribution_mail""
xrefcvt = LinkGraphDistModeXrefChillPP
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
;; linkgraph.distribution_express
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.distribution_armoured""
xrefcvt = LinkGraphDistModeXrefChillPP
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.distribution_default""
xrefcvt = LinkGraphDistModeXrefChillPP
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.accuracy""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.demand_size""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.demand_distance""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
[SDT_XREF]
xref = ""linkgraph.short_path_saturation""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)
;; linkgraph.no_overload_links
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_VAR]
var = economy.random_road_reconstruction
type = SLE_UINT16
@ -3364,13 +2887,6 @@ min = 1
max = 255
cat = SC_EXPERT
##
; Used to be pf.opf.pf_maxlength & pf.opf.pf_maxdepth
[SDT_NULL]
length = 3
to = SLV_REMOVE_OPF
##
[SDT_VAR]
var = pf.npf.npf_max_search_nodes
type = SLE_UINT
@ -3494,16 +3010,6 @@ min = 0
max = 100000
cat = SC_EXPERT
# pf.npf.npf_road_trafficlight_penalty
[SDT_NULL]
length = 4
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
# pf.npf.npf_road_trafficlight_penalty
[SDT_NULL]
length = 4
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_VAR]
var = pf.npf.npf_road_dt_occupied_penalty
type = SLE_UINT
@ -3782,16 +3288,6 @@ min = 0
max = 1000000
cat = SC_EXPERT
# pf.yapf.road_trafficlight_penalty
[SDT_NULL]
length = 4
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)
# pf.yapf.road_trafficlight_penalty
[SDT_NULL]
length = 4
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_VAR]
var = pf.yapf.road_stop_penalty
type = SLE_UINT
@ -4038,11 +3534,6 @@ strhelp = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT
strval = STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NO_SPREAD
cat = SC_BASIC
;; construction.tree_placement_drag_limit, construction.ingame_tree_line_height, construction.tree_growth_rate
[SDT_NULL]
length = 3
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
[SDT_BOOL]
var = construction.trees_around_snow_line_enabled
def = true
@ -4094,14 +3585,6 @@ cat = SC_BASIC
patchcat = SC_PATCH
patxname = ""reduced_tree_growth.construction.tree_growth_rate""
[SDT_XREF]
xref = ""construction.tree_growth_rate""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_XREF]
xref = ""construction.trees_around_snow_line_range""
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
[SDT_VAR]
var = game_creation.custom_terrain_type
type = SLE_UINT8
@ -4266,10 +3749,6 @@ strval = STR_JUST_COMMA
patchcat = SC_PATCH
patxname = ""rocks.game_creation.height_affects_rocks""
[SDT_XREF]
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)
xref = ""game_creation.build_public_roads""
[SDT_VAR]
var = game_creation.build_public_roads
type = SLE_UINT8
@ -4463,11 +3942,6 @@ cat = SC_BASIC
patchcat = SC_PATCH
patxname = ""safer_crossings.vehicle.safer_crossings""
;; gui.time_in_minutes
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 7)
[SDT_BOOL]
var = game_time.time_in_minutes
def = false
@ -4505,11 +3979,6 @@ post_cb = UpdateTimeSettings
patchcat = SC_PATCH
patxname = ""game_time.clock_offset""
;; gui.ticks_per_minute
[SDT_NULL]
length = 1
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 7)
[SDT_BOOL]
var = vehicle.pay_for_repair
def = true

@ -0,0 +1,437 @@
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file settings_compat.h Tables for loading non-table format settings chunks. */
#ifndef SETTINGS_COMPAT_H
#define SETTINGS_COMPAT_H
#define SLCX_VAR(name) {name, SettingsCompatType::Setting, 0, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(), nullptr}
#define SLCX_NULL_X(length, from, to, extver) {{}, SettingsCompatType::Null, length, from, to, extver, nullptr}
#define SLCX_NULL(length, from, to) SLCX_NULL_X(length, from, to, SlXvFeatureTest())
#define SLCX_XREF(name, from, to, extver) {name, SettingsCompatType::Xref, 0, from, to, extver, nullptr}
#define SLCX_XREFCVT(name, from, to, extver, cvt) {name, SettingsCompatType::Xref, 0, from, to, extver, cvt}
static std::initializer_list<SettingsCompat> _gameopt_compat{
SLCX_VAR("diff_custom"),
SLCX_VAR("diff_level"),
SLCX_VAR("locale.currency"),
SLCX_VAR("units"),
SLCX_VAR("game_creation.town_name"),
SLCX_VAR("game_creation.landscape"),
SLCX_VAR("game_creation.snow_line_height"),
SLCX_NULL_X(2, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)), // game_creation.desert_amount
SLCX_NULL(1, SLV_22, SLV_165),
SLCX_NULL(1, SL_MIN_VERSION, SLV_23),
SLCX_VAR("vehicle.road_side"),
};
static std::initializer_list<SettingsCompat> _settings_compat{
SLCX_VAR("difficulty.max_no_competitors"),
SLCX_NULL(1, SLV_97, SLV_110), // difficulty.competitor_start_time
SLCX_VAR("difficulty.number_towns"),
SLCX_VAR("difficulty.industry_density"),
SLCX_VAR("difficulty.max_loan"),
SLCX_VAR("difficulty.initial_interest"),
SLCX_VAR("difficulty.vehicle_costs"),
SLCX_VAR("difficulty.competitor_speed"),
SLCX_NULL(1, SLV_97, SLV_110), // difficulty.competitor_intelligence
SLCX_VAR("difficulty.vehicle_breakdowns"),
SLCX_VAR("difficulty.subsidy_multiplier"),
SLCX_VAR("difficulty.subsidy_duration"),
SLCX_VAR("difficulty.construction_cost"),
SLCX_VAR("difficulty.terrain_type"),
SLCX_VAR("difficulty.quantity_sea_lakes"),
SLCX_VAR("difficulty.economy"),
SLCX_VAR("difficulty.line_reverse_mode"),
SLCX_VAR("difficulty.disasters"),
SLCX_VAR("difficulty.town_council_tolerance"),
SLCX_VAR("diff_level"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("order.old_timetable_separation", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_VAR("game_creation.town_name"),
SLCX_VAR("game_creation.landscape"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // snow line upper byte
SLCX_NULL(1, SLV_97, SLV_164), // snow line
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // game_creation.desert_amount
SLCX_NULL_X(2, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // game_creation.tree_line
SLCX_VAR("vehicle.road_side"),
SLCX_VAR("construction.map_height_limit"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // construction.allow_more_heightlevels
SLCX_VAR("game_creation.heightmap_height"),
SLCX_VAR("construction.build_on_slopes"),
SLCX_VAR("construction.command_pause_level"),
SLCX_VAR("construction.terraform_per_64k_frames"),
SLCX_VAR("construction.terraform_frame_burst"),
SLCX_VAR("construction.clear_per_64k_frames"),
SLCX_VAR("construction.clear_frame_burst"),
SLCX_VAR("construction.tree_per_64k_frames"),
SLCX_VAR("construction.tree_frame_burst"),
SLCX_VAR("construction.autoslope"),
SLCX_VAR("construction.extra_dynamite"),
SLCX_VAR("construction.max_bridge_length"),
SLCX_XREF("construction.old_simulated_wormhole_signals", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 2)),
SLCX_XREF("construction.old_simulated_wormhole_signals", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("construction.max_bridge_height"),
SLCX_VAR("construction.max_tunnel_length"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_233)), // construction.max_chunnel_exit_length
SLCX_XREF("construction.maximum_signal_evaluations", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("construction.chunnel", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_NULL(1, SL_MIN_VERSION, SLV_159), // construction.longbridges
SLCX_VAR("construction.train_signal_side"),
SLCX_VAR("station.never_expire_airports"),
SLCX_VAR("economy.town_layout"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.town_construction_cost
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.station_rating_type
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 7)), // economy.scale_industry_production
SLCX_VAR("economy.allow_town_roads"),
SLCX_XREF("economy.old_town_cargo_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.day_length_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_VAR("economy.found_town"),
SLCX_VAR("economy.allow_town_level_crossings"),
SLCX_XREF("economy.old_town_cargo_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_VAR("economy.town_cargogen_mode"),
SLCX_XREF("economy.max_town_heightlevel", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("linkgraph.recalc_interval"),
SLCX_VAR("linkgraph.recalc_time"),
SLCX_VAR("linkgraph.distribution_pax"),
SLCX_VAR("linkgraph.distribution_mail"),
SLCX_VAR("linkgraph.distribution_armoured"),
SLCX_VAR("linkgraph.distribution_default"),
SLCX_VAR("linkgraph.distribution_per_cargo[0]"),
SLCX_VAR("linkgraph.distribution_per_cargo[1]"),
SLCX_VAR("linkgraph.distribution_per_cargo[2]"),
SLCX_VAR("linkgraph.distribution_per_cargo[3]"),
SLCX_VAR("linkgraph.distribution_per_cargo[4]"),
SLCX_VAR("linkgraph.distribution_per_cargo[5]"),
SLCX_VAR("linkgraph.distribution_per_cargo[6]"),
SLCX_VAR("linkgraph.distribution_per_cargo[7]"),
SLCX_VAR("linkgraph.distribution_per_cargo[8]"),
SLCX_VAR("linkgraph.distribution_per_cargo[9]"),
SLCX_VAR("linkgraph.distribution_per_cargo[10]"),
SLCX_VAR("linkgraph.distribution_per_cargo[11]"),
SLCX_VAR("linkgraph.distribution_per_cargo[12]"),
SLCX_VAR("linkgraph.distribution_per_cargo[13]"),
SLCX_VAR("linkgraph.distribution_per_cargo[14]"),
SLCX_VAR("linkgraph.distribution_per_cargo[15]"),
SLCX_VAR("linkgraph.distribution_per_cargo[16]"),
SLCX_VAR("linkgraph.distribution_per_cargo[17]"),
SLCX_VAR("linkgraph.distribution_per_cargo[18]"),
SLCX_VAR("linkgraph.distribution_per_cargo[19]"),
SLCX_VAR("linkgraph.distribution_per_cargo[20]"),
SLCX_VAR("linkgraph.distribution_per_cargo[21]"),
SLCX_VAR("linkgraph.distribution_per_cargo[22]"),
SLCX_VAR("linkgraph.distribution_per_cargo[23]"),
SLCX_VAR("linkgraph.distribution_per_cargo[24]"),
SLCX_VAR("linkgraph.distribution_per_cargo[25]"),
SLCX_VAR("linkgraph.distribution_per_cargo[26]"),
SLCX_VAR("linkgraph.distribution_per_cargo[27]"),
SLCX_VAR("linkgraph.distribution_per_cargo[28]"),
SLCX_VAR("linkgraph.distribution_per_cargo[29]"),
SLCX_VAR("linkgraph.distribution_per_cargo[30]"),
SLCX_VAR("linkgraph.distribution_per_cargo[31]"),
SLCX_VAR("linkgraph.distribution_per_cargo[32]"),
SLCX_VAR("linkgraph.distribution_per_cargo[33]"),
SLCX_VAR("linkgraph.distribution_per_cargo[34]"),
SLCX_VAR("linkgraph.distribution_per_cargo[35]"),
SLCX_VAR("linkgraph.distribution_per_cargo[36]"),
SLCX_VAR("linkgraph.distribution_per_cargo[37]"),
SLCX_VAR("linkgraph.distribution_per_cargo[38]"),
SLCX_VAR("linkgraph.distribution_per_cargo[39]"),
SLCX_VAR("linkgraph.distribution_per_cargo[40]"),
SLCX_VAR("linkgraph.distribution_per_cargo[41]"),
SLCX_VAR("linkgraph.distribution_per_cargo[42]"),
SLCX_VAR("linkgraph.distribution_per_cargo[43]"),
SLCX_VAR("linkgraph.distribution_per_cargo[44]"),
SLCX_VAR("linkgraph.distribution_per_cargo[45]"),
SLCX_VAR("linkgraph.distribution_per_cargo[46]"),
SLCX_VAR("linkgraph.distribution_per_cargo[47]"),
SLCX_VAR("linkgraph.distribution_per_cargo[48]"),
SLCX_VAR("linkgraph.distribution_per_cargo[49]"),
SLCX_VAR("linkgraph.distribution_per_cargo[50]"),
SLCX_VAR("linkgraph.distribution_per_cargo[51]"),
SLCX_VAR("linkgraph.distribution_per_cargo[52]"),
SLCX_VAR("linkgraph.distribution_per_cargo[53]"),
SLCX_VAR("linkgraph.distribution_per_cargo[54]"),
SLCX_VAR("linkgraph.distribution_per_cargo[55]"),
SLCX_VAR("linkgraph.distribution_per_cargo[56]"),
SLCX_VAR("linkgraph.distribution_per_cargo[57]"),
SLCX_VAR("linkgraph.distribution_per_cargo[58]"),
SLCX_VAR("linkgraph.distribution_per_cargo[59]"),
SLCX_VAR("linkgraph.distribution_per_cargo[60]"),
SLCX_VAR("linkgraph.distribution_per_cargo[61]"),
SLCX_VAR("linkgraph.distribution_per_cargo[62]"),
SLCX_VAR("linkgraph.distribution_per_cargo[63]"),
SLCX_VAR("linkgraph.accuracy"),
SLCX_VAR("linkgraph.demand_distance"),
SLCX_VAR("linkgraph.demand_size"),
SLCX_VAR("linkgraph.short_path_saturation"),
SLCX_VAR("linkgraph.aircraft_link_scale"),
SLCX_XREF("economy.old_town_cargo_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("vehicle.train_acceleration_model"),
SLCX_VAR("vehicle.roadveh_acceleration_model"),
SLCX_VAR("vehicle.train_slope_steepness"),
SLCX_VAR("vehicle.roadveh_slope_steepness"),
SLCX_VAR("pf.forbid_90_deg"),
SLCX_XREF("pf.back_of_one_way_pbs_waiting_point", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_XREF("pf.back_of_one_way_pbs_waiting_point", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_VAR("vehicle.max_train_length"),
SLCX_NULL(1, SL_MIN_VERSION, SLV_159), // vehicle.mammoth_trains
SLCX_VAR("vehicle.smoke_amount"),
SLCX_NULL_X(1, SL_MIN_VERSION, SLV_159, SlXvFeatureTest(XSLFTO_OR, XSLFI_CHILLPP, SL_CHILLPP_232)), // order.gotodepot
SLCX_VAR("pf.roadveh_queue"),
SLCX_VAR("pf.new_pathfinding_all"),
SLCX_VAR("pf.yapf.ship_use_yapf"),
SLCX_VAR("pf.yapf.road_use_yapf"),
SLCX_VAR("pf.yapf.rail_use_yapf"),
SLCX_VAR("pf.pathfinder_for_trains"),
SLCX_VAR("pf.pathfinder_for_roadvehs"),
SLCX_VAR("pf.pathfinder_for_ships"),
SLCX_VAR("vehicle.never_expire_vehicles"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // vehicle.exact_intro_date
SLCX_VAR("vehicle.max_trains"),
SLCX_VAR("vehicle.max_roadveh"),
SLCX_VAR("vehicle.max_aircraft"),
SLCX_VAR("vehicle.max_ships"),
SLCX_VAR("vehicle.servint_ispercent"),
SLCX_VAR("vehicle.servint_trains"),
SLCX_VAR("vehicle.servint_roadveh"),
SLCX_VAR("vehicle.servint_ships"),
SLCX_VAR("vehicle.servint_aircraft"),
SLCX_VAR("order.no_servicing_if_no_breakdowns"),
SLCX_VAR("vehicle.wagon_speed_limits"),
SLCX_XREF("vehicle.slow_road_vehicles_in_curves", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP, SL_JOKER_1_25)),
SLCX_XREF("vehicle.train_speed_adaptation", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("vehicle.disable_elrails"),
SLCX_VAR("vehicle.freight_trains"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // vehicle.freight_mult_to_passengers
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // ticks_per_minute
SLCX_NULL_X(1, SLV_67, SLV_159, SlXvFeatureTest(XSLFTO_OR, XSLFI_CHILLPP, SL_CHILLPP_232)), // order.timetabling
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // order.timetable_automated
SLCX_XREF("order.old_timetable_separation", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_VAR("vehicle.plane_speed"),
SLCX_VAR("vehicle.dynamic_engines"),
SLCX_VAR("vehicle.plane_crashes"),
SLCX_XREF("vehicle.improved_breakdowns", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("vehicle.improved_breakdowns", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_NULL(1, SL_MIN_VERSION, SLV_159), // station.join_stations
SLCX_VAR("gui.sg_full_load_any"),
SLCX_VAR("order.improved_load"),
SLCX_VAR("order.selectgoods"),
SLCX_NULL_X(2, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.deliver_goods, vehicle.cargo_wait_time
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)), // order.automatic_timetable_separation
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP, SL_JOKER_1_24)), // order.timetable_auto_{travel_buffer, load_buffer, travel_rounding, load_rounding}
SLCX_VAR("gui.sg_new_nonstop"),
SLCX_NULL(1, SL_MIN_VERSION, SLV_159), // station.nonuniform_stations
SLCX_VAR("station.station_spread"),
SLCX_VAR("order.serviceathelipad"),
SLCX_VAR("station.modified_catchment"),
SLCX_VAR("station.serve_neutral_industries"),
SLCX_VAR("order.gradual_loading"),
SLCX_VAR("construction.road_stop_on_town_road"),
SLCX_VAR("construction.road_stop_on_competitor_road"),
SLCX_XREF("construction.road_custom_bridge_heads", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("station.adjacent_stations"),
SLCX_VAR("economy.station_noise_level"),
SLCX_VAR("station.distant_join_stations"),
SLCX_NULL_X(6, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // construction.{traffic_lights, towns_build_traffic_lights, allow_building_tls_in_towns, traffic_lights_green_phase, max_tlc_size, max_tlc_distance}
SLCX_VAR("economy.inflation"),
SLCX_VAR("construction.raw_industry_construction"),
SLCX_VAR("construction.industry_platform"),
SLCX_VAR("economy.multiple_industry_per_town"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 4)), // economy.allow_automatic_industries
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // construction.extra_industry_placement_logic
SLCX_NULL(1, SL_MIN_VERSION, SLV_141),
SLCX_NULL_X(6, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.minimum_distance_{town, industry, ind_town}
SLCX_VAR("economy.bribe"),
SLCX_VAR("economy.exclusive_rights"),
SLCX_VAR("economy.fund_buildings"),
SLCX_VAR("economy.fund_roads"),
SLCX_VAR("economy.give_money"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)), // game_creation.tree_line_height
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // snow line upper byte
SLCX_VAR("game_creation.snow_line_height"),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // game_creation.desert_amount
SLCX_NULL_X(2, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // game_creation.tree_line
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)), // game_creation.desert_amount
SLCX_VAR("game_creation.snow_coverage"),
SLCX_VAR("game_creation.desert_coverage"),
SLCX_NULL_X(4, SL_MIN_VERSION, SLV_144, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, 0, 0)),
SLCX_VAR("game_creation.starting_year"),
SLCX_NULL(4, SL_MIN_VERSION, SLV_105),
SLCX_VAR("game_creation.ending_year"),
SLCX_VAR("economy.type"),
SLCX_VAR("economy.allow_shares"),
SLCX_VAR("economy.min_years_for_shares"),
SLCX_VAR("economy.feeder_payment_share"),
SLCX_XREF("economy.day_length_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_NULL_X(71, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.price_mult[0-70]
SLCX_NULL_X(16, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.price_rails[0-15]
SLCX_NULL_X(16, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.rail_maintenance[0-15]
SLCX_XREF("vehicle.pay_for_repair", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // note that this has changed format in SpringPP 2.1.147
SLCX_XREF("vehicle.repair_cost", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_NULL_X(7, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.town_consumption_rate, economy.town_pop_*
SLCX_NULL_X(18, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.town_consumption_rates[0-2][0-2]
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // economy.town_effects[0-2], economy.grow_if_one_delivered
SLCX_VAR("economy.town_growth_rate"),
SLCX_VAR("economy.larger_towns"),
SLCX_VAR("economy.initial_city_size"),
SLCX_NULL_X(10, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // economy.{town_growth_cargo, town_pop_need_goods, larger_town_growth_cargo, larger_town_pop_need_goods}
SLCX_VAR("economy.mod_road_rebuild"),
SLCX_XREF("construction.maximum_signal_evaluations", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_XREF("economy.town_min_distance", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_XREF("economy.infrastructure_sharing[0]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.infrastructure_sharing[1]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.infrastructure_sharing[2]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.infrastructure_sharing[3]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.sharing_fee[0]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.sharing_fee[1]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.sharing_fee[2]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.sharing_fee[3]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.sharing_payment_in_debt", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)),
SLCX_XREF("economy.infrastructure_sharing[0]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.infrastructure_sharing[1]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.infrastructure_sharing[2]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.infrastructure_sharing[3]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.sharing_fee[0]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.sharing_fee[1]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.sharing_fee[2]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.sharing_fee[3]", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.sharing_payment_in_debt", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_XREF("economy.day_length_factor", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_NULL(1, SL_MIN_VERSION, SLV_107), // previously ai-new setting
SLCX_VAR("script.settings_profile"),
SLCX_VAR("ai.ai_in_multiplayer"),
SLCX_VAR("ai.ai_disable_veh_train"),
SLCX_VAR("ai.ai_disable_veh_roadveh"),
SLCX_VAR("ai.ai_disable_veh_aircraft"),
SLCX_VAR("ai.ai_disable_veh_ship"),
SLCX_VAR("script.script_max_opcode_till_suspend"),
SLCX_VAR("script.script_max_memory_megabytes"),
SLCX_VAR("vehicle.extend_vehicle_life"),
SLCX_VAR("economy.dist_local_authority"),
SLCX_VAR("pf.reverse_at_signals"),
SLCX_VAR("pf.wait_oneway_signal"),
SLCX_VAR("pf.wait_twoway_signal"),
SLCX_VAR("economy.town_noise_population[0]"),
SLCX_VAR("economy.town_noise_population[1]"),
SLCX_VAR("economy.town_noise_population[2]"),
SLCX_VAR("economy.infrastructure_maintenance"),
SLCX_XREF("economy.infrastructure_maintenance", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)),
SLCX_NULL_X(6, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // construction.traffic_lights...
SLCX_XREF("linkgraph.recalc_interval", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_XREFCVT("linkgraph.distribution_pax", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP), LinkGraphDistModeXrefChillPP),
SLCX_XREFCVT("linkgraph.distribution_mail", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP), LinkGraphDistModeXrefChillPP),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)), // linkgraph.distribution_express
SLCX_XREFCVT("linkgraph.distribution_armoured", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP), LinkGraphDistModeXrefChillPP),
SLCX_XREFCVT("linkgraph.distribution_default", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP), LinkGraphDistModeXrefChillPP),
SLCX_XREF("linkgraph.accuracy", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_XREF("linkgraph.demand_size", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_XREF("linkgraph.demand_distance", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_XREF("linkgraph.short_path_saturation", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP)),
SLCX_NULL_X(1, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // linkgraph.no_overload_links
SLCX_VAR("pf.wait_for_pbs_path"),
SLCX_VAR("pf.reserve_paths"),
SLCX_VAR("pf.path_backoff_interval"),
SLCX_NULL(3, SL_MIN_VERSION, SLV_REMOVE_OPF), // pf.opf.pf_maxlength & pf.opf.pf_maxdepth
SLCX_VAR("pf.npf.npf_max_search_nodes"),
SLCX_VAR("pf.npf.npf_rail_firstred_penalty"),
SLCX_VAR("pf.npf.npf_rail_firstred_exit_penalty"),
SLCX_VAR("pf.npf.npf_rail_lastred_penalty"),
SLCX_VAR("pf.npf.npf_rail_station_penalty"),
SLCX_VAR("pf.npf.npf_rail_slope_penalty"),
SLCX_VAR("pf.npf.npf_rail_curve_penalty"),
SLCX_VAR("pf.npf.npf_rail_depot_reverse_penalty"),
SLCX_VAR("pf.npf.npf_rail_pbs_cross_penalty"),
SLCX_VAR("pf.npf.npf_rail_pbs_signal_back_penalty"),
SLCX_VAR("pf.npf.npf_buoy_penalty"),
SLCX_VAR("pf.npf.npf_water_curve_penalty"),
SLCX_VAR("pf.npf.npf_road_curve_penalty"),
SLCX_VAR("pf.npf.npf_crossing_penalty"),
SLCX_VAR("pf.npf.npf_road_drive_through_penalty"),
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // pf.npf.npf_road_trafficlight_penalty
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // pf.npf.npf_road_trafficlight_penalty
SLCX_VAR("pf.npf.npf_road_dt_occupied_penalty"),
SLCX_VAR("pf.npf.npf_road_bay_occupied_penalty"),
SLCX_VAR("pf.npf.maximum_go_to_depot_penalty"),
SLCX_VAR("pf.yapf.disable_node_optimization"),
SLCX_VAR("pf.yapf.max_search_nodes"),
SLCX_VAR("pf.yapf.rail_firstred_twoway_eol"),
SLCX_VAR("pf.yapf.rail_firstred_penalty"),
SLCX_VAR("pf.yapf.rail_firstred_exit_penalty"),
SLCX_VAR("pf.yapf.rail_lastred_penalty"),
SLCX_VAR("pf.yapf.rail_lastred_exit_penalty"),
SLCX_VAR("pf.yapf.rail_station_penalty"),
SLCX_VAR("pf.yapf.rail_slope_penalty"),
SLCX_VAR("pf.yapf.rail_curve45_penalty"),
SLCX_VAR("pf.yapf.rail_curve90_penalty"),
SLCX_VAR("pf.yapf.rail_depot_reverse_penalty"),
SLCX_VAR("pf.yapf.rail_crossing_penalty"),
SLCX_VAR("pf.yapf.rail_look_ahead_max_signals"),
SLCX_VAR("pf.yapf.rail_look_ahead_signal_p0"),
SLCX_VAR("pf.yapf.rail_look_ahead_signal_p1"),
SLCX_VAR("pf.yapf.rail_look_ahead_signal_p2"),
SLCX_VAR("pf.yapf.rail_pbs_cross_penalty"),
SLCX_VAR("pf.yapf.rail_pbs_station_penalty"),
SLCX_VAR("pf.yapf.rail_pbs_signal_back_penalty"),
SLCX_VAR("pf.yapf.rail_doubleslip_penalty"),
SLCX_VAR("pf.yapf.rail_longer_platform_penalty"),
SLCX_VAR("pf.yapf.rail_longer_platform_per_tile_penalty"),
SLCX_VAR("pf.yapf.rail_shorter_platform_penalty"),
SLCX_VAR("pf.yapf.rail_shorter_platform_per_tile_penalty"),
SLCX_VAR("pf.yapf.road_slope_penalty"),
SLCX_VAR("pf.yapf.road_curve_penalty"),
SLCX_VAR("pf.yapf.road_crossing_penalty"),
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP)), // pf.yapf.road_trafficlight_penalty
SLCX_NULL_X(4, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // pf.yapf.road_trafficlight_penalty
SLCX_VAR("pf.yapf.road_stop_penalty"),
SLCX_VAR("pf.yapf.road_stop_occupied_penalty"),
SLCX_VAR("pf.yapf.road_stop_bay_occupied_penalty"),
SLCX_VAR("pf.yapf.maximum_go_to_depot_penalty"),
SLCX_VAR("pf.yapf.ship_curve45_penalty"),
SLCX_VAR("pf.yapf.ship_curve90_penalty"),
SLCX_VAR("game_creation.land_generator"),
SLCX_VAR("game_creation.oil_refinery_limit"),
SLCX_VAR("game_creation.tgen_smoothness"),
SLCX_VAR("game_creation.variety"),
SLCX_VAR("game_creation.generation_seed"),
SLCX_VAR("game_creation.tree_placer"),
SLCX_VAR("construction.freeform_edges"),
SLCX_VAR("game_creation.water_borders"),
SLCX_VAR("game_creation.custom_town_number"),
SLCX_VAR("construction.extra_tree_placement"),
SLCX_NULL_X(3, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)), // construction.{tree_placement_drag_limit, ingame_tree_line_height, tree_growth_rate}
SLCX_XREF("construction.tree_growth_rate", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_XREF("construction.trees_around_snow_line_range", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("game_creation.custom_terrain_type"),
SLCX_VAR("game_creation.custom_sea_level"),
SLCX_VAR("game_creation.min_river_length"),
SLCX_VAR("game_creation.river_route_random"),
SLCX_VAR("game_creation.amount_of_rivers"),
SLCX_XREF("game_creation.build_public_roads", SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_JOKERPP)),
SLCX_VAR("locale.currency"),
SLCX_VAR("units"),
SLCX_VAR("locale.units_velocity"),
SLCX_VAR("locale.units_power"),
SLCX_VAR("locale.units_weight"),
SLCX_VAR("locale.units_volume"),
SLCX_VAR("locale.units_force"),
SLCX_VAR("locale.units_height"),
SLCX_VAR("locale.digit_group_separator"),
SLCX_VAR("locale.digit_group_separator_currency"),
SLCX_VAR("locale.digit_decimal_separator"),
SLCX_NULL_X(2, SL_MIN_VERSION, SL_MAX_VERSION, SlXvFeatureTest(XSLFTO_AND, XSLFI_SPRINGPP, 7)), // gui.time_in_minutes, gui.ticks_per_minute
};
#undef SLCX_VAR
#undef SLCX_NULL_X
#undef SLCX_NULL
#undef SLCX_NULL_X
#undef SLCX_XREF
#undef SLCX_XREFCVT
#endif /* SETTINGS_COMPAT_H */
Loading…
Cancel
Save