Skip to content

Commit

Permalink
config: Make config.cvar() calls follow the same convention across th…
Browse files Browse the repository at this point in the history
…e file

Signed-off-by: BackRaw <[email protected]>
  • Loading branch information
BackRaw committed Jul 18, 2018
1 parent 030b02e commit eee4363
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions addons/source-python/plugins/udm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,32 @@
config.text('----------------------------------')

cvar_enable_infinite_ammo = config.cvar(
'enable_infinite_ammo', 1, 'Enable infinite ammo?'
'enable_infinite_ammo',
1,
'Enable infinite ammo?'
)

cvar_respawn_delay = config.cvar(
'respawn_delay', 2, 'The respawn delay in seconds.'
'respawn_delay',
2,
'The respawn delay in seconds.'
)

cvar_enable_noblock = config.cvar(
'enable_noblock', 1,
'enable_noblock',
1,
'Enable or disable non-blocking mode for players.'
)

cvar_spawn_protection_delay = config.cvar(
'spawn_protection_delay', 2, 'The spawn protection delay in seconds.'
'spawn_protection_delay',
2,
'The spawn protection delay in seconds.'
)

cvar_spawn_point_distance = config.cvar(
'spawn_point_distance', 150,
'spawn_point_distance',
150,
"The minimum distance players have to have between a spawn point for it to be 'safe'."
)

Expand All @@ -52,12 +60,14 @@
config.text('----------------------------------')

cvar_refill_clip_on_headshot = config.cvar(
'refill_clip_on_headshot', 1,
'refill_clip_on_headshot',
1,
"Refill the killer's clip if they killed an enemy with a headshot."
)

cvar_restore_health_on_knife_kill = config.cvar(
'restore_health_on_knife_kill', 1,
'restore_health_on_knife_kill',
1,
"Restore the killer's health to 100HP if they killed an enemy with the knife."
)

Expand All @@ -66,7 +76,9 @@
config.text('----------------------------------')

cvar_equip_hegrenade = config.cvar(
'equip_hegrenade', 2, 'High Explosive grenade behaviour'
'equip_hegrenade',
2,
'High Explosive grenade behaviour'
)

cvar_equip_hegrenade.Options.append('0 = Off')
Expand All @@ -79,12 +91,14 @@
config.text('----------------------------------')

cvar_team_changes_per_round = config.cvar(
'team_changes_per_round', 2,
'team_changes_per_round',
2,
'The maximum amount of times a players are allowed to change their team per round.'
)

cvar_team_changes_reset_delay = config.cvar(
'team_changes_reset_delay', 1.5,
'team_changes_reset_delay',
1.5,
'The time in minutes a player who exceeded the maximum team change count has to wait until they can choose a'
' team again.'
)
Expand All @@ -94,9 +108,13 @@
config.text('----------------------------------')

cvar_saycommand_admin = config.cvar(
'saycommand_admin', '!udm', 'The chat command used to open the admin menu.'
'saycommand_admin',
'!udm',
'The chat command used to open the admin menu.'
)

cvar_saycommand_guns = config.cvar(
'saycommand_guns', 'guns', 'The chat command used to open the weapons menu.'
'saycommand_guns',
'guns',
'The chat command used to open the weapons menu.'
)

0 comments on commit eee4363

Please sign in to comment.