mirror of
https://github.com/maxswa/osrs-json-hiscores.git
synced 2025-10-15 10:19:04 +00:00
Add Collections Logged, Royal Titans
This commit is contained in:
@@ -45,7 +45,8 @@ import {
|
||||
FORMATTED_SOUL_WARS,
|
||||
FORMATTED_RIFTS_CLOSED,
|
||||
FORMATTED_DEADMAN_POINTS,
|
||||
FORMATTED_COLOSSEUM_GLORY
|
||||
FORMATTED_COLOSSEUM_GLORY,
|
||||
FORMATTED_COLLECTIONS_LOGGED
|
||||
} from './utils';
|
||||
|
||||
/**
|
||||
@@ -164,6 +165,7 @@ export function parseJsonStats(json: HiscoresResponse): Stats {
|
||||
const soulWarsZeal = getActivity(FORMATTED_SOUL_WARS);
|
||||
const riftsClosed = getActivity(FORMATTED_RIFTS_CLOSED);
|
||||
const colosseumGlory = getActivity(FORMATTED_COLOSSEUM_GLORY);
|
||||
const collectionsLogged = getActivity(FORMATTED_COLLECTIONS_LOGGED);
|
||||
|
||||
const stats: Stats = {
|
||||
skills,
|
||||
@@ -175,6 +177,7 @@ export function parseJsonStats(json: HiscoresResponse): Stats {
|
||||
soulWarsZeal,
|
||||
riftsClosed,
|
||||
colosseumGlory,
|
||||
collectionsLogged,
|
||||
clues,
|
||||
bosses
|
||||
};
|
||||
@@ -224,8 +227,8 @@ export function parseStats(csv: string): Stats {
|
||||
const [leaguePoints, deadmanPoints] = activityObjects.splice(0, 2);
|
||||
const bhObjects = activityObjects.splice(0, BH_MODES.length);
|
||||
const clueObjects = activityObjects.splice(0, CLUES.length);
|
||||
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed, colosseumGlory] =
|
||||
activityObjects.splice(0, 5);
|
||||
const [lastManStanding, pvpArena, soulWarsZeal, riftsClosed, colosseumGlory, collectionsLogged] =
|
||||
activityObjects.splice(0, 6);
|
||||
const bossObjects = activityObjects.splice(0, BOSSES.length);
|
||||
|
||||
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {
|
||||
@@ -262,6 +265,7 @@ export function parseStats(csv: string): Stats {
|
||||
soulWarsZeal,
|
||||
riftsClosed,
|
||||
colosseumGlory,
|
||||
collectionsLogged,
|
||||
clues,
|
||||
bosses
|
||||
};
|
||||
|
||||
@@ -116,6 +116,7 @@ export type Boss =
|
||||
| 'corruptedGauntlet'
|
||||
| 'hueycoatl'
|
||||
| 'leviathan'
|
||||
| 'royalTitans'
|
||||
| 'whisperer'
|
||||
| 'theatreOfBlood'
|
||||
| 'theatreOfBloodHardMode'
|
||||
@@ -153,6 +154,7 @@ export type ActivityName =
|
||||
| 'eliteClues'
|
||||
| 'masterClues'
|
||||
| 'colosseumGlory'
|
||||
| 'collectionsLogged'
|
||||
| Boss;
|
||||
|
||||
export interface Stats {
|
||||
@@ -172,6 +174,7 @@ export interface Stats {
|
||||
soulWarsZeal: Activity;
|
||||
riftsClosed: Activity;
|
||||
colosseumGlory: Activity;
|
||||
collectionsLogged: Activity;
|
||||
bosses: Bosses;
|
||||
}
|
||||
export type Modes = { [M in Gamemode]?: Stats };
|
||||
|
||||
@@ -215,6 +215,7 @@ export const FORMATTED_BOSS_NAMES: FormattedBossNames = {
|
||||
corruptedGauntlet: 'The Corrupted Gauntlet',
|
||||
hueycoatl: 'The Hueycoatl',
|
||||
leviathan: 'The Leviathan',
|
||||
royalTitans: 'The Royal Titans',
|
||||
whisperer: 'The Whisperer',
|
||||
theatreOfBlood: 'Theatre of Blood',
|
||||
theatreOfBloodHardMode: 'Theatre of Blood: Hard Mode',
|
||||
@@ -295,6 +296,7 @@ export const FORMATTED_LEAGUE_POINTS = 'League Points';
|
||||
export const FORMATTED_DEADMAN_POINTS = 'Deadman Points';
|
||||
export const FORMATTED_RIFTS_CLOSED = 'Rifts closed';
|
||||
export const FORMATTED_COLOSSEUM_GLORY = 'Colosseum Glory';
|
||||
export const FORMATTED_COLLECTIONS_LOGGED = 'Collections Logged';
|
||||
|
||||
export const INVALID_FORMAT_ERROR = 'Invalid hiscores format';
|
||||
export const PLAYER_NOT_FOUND_ERROR = 'Player not found';
|
||||
|
||||
Reference in New Issue
Block a user