beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
50 stars 47 forks source link

Allow Tester role to use $balancemode in unbossed lobby #357

Closed jauggy closed 1 month ago

jauggy commented 1 month ago

Context

In discussions with Sun_Tzu, they mentioned it was difficult to test a new balance algorithm as it requires boss and getting people to vote you boss is nearly impossible. https://discord.com/channels/549281623154229250/1245516077547389009/1260223439067811980

As a short term solution, and to enable us to test balance algorithm this PR will enable someone with Tester role to use $balancemode without being boss. However, they can only do this in a non-bossed lobby. It will automatically succeed and not trigger a vote

Test Steps

  1. Launch Lobby and run $balancemode split_one_chevs. It should fail
  2. Change this user to have Tester role. Login to Chobby again and retry the command. It should succeed.
  3. Add another user to the lobby and make that user boss. Try the command again and it should fail.

Results

1 2

L-e-x-o-n commented 1 month ago

Code looks good, but I am not sure about the feature itself. Right now only mods can bypass command restrictions. Lobby members should have an opinion on balance mode changes because it can affect things like parties. They might not want random testers changing it and breaking up parties for example. I think a better solution would be adding balancemode as a votable command.

jauggy commented 1 month ago

Fair enough. Hopefully there is progress to make commands voteable: https://discord.com/channels/549281623154229250/1258404939164680242/1258404942087979139

L-e-x-o-n commented 1 month ago

Fair enough. Hopefully there is progress to make commands voteable: https://discord.com/channels/549281623154229250/1258404939164680242/1258404942087979139

Progress has been made, !balancealgorithm <algorithm has been added. Closing this PR for now.