Skip to content

Commit 4c4c307

Browse files
ThaPwnedsatoon101
authored andcommitted
Fixes weapon restriction (#184)
* Fixes weapon restriction
1 parent 4bbafb6 commit 4c4c307

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

addons/source-python/packages/source-python/weapons/restrictions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ def __getitem__(self, item):
190190
raise KeyError(
191191
'"{0}" is neither a team number nor an alias.'.format(item))
192192

193+
def clear(self):
194+
for x in self.values():
195+
x.clear()
196+
193197

194198
class WeaponRestrictionHandler(AutoUnload):
195199
"""Class used to handle player and team restrictions."""
@@ -203,8 +207,8 @@ def __init__(self):
203207

204208
def clear(self):
205209
"""Remove all team and player restrictions."""
206-
self.team_restrictions.clear()
207210
self.player_restrictions.clear()
211+
self.team_restrictions.clear()
208212

209213
def add_player_restrictions(self, player, *weapons):
210214
"""Add the weapons to the player's restriction set.

0 commit comments

Comments
 (0)