@skullandbonestools/snbdata
Version:
Inofficial data package for the Skull and Bones game by Ubisoft.
19 lines • 651 B
JavaScript
import seasonsData from "../../data/seasons.json";
export class Season {
constructor(index, id, startDate, endDate, color) {
this.index = index;
this.id = id;
this.startDate = startDate;
this.endDate = endDate;
this.color = color;
}
static loadSeasons() {
const seasons = {};
for (const [key, value] of Object.entries(seasonsData)) {
seasons[key] = new Season(value.index, value.id, new Date(value.startDate), new Date(value.endDate), value.color);
}
return seasons;
}
}
export const Seasons = Season.loadSeasons();
//# sourceMappingURL=seasons.js.map