UNPKG

@tf2pickup-org/serveme-tf-client

Version:
102 lines 2.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReservationDetails = void 0; class ReservationDetails { constructor(r) { this.r = r; } setResponse(response) { this.r = response; } get id() { return this.r.id; } get startsAt() { return new Date(this.r.starts_at); } get endsAt() { return new Date(this.r.ends_at); } get status() { return this.r.status; } get password() { return this.r.password; } get rcon() { return this.r.rcon; } get tvPassword() { return this.r.tv_password; } get tvRelayPassword() { return this.r.tv_relaypassword; } get firstMap() { return this.r.first_map; } get serverConfigId() { return this.r.server_config_id; } get whitelistId() { return this.r.whitelist_id; } get customWhitelistId() { return this.r.custom_whitelist_id; } get autoEnd() { return this.r.auto_end; } get sdr() { if (this.r.sdr_ip === undefined || this.r.sdr_port === undefined || this.r.sdr_tv_port === undefined || this.r.sdr_final === undefined) { return null; } return { ip: this.r.sdr_ip, port: this.r.sdr_port, tvPort: this.r.sdr_tv_port, final: this.r.sdr_final, }; } get pluginsEnabled() { return this.r.enable_plugins; } get demosTfEnabled() { return this.r.enable_demostf; } get lastNumberOfPlayers() { return this.r.last_number_of_players; } get inactiveMinuteCounter() { return this.r.inactive_minute_counter; } get logSecret() { return this.r.logsecret; } get isStartedInstantly() { return this.r.start_instantly; } get isEndedInstantly() { return this.r.end_instantly; } get isProvisioned() { return this.r.provisioned; } get ended() { return this.r.ended; } get reservedBy() { return this.r.steam_uid; } get serverId() { return this.r.server_id; } get server() { return this.r.server; } } exports.ReservationDetails = ReservationDetails; //# sourceMappingURL=reservation-details.js.map