From 68d0b838cf5abf01c4956a9f079fa76fef340a2e Mon Sep 17 00:00:00 2001 From: Rosemary Witchaven <32779090+in1tiate@users.noreply.github.com> Date: Tue, 29 Mar 2022 09:37:02 -0500 Subject: Add two ways of controlling judge buttons that aren't hardcoded nonsense (networked and local) (#537) * add both network and local ways to show judge buttons on pos other than jud * hide judge buttons when pos_removing to a non-judge position * alter packet header * Only use pos jud hardcoding if no design.ini if design.ini does not define judges= then we fall back to pos jud garbage * Fix judge buttons being disabled if default_side pos is judge (logic poopy) Fix positions.isEmpty() returning False cuz a split of an empty string returns the list with an empty string by default * Expand JD packet to be able to send -1, 0 and 1. If -1 is received, fall back on client-sided judge button behavior. If 0 or 1 is received, treat it as "absolute override" and adhere to that packet. * alter check for empty qstringlist to support old qt versions * heehoo * trigger client side behavior when jd -1 is sent * less confusing variable names * remove useless code, trim some fat Co-authored-by: oldmud0 * use an enum dammit! & warn on malformed auth * use an enum dammit! pt. 2 * appease clang, rewrite ugly judge controls function * please squash this its so bad Co-authored-by: Crystalwarrior Co-authored-by: oldmud0 --- include/aoapplication.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/aoapplication.h') diff --git a/include/aoapplication.h b/include/aoapplication.h index 2ee1120b..5f808f5e 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -421,6 +421,9 @@ public: // Returns the custom realisation used by the character. QString get_custom_realization(QString p_char); + // Returns whether the given pos is a judge position + bool get_pos_is_judge(const QString &p_pos); + // Returns the name of p_char QString get_char_name(QString p_char); -- cgit