Merge branch 'master' into jgrpp

# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2022-10-16 20:14:13 +01:00
82 changed files with 778 additions and 341 deletions

View File

@@ -145,15 +145,16 @@ void ScriptScanner::RegisterScript(ScriptInfo *info)
}
}
char *ScriptScanner::GetConsoleList(char *p, const char *last, bool newest_only) const
std::string ScriptScanner::GetConsoleList(bool newest_only) const
{
p += seprintf(p, last, "List of %s:\n", this->GetScannerName());
std::string p;
p += stdstr_fmt("List of %s:\n", this->GetScannerName());
const ScriptInfoList &list = newest_only ? this->info_single_list : this->info_list;
for (const auto &item : list) {
ScriptInfo *i = item.second;
p += seprintf(p, last, "%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
p += stdstr_fmt("%10s (v%d): %s\n", i->GetName(), i->GetVersion(), i->GetDescription());
}
p += seprintf(p, last, "\n");
p += "\n";
return p;
}