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

Add more player stat fields #20

Open
18 of 24 tasks
builder-247 opened this issue Sep 10, 2018 · 2 comments · Fixed by #335 or #337
Open
18 of 24 tasks

Add more player stat fields #20

builder-247 opened this issue Sep 10, 2018 · 2 comments · Fixed by #335 or #337
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed important Issues that should be focused on

Comments

@builder-247
Copy link
Member

builder-247 commented Sep 10, 2018

processPlayerData handles modifying the player object from Hypixel API to the wanted format.

The game specific objects are created using the functions processStats object. You can assign default values by adding an equal sign in object parameters e.g. coins = 0 defaults the coins value to 0. The return statement return the stats object for the minigame. If (and when) some field's name needs to be changed, it can be achieved as described below:

return {
  kills: coins,
}

This would return the coins field with the name kills.

For an example adding kills and deaths fields to Warlords, processors/games/Battleground.js file should be modified in the following way:

module.exports = ({
  // This part destructs the values from the game object returned by the Hypixel API
  coins = 0,
  kills = 0,
  deaths = 0,
}) => ({
  coins,  
  kills,
  deaths,
});

Example (TKR stats)

Resources for stats to be added:

Progress:

  • Arena
  • Blitz
  • Turbo Kart racers
  • Paintball
  • Quake
  • Arcade - Missing advanced Zombies stats
  • Warlords
  • Bedwars
  • Build Battle
  • Duels
  • Cops and Crims
  • Murder Mystery
  • SkyClash
  • SkyWars
  • Speed UHC
  • Smash Heroes - Partial progress
  • TNT Games
  • Crazy Walls
  • UHC
  • VampireZ
  • Walls
  • MegaWalls
  • The Pit
  • SkyBlock - Partial progress
@builder-247 builder-247 added help wanted Extra attention is needed good first issue Good for newcomers labels Sep 10, 2018
This was referenced Oct 8, 2018
This was referenced Oct 9, 2018
@builder-247 builder-247 pinned this issue Jan 8, 2019
@builder-247 builder-247 added the important Issues that should be focused on label May 21, 2019
@builder-247
Copy link
Member Author

Working on Warlords.

builder-247 added a commit that referenced this issue Jun 23, 2019
- Missing advanced zombies stats
builder-247 added a commit that referenced this issue Jun 23, 2019
- TODO: Gamemode specific stats
builder-247 added a commit that referenced this issue Jun 24, 2019
builder-247 added a commit that referenced this issue Feb 8, 2020
builder-247 added a commit that referenced this issue Feb 12, 2020
builder-247 added a commit that referenced this issue Feb 14, 2020
This was linked to pull requests Mar 13, 2020
This was unlinked from pull requests Mar 13, 2020
@builder-247 builder-247 linked a pull request Mar 13, 2020 that will close this issue
@builder-247 builder-247 removed a link to a pull request Mar 13, 2020
@builder-247 builder-247 linked a pull request Mar 13, 2020 that will close this issue
@builder-247 builder-247 linked a pull request Mar 14, 2020 that will close this issue
@builder-247 builder-247 reopened this Mar 14, 2020
@TheMysterys
Copy link
Contributor

More skywars stats added in #679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed important Issues that should be focused on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants