ChillPP: Add support for loading compatible linkgraph settings
This commit is contained in:
@@ -289,7 +289,7 @@ See [jgrpp-changelog.md](jgrpp-changelog.md) for changelog.
|
||||
* This is not guaranteed to be bug free
|
||||
* Speed signals are cleared, leaving ordinary signals
|
||||
* Various vehicle, economy, town and other settings are not supported
|
||||
* Link graph data and settings are cleared
|
||||
* Link graph data (but not settings) is cleared
|
||||
* Train stuck counters, traffic lights and other features not in this patch pack are dropped/ignored.
|
||||
|
||||
#### A note on branches
|
||||
|
@@ -846,7 +846,7 @@ bool AfterLoadGame()
|
||||
_settings_game.construction.max_tunnel_length = 64;
|
||||
}
|
||||
if (IsSavegameVersionBefore(SLV_166)) _settings_game.economy.infrastructure_maintenance = false;
|
||||
if (IsSavegameVersionBefore(SLV_183)) {
|
||||
if (IsSavegameVersionBefore(SLV_183) && SlXvIsFeatureMissing(XSLFI_CHILLPP)) {
|
||||
_settings_game.linkgraph.distribution_pax = DT_MANUAL;
|
||||
_settings_game.linkgraph.distribution_mail = DT_MANUAL;
|
||||
_settings_game.linkgraph.distribution_armoured = DT_MANUAL;
|
||||
|
@@ -1532,6 +1532,11 @@ static int OrderTownGrowthRate(uint nth)
|
||||
|
||||
/* Begin - xref conversion callbacks */
|
||||
|
||||
static int64 LinkGraphDistModeXrefChillPP(int64 val)
|
||||
{
|
||||
return val ^ 2;
|
||||
}
|
||||
|
||||
/* End - xref conversion callbacks */
|
||||
|
||||
/**
|
||||
|
@@ -67,6 +67,8 @@ static int OrderTownGrowthRate(uint nth);
|
||||
|
||||
/* Begin - xref conversion callbacks */
|
||||
|
||||
static int64 LinkGraphDistModeXrefChillPP(int64 val);
|
||||
|
||||
/* End - xref conversion callbacks */
|
||||
|
||||
static const SettingDescEnumEntry _linkgraph_mode_symmetric[] = {
|
||||
@@ -2640,9 +2642,50 @@ extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
|
||||
length = 6
|
||||
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_CHILLPP, SL_CHILLPP_232)
|
||||
|
||||
;; linkgraph...
|
||||
[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 = 11
|
||||
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
|
||||
|
Reference in New Issue
Block a user