5515: Include config info in help r=heinrich5991 a=def-

So it is clear what the default is

![screenshot-20220627@000811](https://user-images.githubusercontent.com/2335377/175835563-dd2abc4f-df83-43a7-bb60-7597d498aab7.png)
![screenshot-20220627@000545](https://user-images.githubusercontent.com/2335377/175835566-c983aa93-4a1d-471a-b183-1068050d196f.png)
![screenshot-20220627@000519](https://user-images.githubusercontent.com/2335377/175835569-796bcc4c-f9d2-4949-b1d5-b6dbb03be6d9.png)


## Checklist

- [x] Tested the change ingame
- [x] Provided screenshots if it is a visual change
- [x] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2022-06-27 17:41:08 +00:00 committed by GitHub
commit c231084daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ public:
ACCESS_LEVEL_USER,
TEMPCMD_NAME_LENGTH = 32,
TEMPCMD_HELP_LENGTH = 96,
TEMPCMD_HELP_LENGTH = 192,
TEMPCMD_PARAMS_LENGTH = 96,
MAX_PRINT_CB = 4,

View file

@ -1009,21 +1009,21 @@ void CConsole::Init()
#define MACRO_CONFIG_INT(Name, ScriptName, Def, Min, Max, Flags, Desc) \
{ \
static CIntVariableData Data = {this, &g_Config.m_##Name, Min, Max, Def}; \
Register(#ScriptName, "?i", Flags, IntVariableCommand, &Data, Desc); \
Register(#ScriptName, "?i", Flags, IntVariableCommand, &Data, Desc " (default: " #Def ", min: " #Min ", max: " #Max ")"); \
}
#define MACRO_CONFIG_COL(Name, ScriptName, Def, Flags, Desc) \
{ \
static CColVariableData Data = {this, &g_Config.m_##Name, static_cast<bool>((Flags)&CFGFLAG_COLLIGHT), \
static_cast<bool>((Flags)&CFGFLAG_COLALPHA), Def}; \
Register(#ScriptName, "?i", Flags, ColVariableCommand, &Data, Desc); \
Register(#ScriptName, "?i", Flags, ColVariableCommand, &Data, Desc " (default: " #Def ")"); \
}
#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Flags, Desc) \
{ \
static char OldValue[Len] = Def; \
static CStrVariableData Data = {this, g_Config.m_##Name, Len, OldValue}; \
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, Desc); \
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, Desc " (default: " #Def ", max length: " #Len ")"); \
}
#include "config_variables.h"