-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update balance.py #28
base: master
Are you sure you want to change the base?
Conversation
added functionality to switch suggested players by default and have both !veto the switch or an admin !dont it. Controlled by cvar qlx_balanceSwitchOptIn
Hi, @mgaertne! Also, it would be good, to add documentation on this cvar after approving cvar name. |
"""Forces a suggested switch to be done.""" | ||
if self.suggested_pair: | ||
self.execute_suggestion() | ||
if not self.suggested_pair: | ||
return | ||
|
||
if not self.switch_opt_in: | ||
return | ||
|
||
self.execute_suggestion() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Player joins on round countdown, script notices that next round switch will be executed, admin wants to execute it right now, types "!do" and says "wtf?".
Not to have this situation, I suggest to return previous version of cmd_do
if self.suggested_pair and not all(self.suggested_agree): | ||
p1, p2 = self.suggested_pair | ||
if not self.suggested_pair or not self.switch_opt_in or all(self.suggested_agree): | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move swtich_opt_in checking to top of cmd_agree function. To indicate that this command is not used on auto switch enabled.
if not self.suggested_pair or self.switch_opt_in: | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heya Eugene,
I later found a problem in the code resulting in no switches. I will have
to work this over a bit more. qlx_balanceAutoSwitch sounds good.
Best
ShiN0
…On Tue, Jul 20, 2021 at 10:31 AM Eugene Molotov ***@***.***> wrote:
Hi, @mgaertne <https://github.com/mgaertne>!
Name of cvar "qlx_balanceSwitchOptIn" is confusing. How about naming it as
qlx_balanceAutoSwitch?
Also, it would be good, to add documentation on this cvar after approving
cvar name.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALXQBHNL4Z5XQAN5M3DPTTYUX7RANCNFSM5AEDWDJA>
.
|
added functionality to switch suggested players by default and have both !veto the switch or an admin !dont it. Controlled by cvar qlx_balanceSwitchOptIn