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

Function ConListHeightmaps

src/console_cmds.cpp:599–612  ·  view source on GitHub ↗

List all the heightmaps */

Source from the content-addressed store, hash-verified

597
598/* List all the heightmaps */
599static bool ConListHeightmaps(std::span<std::string_view> argv)
600{
601 if (argv.empty()) {
602 IConsolePrint(CC_HELP, "List all loadable heightmaps. Usage: 'list_heightmaps'.");
603 return true;
604 }
605
606 _console_file_list_heightmap.ValidateFileList(true);
607 for (uint i = 0; i < _console_file_list_heightmap.size(); i++) {
608 IConsolePrint(CC_DEFAULT, "{}) {}", i, _console_file_list_heightmap[i].title.GetDecodedString());
609 }
610
611 return true;
612}
613
614/* Change the dir via console */
615static bool ConChangeDirectory(std::span<std::string_view> argv)

Callers

nothing calls this directly

Calls 5

ValidateFileListMethod · 0.80
GetDecodedStringMethod · 0.80
IConsolePrintFunction · 0.70
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected