-
Notifications
You must be signed in to change notification settings - Fork 0
Add player activity ranking to info command - Issue #46 #60
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
base: main
Are you sure you want to change the base?
Conversation
|
@copilot Try again |
|
@copilot Continue your work |
Co-authored-by: dmccoystephenson <[email protected]>
I've implemented the activity ranking feature for the info command. The changes include:
The implementation compares each player's total hours against all other players to determine their rank. Players with more play time will have a lower rank number (e.g., #1 for most active). Commit: cd20fd8 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Implements the feature requested in issue #46 to show a player's activity ranking in the output of the info command.
Changes Made
getPlayerRank()method that calculates a player's rank by comparing their total play time with all other playerssendInfoToSender()method that accepts anActivityRecordServiceparameter and displays ranking informationHow It Works
When a player uses
/at infoor/at info <playername>, the command now displays the player's activity ranking as "Activity Ranking: #X" where X represents their position based on total play time (e.g., #1 for most active player, #2 for second most active, etc.).The ranking appears in the info output between the play time and online status information. The implementation maintains backward compatibility and integrates seamlessly with the existing command structure.
Testing
The changes are minimal and surgical, only adding the necessary functionality without breaking existing behavior. The ranking calculation efficiently compares each player's total hours against all other players to determine their position in the activity leaderboard.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.