(svn r22194) -Codechange: use the defaults feature of settingsgen to remove the need to state the "default" value for all items
This commit is contained in:
@@ -35,6 +35,15 @@ SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $d
|
||||
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $proc),
|
||||
SDT_END = SDT_END()
|
||||
|
||||
[defaults]
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
|
||||
|
||||
|
||||
[SDTG_GENERAL]
|
||||
name = ""diff_custom""
|
||||
@@ -42,16 +51,12 @@ sdt_cmd = SDT_INTLIST
|
||||
sle_cmd = SL_ARR
|
||||
type = SLE_FILE_I16 | SLE_VAR_U16
|
||||
flags = C
|
||||
guiflags = 0
|
||||
var = _old_diff_custom
|
||||
length = 17
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0
|
||||
interval = 0
|
||||
full = NULL
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
from = 0
|
||||
to = 3
|
||||
|
||||
@@ -61,16 +66,12 @@ sdt_cmd = SDT_INTLIST
|
||||
sle_cmd = SL_ARR
|
||||
type = SLE_UINT16
|
||||
flags = C
|
||||
guiflags = 0
|
||||
var = _old_diff_custom
|
||||
length = 18
|
||||
def = 0
|
||||
min = 0
|
||||
max = 0
|
||||
interval = 0
|
||||
full = NULL
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
from = 4
|
||||
to = SL_MAX_VERSION
|
||||
|
||||
@@ -79,40 +80,27 @@ to = SL_MAX_VERSION
|
||||
base = GameSettings
|
||||
var = difficulty.diff_level
|
||||
type = SLE_UINT8
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
def = 3
|
||||
min = 0
|
||||
max = 3
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.currency
|
||||
type = SLE_UINT8
|
||||
flags = N
|
||||
guiflags = 0
|
||||
def = 0
|
||||
max = CUSTOM_CURRENCY_ID
|
||||
full = _locale_currencies
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = locale.units
|
||||
type = SLE_UINT8
|
||||
flags = N
|
||||
guiflags = 0
|
||||
def = 1
|
||||
max = 2
|
||||
full = _locale_units
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
|
||||
# There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow
|
||||
# these bigger values (21-255). Invalid values will fallback to english on use and (undefined string) in GUI.
|
||||
@@ -120,40 +108,26 @@ load = NULL
|
||||
base = GameSettings
|
||||
var = game_creation.town_name
|
||||
type = SLE_UINT8
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
def = 0
|
||||
max = 255
|
||||
full = _town_names
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = game_creation.landscape
|
||||
type = SLE_UINT8
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
def = 0
|
||||
max = 3
|
||||
full = _climates
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = ConvertLandscape
|
||||
|
||||
[SDT_VAR]
|
||||
base = GameSettings
|
||||
var = game_creation.snow_line
|
||||
type = SLE_UINT8
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
def = DEF_SNOWLINE_HEIGHT * TILE_HEIGHT
|
||||
min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
|
||||
max = MAX_SNOWLINE_HEIGHT * TILE_HEIGHT
|
||||
interval = 0
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
|
||||
[SDT_CONDNULL]
|
||||
length = 1
|
||||
@@ -166,25 +140,17 @@ type = SLE_UINT8
|
||||
from = 23
|
||||
to = SL_MAX_VERSION
|
||||
flags = S
|
||||
guiflags = 0
|
||||
def = 1
|
||||
max = 4
|
||||
full = _autosave_interval
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
|
||||
[SDT_OMANY]
|
||||
base = GameSettings
|
||||
var = vehicle.road_side
|
||||
type = SLE_UINT8
|
||||
flags = 0
|
||||
guiflags = 0
|
||||
def = 1
|
||||
max = 1
|
||||
full = _roadsides
|
||||
str = STR_NULL
|
||||
proc = NULL
|
||||
load = NULL
|
||||
|
||||
[SDT_END]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user