UNPKG

@skullandbonestools/snbdata

Version:

Inofficial data package for the Skull and Bones game by Ubisoft.

23 lines 910 B
import ultimatesData from '../../data/ultimates.json'; import { Seasons } from './seasons'; export class Ultimate { constructor(id, type, rarity, season, chargeRequired, dateAdded, lastUpdated) { this.id = id; this.type = type; this.rarity = rarity; this.season = season; this.chargeRequired = chargeRequired; this.dateAdded = dateAdded; this.lastUpdated = lastUpdated; } static loadUltimates() { const ultimates = {}; for (const [key, value] of Object.entries(ultimatesData)) { const season = value.season; ultimates[key] = new Ultimate(value.id, value.type, value.rarity, Seasons[season], value.chargeRequired, new Date(value.dateAdded), new Date(value.lastUpdated)); } return ultimates; } } export const Ultimates = Ultimate.loadUltimates(); //# sourceMappingURL=ultimates.js.map