UNPKG

warframe-worldstate-parser

Version:

An Open parser for Warframe's Worldstate in Javascript

39 lines (38 loc) 1.28 kB
import { n as __decorateMetadata, t as __decorate } from "../../decorate-BCC26nnB.mjs"; import { WorldStateObject } from "./WorldStateObject.mjs"; import { IsString } from "class-validator"; import { fromNow } from "warframe-worldstate-data/utilities"; //#region lib/models/CambionCycle.ts /** * Represents the current Cambion Drift Fass/Vome Cycle * @augments {WorldStateObject} */ var CambionCycle = class extends WorldStateObject { /** * Time remaining string in the current cycle */ timeLeft; /** * Current cycle state. One of 'fass', 'vome' */ state; /** * @param {CetusCycle} cetusCycle Match data from cetus cycle for data */ constructor(cetusCycle) { super({ _id: { $oid: "cambionCycle0" } }); ({activation: this.activation, expiry: this.expiry, timeLeft: this.timeLeft} = cetusCycle); this.state = cetusCycle.isDay ? "fass" : "vome"; this.id = `cambionCycle${this.expiry.getTime()}`; } /** * Get whether the event has expired */ get expired() { return fromNow(this.expiry) < 0; } }; __decorate([IsString(), __decorateMetadata("design:type", String)], CambionCycle.prototype, "timeLeft", void 0); __decorate([IsString(), __decorateMetadata("design:type", String)], CambionCycle.prototype, "state", void 0); //#endregion export { CambionCycle };