summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-14 10:05:30 +0200
committerPatric Stout <github@truebrain.nl>2021-07-02 22:21:58 +0200
commit7dd5fd6ed497e1da40c13075d6e37b54ab12a082 (patch)
tree19f2e49e0e9ad714cec2fcf917dca954d33d8c0a /src/settings.cpp
parent513641f9baaa732ab8000bc452a26284ae601f32 (diff)
downloadopenttd-7dd5fd6ed497e1da40c13075d6e37b54ab12a082.tar.xz
Feature: framework to make savegames self-descriptive
We won't be able to make it fully self-descriptive (looking at you MAP-chunks), but anything else can. With this framework, we can add headers for each chunk explaining how each chunk looks like in detail. They also will all be tables, making it a lot easier to read in external tooling, and opening the way to consider a database (like SQLite) to use as savegame format. Lastly, with the headers in the savegame, you can freely add fields without needing a savegame version bump; older versions of OpenTTD will simply ignore the new field. This also means we can remove all the SLE_CONDNULL, as they are irrelevant. The next few commits will start using this framework.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 9847a0ff9..6368dea11 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -2194,7 +2194,7 @@ static std::vector<SaveLoad> GetSettingsDesc(const SettingTable &settings, bool
if (is_loading && (sd->flags & SF_NO_NETWORK_SYNC) && _networking && !_network_server) {
/* We don't want to read this setting, so we do need to skip over it. */
- saveloads.push_back({sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0, nullptr});
+ saveloads.push_back({sd->name, sd->save.cmd, GetVarFileType(sd->save.conv) | SLE_VAR_NULL, sd->save.length, sd->save.version_from, sd->save.version_to, 0, nullptr, 0, nullptr});
continue;
}