Skip to content
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

Added rank (plus minor fixes) #9

Merged
merged 1 commit into from
Jan 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/entities/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,8 @@ class User {
username: string;
/** The player's user ID */
id: number;
/** The global rank of the player */
rank: number;
/** The player's account ID */
accountID: number;
/** The player's stats */
Expand Down Expand Up @@ -608,6 +610,7 @@ class User {
stars: +d[3],
diamonds: +d[46],
demons: +d[4],
rank: +d[30],
coins: {
normal: +d[13],
user: +d[17]
Expand Down Expand Up @@ -1708,6 +1711,8 @@ class StatlessSearchedUser {
username: string;
/** The player's user ID. Will only be present if it is known */
id?: number;
/** The global rank of the player */
rank: number;
/** The player's account ID */
accountID: number;
/** The player's cosmetics */
Expand Down Expand Up @@ -1856,12 +1861,16 @@ class StatlessSearchedUser {
class SearchedUser extends StatlessSearchedUser {
/** The player's user ID */
id: number;
/** The global rank of the player */
rank: number;
/** The player's stats */
stats: {
/** The number of stars the player has collected */
stars: number;
/** The number of demons the player has beaten */
demons: number;
/** The number of diamonds the player has collected */
diamonds: number;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing: this isn't assigned anywhere, are you sure this works?

/** The coins the player has collected */
coins: {
/** The number of coins in the single-player mode (gold coins) the player has collected */
Expand All @@ -1884,6 +1893,7 @@ class SearchedUser extends StatlessSearchedUser {
this.stats = {
stars: +d[3],
demons: +d[4],
rank: +d[30],
coins: {
normal: +d[13],
user: +d[17]
Expand Down