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

Method SettingsToString

src/script/script_config.cpp:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164std::string ScriptConfig::SettingsToString() const
165{
166 if (this->settings.empty()) return {};
167
168 std::string result;
169 for (const auto &item : this->settings) {
170 format_append(result, "{}={},", item.first, item.second);
171 }
172
173 /* Remove the last ','. */
174 result.resize(result.size() - 1);
175 return result;
176}
177
178std::optional<std::string> ScriptConfig::GetTextfile(TextfileType type, CompanyID slot) const
179{

Callers 4

AISaveConfigFunction · 0.80
GameSaveConfigFunction · 0.80
SaveReal_AIPLFunction · 0.80
SaveReal_GSDTFunction · 0.80

Calls 4

format_appendFunction · 0.85
resizeMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected