summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubidium <rubidium@openttd.org>2021-07-08 19:12:10 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-07-09 22:53:30 +0200
commit94881f5a34340c0398599e09d27c0c9a205294b4 (patch)
tree8c6f8ddbaa7e1ffe8c0cbdefebb3c2af0573e62d
parenta70aa5df4938a6a4459690c4666a5c39a3f5bf98 (diff)
downloadopenttd-94881f5a34340c0398599e09d27c0c9a205294b4.tar.xz
Codechange: name a few unnamed settings as to not to have to check for that being empty
-rw-r--r--src/saveload/compat/settings_sl_compat.h10
-rw-r--r--src/saveload/settings_sl.cpp3
-rw-r--r--src/table/settings/game_settings.ini10
3 files changed, 12 insertions, 11 deletions
diff --git a/src/saveload/compat/settings_sl_compat.h b/src/saveload/compat/settings_sl_compat.h
index 081779bf5..00bc026a4 100644
--- a/src/saveload/compat/settings_sl_compat.h
+++ b/src/saveload/compat/settings_sl_compat.h
@@ -107,11 +107,11 @@ const SaveLoadCompat _settings_sl_compat[] = {
SLC_VAR("vehicle.max_roadveh"),
SLC_VAR("vehicle.max_aircraft"),
SLC_VAR("vehicle.max_ships"),
- SLC_VAR("_old_vds.servint_ispercent"),
- SLC_VAR("_old_vds.servint_trains"),
- SLC_VAR("_old_vds.servint_roadveh"),
- SLC_VAR("_old_vds.servint_ships"),
- SLC_VAR("_old_vds.servint_aircraft"),
+ SLC_VAR("vehicle.servint_ispercent"),
+ SLC_VAR("vehicle.servint_trains"),
+ SLC_VAR("vehicle.servint_roadveh"),
+ SLC_VAR("vehicle.servint_ships"),
+ SLC_VAR("vehicle.servint_aircraft"),
SLC_VAR("order.no_servicing_if_no_breakdowns"),
SLC_VAR("vehicle.wagon_speed_limits"),
SLC_VAR("vehicle.disable_elrails"),
diff --git a/src/saveload/settings_sl.cpp b/src/saveload/settings_sl.cpp
index f19ff910c..8b683564b 100644
--- a/src/saveload/settings_sl.cpp
+++ b/src/saveload/settings_sl.cpp
@@ -91,7 +91,8 @@ static std::vector<SaveLoad> GetSettingsDesc(const SettingTable &settings, bool
SaveLoad sv = sd->save;
/* Replace the name with the actual name of the setting. */
- if (!sd->name.empty()) sv.name = sd->name;
+ assert(!sd->name.empty());
+ sv.name = sd->name;
saveloads.push_back(sv);
}
diff --git a/src/table/settings/game_settings.ini b/src/table/settings/game_settings.ini
index 2a51279e5..d51fbbf02 100644
--- a/src/table/settings/game_settings.ini
+++ b/src/table/settings/game_settings.ini
@@ -360,14 +360,14 @@ cat = SC_EXPERT
## Old vehicle settings.
[SDTG_BOOL]
-name = """"
+name = ""vehicle.servint_ispercent""
flags = SF_NO_NETWORK
var = _old_vds.servint_ispercent
def = false
to = SLV_120
[SDTG_VAR]
-name = """"
+name = ""vehicle.servint_trains""
type = SLE_UINT16
flags = SF_GUI_0_IS_SPECIAL
var = _old_vds.servint_trains
@@ -377,7 +377,7 @@ max = 800
to = SLV_120
[SDTG_VAR]
-name = """"
+name = ""vehicle.servint_roadveh""
type = SLE_UINT16
flags = SF_GUI_0_IS_SPECIAL
var = _old_vds.servint_roadveh
@@ -387,7 +387,7 @@ max = 800
to = SLV_120
[SDTG_VAR]
-name = """"
+name = ""vehicle.servint_ships""
type = SLE_UINT16
flags = SF_GUI_0_IS_SPECIAL
var = _old_vds.servint_ships
@@ -397,7 +397,7 @@ max = 800
to = SLV_120
[SDTG_VAR]
-name = """"
+name = ""vehicle.servint_aircraft""
type = SLE_UINT16
flags = SF_GUI_0_IS_SPECIAL
var = _old_vds.servint_aircraft