You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
335 lines
10 KiB
INI
335 lines
10 KiB
INI
; 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/>.
|
|
;
|
|
|
|
; Linkgraph settings as stored in the main configuration file ("openttd.cfg")
|
|
; and in the savegame PATS chunk and in the linkgraph chunks for each job running.
|
|
|
|
[pre-amble]
|
|
|
|
static int64_t LinkGraphDistModeXrefChillPP(int64_t val);
|
|
static bool LinkGraphDistributionSettingGUI(SettingOnGuiCtrlData &data);
|
|
|
|
static const SettingDescEnumEntry _linkgraph_mode_symmetric[] = {
|
|
{ DT_MANUAL, STR_CONFIG_SETTING_DISTRIBUTION_MANUAL },
|
|
{ DT_SYMMETRIC, STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC },
|
|
{ DT_ASYMMETRIC, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC },
|
|
{ DT_ASYMMETRIC_EQ, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_EQ },
|
|
{ DT_ASYMMETRIC_NEAR, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_NEAREST },
|
|
{ 0, STR_NULL }
|
|
};
|
|
|
|
static const SettingDescEnumEntry _linkgraph_mode_asymmetric[] = {
|
|
{ DT_MANUAL, STR_CONFIG_SETTING_DISTRIBUTION_MANUAL },
|
|
{ DT_ASYMMETRIC, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC },
|
|
{ DT_ASYMMETRIC_EQ, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_EQ },
|
|
{ DT_ASYMMETRIC_NEAR, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_NEAREST },
|
|
{ 0, STR_NULL }
|
|
};
|
|
|
|
static const SettingDescEnumEntry _linkgraph_mode_per_cargo[] = {
|
|
{ DT_PER_CARGO_DEFAULT, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_DEFAULT },
|
|
{ DT_MANUAL, STR_CONFIG_SETTING_DISTRIBUTION_MANUAL },
|
|
{ DT_SYMMETRIC, STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC },
|
|
{ DT_ASYMMETRIC, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC },
|
|
{ DT_ASYMMETRIC_EQ, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_EQ },
|
|
{ DT_ASYMMETRIC_NEAR, STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC_NEAREST },
|
|
{ 0, STR_NULL }
|
|
};
|
|
|
|
static const SettingTable _linkgraph_settings{
|
|
[post-amble]
|
|
};
|
|
[templates]
|
|
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, $extver, $cat, $guiproc, $startup, $patxname),
|
|
SDT_ENUM = SDT_ENUM(GameSettings, $var, $type, $flags, $def, $str, $strhelp, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $extver, $cat, $guiproc, $startup, $patxname, $enumlist),
|
|
SDT_NAMED_NULL = SDT_NAMED_NULL($name, $length, $from, $to, $extver, $patxname),
|
|
SDT_LINKGRAPH_PER_CARGO = SDT_ENUM(GameSettings, linkgraph.distribution_per_cargo[$linkgraph_cargo], SLE_UINT8, $flags | SF_NOT_IN_CONFIG | SF_NO_NEWGAME | SF_PATCH, DT_PER_CARGO_DEFAULT, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_HELPTEXT, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, SlXvFeatureTest(XSLFTO_AND, XSLFI_LINKGRAPH_MODES), SC_EXPERT, LinkGraphDistributionSettingGUI, false, nullptr, _linkgraph_mode_per_cargo),
|
|
|
|
[validation]
|
|
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
|
|
|
[defaults]
|
|
flags = SF_NONE
|
|
interval = 0
|
|
str = STR_NULL
|
|
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
|
|
guiproc = nullptr
|
|
load = nullptr
|
|
from = SL_MIN_VERSION
|
|
to = SL_MAX_VERSION
|
|
cat = SC_ADVANCED
|
|
startup = false
|
|
extver = SlXvFeatureTest()
|
|
patxname = nullptr
|
|
enumlist = <this parameter must be set>
|
|
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.recalc_interval
|
|
type = SLE_UINT16
|
|
from = SLV_183
|
|
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
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.recalc_time
|
|
type = SLE_UINT16
|
|
from = SLV_183
|
|
def = 32
|
|
min = 1
|
|
max = 9000
|
|
interval = 1
|
|
str = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME
|
|
strval = STR_CONFIG_SETTING_SECONDS_VALUE
|
|
strhelp = STR_CONFIG_SETTING_LINKGRAPH_RECALC_TIME_HELPTEXT
|
|
|
|
[SDT_NAMED_NULL]
|
|
name = ""linkgraph.recalc_not_scaled_by_daylength""
|
|
length = 1
|
|
extver = SlXvFeatureTest([](uint16_t version, bool version_in_range, const std::array<uint16_t, XSLFI_SIZE> &feature_versions) -> bool { return version_in_range && SlXvIsFeaturePresent(feature_versions, XSLFI_LINKGRAPH_DAY_SCALE, 1, 1) && !SlXvIsFeaturePresent(feature_versions, XSLFI_JOKERPP); })
|
|
patxname = ""linkgraph_day_scale.linkgraph.recalc_not_scaled_by_daylength""
|
|
|
|
[SDT_ENUM]
|
|
var = linkgraph.distribution_pax
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = DT_MANUAL
|
|
enumlist = _linkgraph_mode_symmetric
|
|
str = STR_CONFIG_SETTING_DISTRIBUTION_PAX
|
|
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT
|
|
guiproc = LinkGraphDistributionSettingGUI
|
|
|
|
[SDT_ENUM]
|
|
var = linkgraph.distribution_mail
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = DT_MANUAL
|
|
enumlist = _linkgraph_mode_symmetric
|
|
str = STR_CONFIG_SETTING_DISTRIBUTION_MAIL
|
|
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT
|
|
guiproc = LinkGraphDistributionSettingGUI
|
|
|
|
[SDT_ENUM]
|
|
var = linkgraph.distribution_armoured
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = DT_MANUAL
|
|
enumlist = _linkgraph_mode_symmetric
|
|
str = STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED
|
|
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT
|
|
guiproc = LinkGraphDistributionSettingGUI
|
|
|
|
[SDT_ENUM]
|
|
var = linkgraph.distribution_default
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = DT_MANUAL
|
|
enumlist = _linkgraph_mode_asymmetric
|
|
str = STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT
|
|
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT
|
|
guiproc = LinkGraphDistributionSettingGUI
|
|
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 0
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 1
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 2
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 3
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 4
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 5
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 6
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 7
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 8
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 9
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 10
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 11
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 12
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 13
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 14
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 15
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 16
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 17
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 18
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 19
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 20
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 21
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 22
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 23
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 24
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 25
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 26
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 27
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 28
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 29
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 30
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 31
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 32
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 33
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 34
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 35
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 36
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 37
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 38
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 39
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 40
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 41
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 42
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 43
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 44
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 45
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 46
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 47
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 48
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 49
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 50
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 51
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 52
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 53
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 54
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 55
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 56
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 57
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 58
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 59
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 60
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 61
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 62
|
|
[SDT_LINKGRAPH_PER_CARGO]
|
|
linkgraph_cargo = 63
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.accuracy
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = 16
|
|
min = 2
|
|
max = 64
|
|
interval = 1
|
|
str = STR_CONFIG_SETTING_LINKGRAPH_ACCURACY
|
|
strval = STR_JUST_COMMA
|
|
strhelp = STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.demand_distance
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = 100
|
|
min = 0
|
|
max = 255
|
|
interval = 5
|
|
str = STR_CONFIG_SETTING_DEMAND_DISTANCE
|
|
strval = STR_CONFIG_SETTING_PERCENTAGE
|
|
strhelp = STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.demand_size
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = 100
|
|
min = 0
|
|
max = 100
|
|
interval = 5
|
|
str = STR_CONFIG_SETTING_DEMAND_SIZE
|
|
strval = STR_CONFIG_SETTING_PERCENTAGE
|
|
strhelp = STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.short_path_saturation
|
|
type = SLE_UINT8
|
|
from = SLV_183
|
|
def = 80
|
|
min = 0
|
|
max = 250
|
|
interval = 5
|
|
str = STR_CONFIG_SETTING_SHORT_PATH_SATURATION
|
|
strval = STR_CONFIG_SETTING_PERCENTAGE
|
|
strhelp = STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT
|
|
|
|
[SDT_VAR]
|
|
var = linkgraph.aircraft_link_scale
|
|
type = SLE_UINT16
|
|
flags = SF_PATCH
|
|
def = 100
|
|
min = 100
|
|
max = 1000
|
|
interval = 50
|
|
str = STR_CONFIG_SETTING_AIRCRAFT_PATH_COST
|
|
strval = STR_CONFIG_SETTING_PERCENTAGE
|
|
strhelp = STR_CONFIG_SETTING_AIRCRAFT_PATH_COST_HELPTEXT
|
|
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_LINKGRAPH_AIRCRAFT)
|