Syntax: Select all
from cvars import ConVar
from cvars.flags import ConVarFlags
my_convar = ConVar('name', 'value', ConVarFlags.NONE, 'My ConVar description.')
my_convar = ConVar('name', 'value', description='My ConVar description.')
We decided, since most of the time no flags would be given anyway, to reverse the order of those 2 arguments. So now, you can just use:
Syntax: Select all
from cvars import ConVar
my_convar = ConVar('name', 'value', 'My ConVar description.')
If you do want to pass flags, you would now instead use:
Syntax: Select all
from cvars import ConVar
from cvars.flags import ConVarFlags
my_convar = ConVar('name', 'value', 'My ConVar description.', ConVarFlags.NOTIFY)
All instances of this throughout the API were changed, including the internal _ConVar class. The _ConVar class is now responsible for switching the 2 arguments internally to get the object correctly.