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

Method GetConsoleList

src/script/script_scanner.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void ScriptScanner::GetConsoleList(std::back_insert_iterator<std::string> &output_iterator, bool newest_only) const
132{
133 fmt::format_to(output_iterator, "List of {}:\n", this->GetScannerName());
134 const ScriptInfoList &list = newest_only ? this->info_single_list : this->info_list;
135 for (const auto &item : list) {
136 ScriptInfo *i = item.second;
137 fmt::format_to(output_iterator, "{:>10} (v{:d}): {}\n", i->GetName(), i->GetVersion(), i->GetDescription());
138 }
139 fmt::format_to(output_iterator, "\n");
140}
141
142/** Helper for creating a MD5sum of all files within of a script. */
143struct ScriptFileChecksumCreator : FileScanner {

Callers

nothing calls this directly

Calls 5

format_toFunction · 0.50
GetScannerNameMethod · 0.45
GetNameMethod · 0.45
GetVersionMethod · 0.45
GetDescriptionMethod · 0.45

Tested by

no test coverage detected