evil-morfar/RCLootCouncil2

Order responses in the voting window to match button order

nekizalb opened this issue · 3 comments

We added a new button for higher priority over Big Upgrade. In the button order, the new button is first, but it shows up below the default big/minor upgrades in the voting screen.

Can the ordering in voting screen match the button ordering?

Button config: https://i.imgur.com/ZoGvDy0.png

Voting screen: https://i.imgur.com/NYkTokL.png

I investigated a little bit, and found that the sort value on the responses is not being updated when the buttons are moved up and down. Reading modules/options.lua, I found some code that appears to be INTENDED to modify this on lines 114-115 and 132-133

https://github.com/evil-morfar/RCLootCouncil2/blob/master/Modules/options.lua#L114

However, this code appears to be dead, and the actual function that is run when clicking the up/down ordering options appears at lines 1793-1805 and 1814-1821, which does NOT appear to update sort order. Not sure if this was an intended drop of behavior in a rewrite, or just a missed functionality.

https://github.com/evil-morfar/RCLootCouncil2/blob/master/Modules/options.lua#L1793

Thanks for your report.
It's simply an oversight on my behalf that changing the order doesn't prompt an update of what's sent to clients.
You should find that changing anything else (name, color etc) also updates the sort order.

Actually scratch that - the default buttons indeed doesn't update their sort value.