-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Parser Changes #19
base: master
Are you sure you want to change the base?
Parser Changes #19
Conversation
PLEASE NOTE: While this all works locally i would really appreciate a second pair of eyes to see if there is anything else i can or that needs to be changed! Things added: Pristine stat Social skill support (even though it doesn't appear in api?) Things changed: Cleaned up api response by combining things under one object if they related to each other (e.g quiver, talisman bag) Added some level data to dungeon object
Thanks for your contribution. Can you run the linter? |
src/player/Player.js
Outdated
disabled_potions, | ||
cake_buffs: cake_soul_buffs, | ||
}; | ||
this.HOTM_Data = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to all lowercase
src/player/Player.js
Outdated
getPristineStats() { | ||
// check if actibe armour has any gems that are topaz | ||
if (this.armor.length < 1) return; | ||
const gemstones = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably meant to use the values from constants here
src/player/Player.js
Outdated
}, | ||
}; | ||
for (let i = 0; i < this.armor.length; i++) { | ||
const armour_Piece = this.armor[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general style guide applies here as well, variables should use camelCase aside the values appearing in the API that use snake_case
src/util/index.js
Outdated
@@ -141,6 +141,9 @@ function getLevelByXp(xp = 0, type) { | |||
case 'runecrafting': | |||
xpTable = constants.runecraftingXp; | |||
break; | |||
case 'social': | |||
xpTable = constants.runecraftingXp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
social uses a different xp table
src/constants/pets.js
Outdated
}, | ||
3: { | ||
ability: [0.15], | ||
4: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidentally a property of 3
src/player/Player.js
Outdated
} | ||
|
||
// eslint-disable-next-line class-methods-use-this | ||
calculateLevel(experience) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be moved to utils with a more descriptive name
src/player/Player.js
Outdated
return Math.min(level, 50); | ||
} | ||
|
||
addLevelsToLocation(directive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could also be more descriptive
@@ -382,7 +378,9 @@ class Player { | |||
let pristine_values = []; | |||
const temp_inv = this.inventory; | |||
for (let i = 0; i < 8; i++) { | |||
if (['pickaxe', 'drill', 'gauntlet'].includes(temp_inv[`${i}`].type)) { | |||
const item = temp_inv[`${i}`]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just use temp_inv[i]
here :)
PLEASE NOTE:
While this all works locally I would really appreciate a second pair of eyes to see if there is anything else I can do or that needs to be changed!
Also didn't understand how to add pets to the Pet.js so please make sure that it is correct or I can remove it if needed
Things added:
Pristine stat
Social skill support (even though it doesn't appear in API?)
Things changed:
Cleaned up API response by combining things under one object if they related to each other (e.g. quiver, talisman bag)
Added some level data to dungeon object