diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-20 17:59:24 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-20 17:59:24 +0000 |
commit | 519c4161d5824b64c01e740ccdbe7f7e11dd979e (patch) | |
tree | 445dd7beb26526a8531f009abbdac31afffc3d5f /console_cmds.c | |
parent | 1ab7238c15ca4acfb5c49088d80d3177cb77bb01 (diff) | |
download | openttd-519c4161d5824b64c01e740ccdbe7f7e11dd979e.tar.xz |
(svn r2352) - Feature: add the possibility to print out the current debug-level
Diffstat (limited to 'console_cmds.c')
-rw-r--r-- | console_cmds.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/console_cmds.c b/console_cmds.c index d10c36ebf..fb68c01b5 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -833,13 +833,17 @@ DEF_CONSOLE_CMD(ConInfoCmd) DEF_CONSOLE_CMD(ConDebugLevel) { if (argc == 0) { - IConsoleHelp("Set the default debugging level for the game. Usage: 'debug_level <level>'"); + IConsoleHelp("Get/set the default debugging level for the game. Usage: 'debug_level [<level>]'"); IConsoleHelp("Level can be any combination of names, levels. Eg 'net=5 ms=4'. Remember to enclose it in \"'s"); return true; } - if (argc < 2) return false; - SetDebugString(argv[1]); + if (argc > 2) return false; + + if (argc == 1) { + IConsolePrintF(_icolour_def, "Current debug-level: '%s'", GetDebugString()); + } else SetDebugString(argv[1]); + return true; } |