Skip to content

Commit 43a6c68

Browse files
committed
Added some documentation to cvars.ConVar.
1 parent 2c64fb7 commit 43a6c68

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • addons/source-python/packages/source-python/cvars

addons/source-python/packages/source-python/cvars/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,20 @@ class ConVar(_ConVar):
3636
def __init__(
3737
self, name, value='0', flags=0,
3838
description='', min_value=None, max_value=None):
39-
"""Called when a server-var is initilized."""
39+
"""Called when a server-var is initilized.
40+
41+
If the ConVar already exists, all other parameters
42+
except ``name`` are inconsequential.
43+
44+
:param str name: The name of the ConVar.
45+
:param str value: The initial value of the
46+
ConVar if it doesn't already exist.
47+
:param ConVarFlags flags: The initial flags of the
48+
ConVar if it doesn't already exist.
49+
:param str description: The description of the ConVar.
50+
:param float min_value: The minimum value allowed for the ConVar.
51+
:param float max_value: The maximum value allowed for the ConVar.
52+
"""
4053
super().__init__(
4154
name, value, flags, description,
4255
min_value is not None, min_value or 0.0,

0 commit comments

Comments
 (0)