UNPKG

tf2-item-format

Version:
32 lines 1.45 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; const isStrange_1 = __importDefault(require("./getQuality/isStrange")); const isVintage_1 = __importDefault(require("./getQuality/isVintage")); const isHaunted_1 = __importDefault(require("./getQuality/isHaunted")); const matchQuality_1 = __importDefault(require("./getQuality/matchQuality")); const selectQuality_1 = __importDefault(require("./getQuality/selectQuality")); /** * Gets quality by providing data to selectQuality */ function default_1(name, attributes) { // This is true for all target/output items if (attributes.usableItem) { return { // Weird work around, will fix later. value: name.includes('Unusual') ? 'Unusual' : 'Unique', elevated: false, }; } return (0, selectQuality_1.default)({ isStrange: (0, isStrange_1.default)(attributes.schema, name), // For elevated isVintage: (0, isVintage_1.default)(attributes.schema, name), // Because of exceptions isHaunted: (0, isHaunted_1.default)(attributes.schema, name), otherQuality: (0, matchQuality_1.default)(name), // Matches every other quality attributes, // Current attributes }); } //# sourceMappingURL=getQuality.js.map