Linkgraph: Add asymmetric: equal and nearest demand distribution modes
This commit is contained in:
@@ -66,6 +66,22 @@ static int OrderTownGrowthRate(uint nth);
|
||||
|
||||
/* End - GUI order callbacks */
|
||||
|
||||
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 }
|
||||
};
|
||||
|
||||
/* Some settings do not need to be synchronised when playing in multiplayer.
|
||||
* These include for example the GUI settings and will not be saved with the
|
||||
* savegame.
|
||||
@@ -814,60 +830,44 @@ strhelp = STR_CONFIG_SETTING_LINKGRAPH_NOT_DAYLENGTH_SCALED_HELPTEXT
|
||||
extver = SlXvFeatureTest(XSLFTO_AND, XSLFI_LINKGRAPH_DAY_SCALE)
|
||||
patxname = ""linkgraph_day_scale.linkgraph.recalc_not_scaled_by_daylength""
|
||||
|
||||
[SDT_VAR]
|
||||
[SDT_ENUM]
|
||||
base = GameSettings
|
||||
var = linkgraph.distribution_pax
|
||||
type = SLE_UINT8
|
||||
from = SLV_183
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = DT_MANUAL
|
||||
min = DT_MIN
|
||||
max = DT_MAX
|
||||
interval = 1
|
||||
enumlist = _linkgraph_mode_symmetric
|
||||
str = STR_CONFIG_SETTING_DISTRIBUTION_PAX
|
||||
strval = STR_CONFIG_SETTING_DISTRIBUTION_MANUAL
|
||||
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT
|
||||
|
||||
[SDT_VAR]
|
||||
[SDT_ENUM]
|
||||
base = GameSettings
|
||||
var = linkgraph.distribution_mail
|
||||
type = SLE_UINT8
|
||||
from = SLV_183
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = DT_MANUAL
|
||||
min = DT_MIN
|
||||
max = DT_MAX
|
||||
interval = 1
|
||||
enumlist = _linkgraph_mode_symmetric
|
||||
str = STR_CONFIG_SETTING_DISTRIBUTION_MAIL
|
||||
strval = STR_CONFIG_SETTING_DISTRIBUTION_MANUAL
|
||||
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT
|
||||
|
||||
[SDT_VAR]
|
||||
[SDT_ENUM]
|
||||
base = GameSettings
|
||||
var = linkgraph.distribution_armoured
|
||||
type = SLE_UINT8
|
||||
from = SLV_183
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = DT_MANUAL
|
||||
min = DT_MIN
|
||||
max = DT_MAX
|
||||
interval = 1
|
||||
enumlist = _linkgraph_mode_symmetric
|
||||
str = STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED
|
||||
strval = STR_CONFIG_SETTING_DISTRIBUTION_MANUAL
|
||||
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT
|
||||
|
||||
[SDT_VAR]
|
||||
[SDT_ENUM]
|
||||
base = GameSettings
|
||||
var = linkgraph.distribution_default
|
||||
type = SLE_UINT8
|
||||
from = SLV_183
|
||||
guiflags = SGF_MULTISTRING
|
||||
def = DT_MANUAL
|
||||
min = DT_BEGIN
|
||||
max = DT_MAX_NONSYMMETRIC
|
||||
interval = 1
|
||||
enumlist = _linkgraph_mode_asymmetric
|
||||
str = STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT
|
||||
strval = STR_CONFIG_SETTING_DISTRIBUTION_MANUAL
|
||||
strhelp = STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT
|
||||
|
||||
[SDT_VAR]
|
||||
|
||||
Reference in New Issue
Block a user