-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathremovepowerups.py
25 lines (19 loc) · 988 Bytes
/
removepowerups.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# If you have any suggestions or issues/problems with this plugin you can contact me(kanzo) on irc at #minqlbot
# or alternatively you can open an issue at https://github.com/cstewart90/minqlx-plugins/issues
"""
Removes powerups on round end. Mainly used for freezetag because `g_freezeRemovePowerupsOnRound`
doesn't remove powerups right away.
"""
import minqlx
class removepowerups(minqlx.Plugin):
def __init__(self):
super().__init__()
self.add_hook("round_end", self.handle_round_end)
def handle_round_end(self, data):
"""Removes all powerups on round end."""
for p in self.players():
p.powerups(quad=0, battlesuit=0, regeneration=0, haste=0, invisibility=0, invulnerability=0)