fnbr
Version:
A library to interact with Epic Games' Fortnite HTTP and XMPP services
21 lines • 1.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const HomebaseRatingMapping_json_1 = tslib_1.__importDefault(require("./HomebaseRatingMapping.json"));
const BaseItemRating_json_1 = tslib_1.__importDefault(require("./BaseItemRating.json"));
const SurvivorItemRating_json_1 = tslib_1.__importDefault(require("./SurvivorItemRating.json"));
const CurveTable_1 = tslib_1.__importDefault(require("../src/util/CurveTable"));
function mapCurveTables(struc) {
const entries1 = Object.entries(struc);
const entries2 = entries1.map(([k, v]) => [k.toLowerCase(), Object.freeze(new CurveTable_1.default(v.Keys))]);
// False alarm: eslint claims K is used before it's defined, which it obviously isn't.
// eslint-disable-next-line no-use-before-define
const obj = Object.fromEntries(entries2);
return Object.freeze(obj);
}
exports.default = Object.freeze({
homebaseRating: Object.freeze(new CurveTable_1.default(HomebaseRatingMapping_json_1.default[0].ExportValue.UIMonsterRating.Keys)),
baseItemRating: mapCurveTables(BaseItemRating_json_1.default[0].ExportValue),
survivorItemRating: mapCurveTables(SurvivorItemRating_json_1.default[0].ExportValue),
});
//# sourceMappingURL=PowerLevelCurves.js.map