Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_cmd.cpp
#	src/lang/greek.txt
#	src/table/settings.ini
This commit is contained in:
Jonathan G Rennison
2021-03-02 13:42:11 +00:00
30 changed files with 307 additions and 107 deletions

View File

@@ -22,6 +22,9 @@ SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $in
SDT_NULL = SDT_NULL($length, $from, $to, $extver),
SDT_END = SDT_END()
[validation]
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
[defaults]
flags = 0
guiflags = SGF_PER_COMPANY

View File

@@ -14,6 +14,9 @@ SDT_CHR = SDT_CHR($base, $var, $flags, $guiflags, $def,
SDT_STR = SDT_STR($base, $var, $type, $flags, $guiflags, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat, $startup, $extver, nullptr),
SDT_END = SDT_END()
[validation]
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NONE

View File

@@ -47,6 +47,13 @@ SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $ma
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $startup, $extver, nullptr, $orderproc),
SDT_END = SDT_END()
[validation]
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTG_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
[defaults]
flags = 0
guiflags = SGF_NONE
@@ -151,7 +158,8 @@ var = game_creation.snow_line_height
type = SLE_UINT8
def = DEF_SNOWLINE_HEIGHT * TILE_HEIGHT
min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
max = MAX_SNOWLINE_HEIGHT * TILE_HEIGHT
# "max" used to be MAX_SNOWLINE_HEIGHT * TILE_HEIGHT, but this would overflow the storage.
max = UINT8_MAX
to = SLV_22
;;game_creation.desert_amount

View File

@@ -26,6 +26,10 @@ SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def,
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $startup, $extver, nullptr, $orderproc),
SDTG_END = SDTG_END()
[validation]
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTG_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NONE

View File

@@ -153,6 +153,14 @@ SDT_END = SDT_END()
SDT_LINKGRAPH_PER_CARGO = SDT_ENUM(GameSettings, linkgraph.distribution_per_cargo[$linkgraph_cargo], SLE_UINT8, $flags | SLF_NOT_IN_CONFIG, $guiflags | SGF_NO_NEWGAME, DT_PER_CARGO_DEFAULT, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO, STR_CONFIG_SETTING_DISTRIBUTION_PER_CARGO_HELPTEXT, $proc, $from, $to, SC_EXPERT, false, SlXvFeatureTest(XSLFTO_AND, XSLFI_LINKGRAPH_MODES), nullptr, _linkgraph_mode_per_cargo),
[validation]
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTG_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
[defaults]
flags = 0
guiflags = SGF_NONE
@@ -592,7 +600,7 @@ type = SLE_UINT16
from = SLV_156
def = 4096
min = 0
max = 1 << 30
max = 1 << 15
interval = 1
cat = SC_EXPERT
@@ -614,7 +622,7 @@ type = SLE_UINT16
from = SLV_156
def = 4096
min = 0
max = 1 << 30
max = 1 << 15
interval = 1
cat = SC_EXPERT
@@ -636,7 +644,7 @@ type = SLE_UINT16
from = SLV_175
def = 4096
min = 0
max = 1 << 30
max = 1 << 15
interval = 1
cat = SC_EXPERT
@@ -657,7 +665,7 @@ var = construction.purchase_land_frame_burst
type = SLE_UINT16
def = 1024
min = 0
max = 1 << 30
max = 1 << 15
interval = 1
cat = SC_EXPERT
patxname = ""buy_land_rate_limit.construction.purchase_land_frame_burst""
@@ -679,7 +687,7 @@ var = construction.build_object_frame_burst
type = SLE_UINT16
def = 2048
min = 0
max = 1 << 30
max = 1 << 15
interval = 1
cat = SC_EXPERT
patxname = ""build_object_rate_limit.construction.build_object_frame_burst""
@@ -5209,7 +5217,7 @@ flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_0ISDISABLED | SGF_NO_NETWORK
def = 2500
min = 0
max = 100000
max = 50000
interval = 10
str = STR_CONFIG_SETTING_FAST_FORWARD_SPEED_LIMIT
strhelp = STR_CONFIG_SETTING_FAST_FORWARD_SPEED_LIMIT_HELPTEXT

View File

@@ -18,6 +18,9 @@ SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def,
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $startup, $extver, nullptr, $orderproc),
SDTG_END = SDTG_END()
[validation]
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NONE

View File

@@ -14,6 +14,9 @@ SDT_BOOL = SDT_BOOL($base, $var, $flags, $guiflags, $def,
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $startup, $extver, nullptr, $orderproc),
SDT_END = SDT_END()
[validation]
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
[defaults]
base = WindowDesc
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC