MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetSaveLoadSettingTable

Function GetSaveLoadSettingTable

src/settings.cpp:1678–1701  ·  view source on GitHub ↗

* Create a single table with all settings that should be stored/loaded * in the savegame. */

Source from the content-addressed store, hash-verified

1676 * in the savegame.
1677 */
1678SettingTable GetSaveLoadSettingTable()
1679{
1680 static const SettingTable saveload_settings_tables[] = {
1681 _difficulty_settings,
1682 _economy_settings,
1683 _game_settings,
1684 _linkgraph_settings,
1685 _locale_settings,
1686 _pathfinding_settings,
1687 _script_settings,
1688 _world_settings,
1689 };
1690 static std::vector<SettingVariant> settings_table;
1691
1692 if (settings_table.empty()) {
1693 for (auto &saveload_settings_table : saveload_settings_tables) {
1694 for (auto &saveload_setting : saveload_settings_table) {
1695 settings_table.push_back(saveload_setting);
1696 }
1697 }
1698 }
1699
1700 return settings_table;
1701}
1702
1703/**
1704 * Given a name of setting, return a company setting description of it.

Callers 4

ResetSettingsFunction · 0.85
LoadMethod · 0.85
LoadCheckMethod · 0.85
SaveMethod · 0.85

Calls 2

push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected