1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Improve array formatting

For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
This commit is contained in:
Hielke Morsink
2021-10-17 15:31:56 +02:00
parent fe46a2cf09
commit 9dd20ec619
95 changed files with 4968 additions and 3709 deletions

View File

@@ -1774,6 +1774,7 @@ static constexpr const utf8* console_variable_table[] = {
"cheat_disable_support_limits",
"current_rotation",
};
static constexpr const utf8* console_window_table[] = {
"object_selection",
"inventions_list",
@@ -1781,8 +1782,9 @@ static constexpr const utf8* console_window_table[] = {
"objective_options",
"options",
"themes",
"title_sequences"
"title_sequences",
};
// clang-format on
static constexpr const console_command console_command_table[] = {
{ "abort", cc_abort, "Calls std::abort(), for testing purposes only.", "abort" },
@@ -1797,19 +1799,22 @@ static constexpr const console_command console_command_table[] = {
{ "get", cc_get, "Gets the value of the specified variable.", "get <variable>" },
{ "help", cc_help, "Lists commands or info about a command.", "help [command]" },
{ "hide", cc_hide, "Hides the console.", "hide" },
{ "load_object", cc_load_object, "Loads the object file into the scenario.\n"
"Loading a scenery group will not load its associated objects.\n"
"This is a safer method opposed to \"open object_selection\".",
"load_object <objectfilenodat>" },
{ "load_object", cc_load_object,
"Loads the object file into the scenario.\n"
"Loading a scenery group will not load its associated objects.\n"
"This is a safer method opposed to \"open object_selection\".",
"load_object <objectfilenodat>" },
{ "load_park", cc_load_park, "Load park from save directory or by absolute path", "load_park <filename>" },
{ "object_count", cc_object_count, "Shows the number of objects of each type in the scenario.", "object_count" },
{ "open", cc_open, "Opens the window with the give name.", "open <window>." },
{ "quit", cc_close, "Closes the console.", "quit" },
{ "remove_park_fences", cc_remove_park_fences, "Removes all park fences from the surface", "remove_park_fences" },
{ "remove_unused_objects", cc_remove_unused_objects, "Removes all the unused objects from the object selection.", "remove_unused_objects" },
{ "remove_floating_objects", cc_remove_floating_objects, "Removes floating objects", "remove_floating_objects"},
{ "remove_unused_objects", cc_remove_unused_objects, "Removes all the unused objects from the object selection.",
"remove_unused_objects" },
{ "remove_floating_objects", cc_remove_floating_objects, "Removes floating objects", "remove_floating_objects" },
{ "rides", cc_rides, "Ride management.", "rides <subcommand>" },
{ "save_park", cc_save_park, "Save current state of park. If no name specified default path will be used.", "save_park [name]" },
{ "save_park", cc_save_park, "Save current state of park. If no name specified default path will be used.",
"save_park [name]" },
{ "say", cc_say, "Say to other players.", "say <message>" },
{ "set", cc_set, "Sets the variable to the specified value.", "set <variable> <value>" },
{ "show_limits", cc_show_limits, "Shows the map data counts and limits.", "show_limits" },
@@ -1817,15 +1822,15 @@ static constexpr const console_command console_command_table[] = {
{ "terminate", cc_terminate, "Calls std::terminate(), for testing purposes only.", "terminate" },
{ "variables", cc_variables, "Lists all the variables that can be used with get and sometimes set.", "variables" },
{ "windows", cc_windows, "Lists all the windows that can be opened.", "windows" },
{ "replay_startrecord", cc_replay_startrecord, "Starts recording a new replay.", "replay_startrecord <name> [max_ticks]"},
{ "replay_stoprecord", cc_replay_stoprecord, "Stops recording a new replay.", "replay_stoprecord"},
{ "replay_start", cc_replay_start, "Starts a replay", "replay_start <name>"},
{ "replay_stop", cc_replay_stop, "Stops the replay", "replay_stop"},
{ "replay_normalise", cc_replay_normalise, "Normalises the replay to remove all gaps", "replay_normalise <input file> <output file>"},
{ "mp_desync", cc_mp_desync, "Forces a multiplayer desync", "cc_mp_desync [desync_type, 0 = Random t-shirt color on random guest, 1 = Remove random guest ]"},
{ "replay_startrecord", cc_replay_startrecord, "Starts recording a new replay.", "replay_startrecord <name> [max_ticks]" },
{ "replay_stoprecord", cc_replay_stoprecord, "Stops recording a new replay.", "replay_stoprecord" },
{ "replay_start", cc_replay_start, "Starts a replay", "replay_start <name>" },
{ "replay_stop", cc_replay_stop, "Stops the replay", "replay_stop" },
{ "replay_normalise", cc_replay_normalise, "Normalises the replay to remove all gaps",
"replay_normalise <input file> <output file>" },
{ "mp_desync", cc_mp_desync, "Forces a multiplayer desync",
"cc_mp_desync [desync_type, 0 = Random t-shirt color on random guest, 1 = Remove random guest ]" },
};
// clang-format on
static int32_t cc_windows(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
{