Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2371 closed enhancement (fixed)

[PATCH] Add ratings to player list in the Multiplayer Lobby

Reported by: scythetwirler Owned by: scythetwirler
Priority: Should Have Milestone: Alpha 16
Component: Multiplayer lobby Keywords: lobby ratings patch
Cc: Patch:

Description (last modified by scythetwirler)

This patch adds ratings next to the username in the player list of the lobby. Previously, you could only see your rating if you had a high rating that qualified to be on the leaderboard. It shares the BoardList custom stanza extension.

The /nick command has also been removed, as it causes unnecessary complications (and going along with r14455 's phasing out of custom nicks).

Some comment typos were also fixed.

Note that this patch will only work if the updated bot is running.

Attachments (2)

LobbyWithRatings1024x768.png (597.7 KB ) - added by scythetwirler 10 years ago.
Preview of Lobby
ratingplayerlist.patch (32.0 KB ) - added by scythetwirler 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by scythetwirler, 10 years ago

Keywords: lobby, review, ratings → lobby review ratings
Status: newassigned

comment:2 by scythetwirler, 10 years ago

Keywords: patch added

comment:3 by scythetwirler, 10 years ago

Description: modified (diff)

comment:4 by scythetwirler, 10 years ago

Description: modified (diff)

by scythetwirler, 10 years ago

Preview of Lobby

comment:5 by Josh, 10 years ago

Here's a listing of my thoughts on the patch:

In lobby.js

  • Whitespace on line 377 isn't needed.
  • Engine.SendGetRatingList(); on 418 shouldn't be needed.
  • formatPlayerListEntry should use some form of default parameters to avoid the "filler" string on 433.

In lobby.xml

  • Not thrilled about changing the font.

In StanzaExtensions.cpp

  • The "used solely" wording in the comment from lines 61-64 isn't really accurate anymore. That comment should be rewritten in more detail (flexible multi-use extension, used for ratings and leaderboard currently, an xml stanza returning the leaderboard would look like: <......>).
  • The usage of two different variables depending on if it's a rating or board list is superfluous, using a single m_TagList should be simpler.

In StanzaExtensions.h

  • Trailing whitespace on line 86.

In XmppClient.cpp

  • Incorrect debug output on line 296.
  • handleiq will need some changes after switching to a single m_TagList in the extension.

In XpartaMuPP.py

  • Lines 198 and 202 shouldn't send an arbitrary "UNR" string but just "".
  • The ET.fromstring stuff on line 371 should be able to be done in a nicer looking fashion.
  • There's a rogue debugging print() statement on line 512.
  • The if... elif... code on lines 513-526 should also have an else with a logging.error to catch unknown commands.
  • Line 701 and 713 should print "rating list" instead of "leaderboard list".
  • Line 705 should print "rating list" instead of "boardlist".

comment:6 by scythetwirler, 10 years ago

That should fix all but one of the issues.

Replying to Josh:

In lobby.xml

  • Not thrilled about changing the font.

I'm not sure how we can avoid it and still fit it in. I think size 13 is comfortably readable though.

by scythetwirler, 10 years ago

Attachment: ratingplayerlist.patch added

comment:7 by scythetwirler, 10 years ago

Resolution: fixed
Status: assignedclosed

In 14650:

Displays ratings in the userlist. Fixes #2371.

comment:8 by scythetwirler, 10 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.