Update package versions where possible

Fix multi-type issue on ragfair tax calss
This commit is contained in:
Dev 2023-07-09 19:40:05 +01:00
parent d0dcfc523b
commit 4b83046793
2 changed files with 32 additions and 32 deletions

View File

@ -33,48 +33,48 @@
"json-fixer": "1.6.15", "json-fixer": "1.6.15",
"proper-lockfile": "4.1.2", "proper-lockfile": "4.1.2",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"semver": "7.3.8", "semver": "7.5.4",
"source-map-support": "0.5.21", "source-map-support": "0.5.21",
"tsyringe": "4.7.0", "tsyringe": "4.8.0",
"typedoc": "0.23.23", "typedoc": "0.24.8",
"typescript": "4.9.4", "typescript": "5.1.6",
"winston": "3.8.2", "winston": "3.9.0",
"winston-daily-rotate-file": "4.7.1", "winston-daily-rotate-file": "4.7.1",
"ws": "8.11.0" "ws": "8.13.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.22.7",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.22.5",
"@jest/globals": "29.3.1", "@jest/globals": "29.6.1",
"@swc/cli": "0.1.59", "@swc/cli": "0.1.62",
"@swc/core": "1.3.27", "@swc/core": "1.3.68",
"@swc/jest": "0.2.24", "@swc/jest": "0.2.26",
"@types/i18n": "0.13.6", "@types/i18n": "0.13.6",
"@types/jest": "29.1.2", "@types/jest": "29.5.2",
"@types/node": "16.18.10", "@types/node": "20.4.1",
"@types/proper-lockfile": "4.1.2", "@types/proper-lockfile": "4.1.2",
"@types/semver": "7.3.13", "@types/semver": "7.5.0",
"@types/ws": "8.5.3", "@types/ws": "8.5.5",
"@typescript-eslint/eslint-plugin": "5.46.1", "@typescript-eslint/eslint-plugin": "5.61.0",
"@typescript-eslint/parser": "5.46.1", "@typescript-eslint/parser": "5.61.0",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"del": "7.0.0", "del": "7.0.0",
"eslint": "8.30.0", "eslint": "8.44.0",
"fs-extra": "11.1.0", "fs-extra": "11.1.1",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-execa": "4.4.1", "gulp-execa": "5.0.0",
"gulp-rename": "2.0.0", "gulp-rename": "2.0.0",
"jest": "29.3.1", "jest": "29.6.1",
"madge": "5.0.1", "madge": "6.1.0",
"pkg": "5.8.0", "pkg": "5.8.1",
"pkg-fetch": "3.4.2", "pkg-fetch": "3.5.2",
"rcedit": "3.0.1", "rcedit": "3.0.1",
"rome": "11.0.0", "rome": "12.1.3",
"ts-jest": "29.0.5", "ts-jest": "29.1.1",
"ts-node-dev": "2.0.0", "ts-node-dev": "2.0.0",
"tsconfig-paths": "4.1.2", "tsconfig-paths": "4.2.0",
"typemoq": "2.1.0", "typemoq": "2.1.0",
"utf-8-validate": "5.0.10" "utf-8-validate": "6.0.3"
}, },
"targets": { "targets": {
"default": { "default": {

View File

@ -1,11 +1,11 @@
import { inject, injectable } from "tsyringe";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { Item } from "../models/eft/common/tables/IItem"; import { Item } from "../models/eft/common/tables/IItem";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { RagfairPriceService } from "../services/RagfairPriceService"; import { RagfairPriceService } from "../services/RagfairPriceService";
import { ItemHelper } from "./ItemHelper"; import { ItemHelper } from "./ItemHelper";
import { inject, injectable } from "tsyringe";
import { ILogger } from "../models/spt/utils/ILogger";
@injectable() @injectable()
export class RagfairTaxHelper export class RagfairTaxHelper
@ -122,7 +122,7 @@ export class RagfairTaxHelper
worth = worth / itemTemplate._props.MaxResource * item.upd.FoodDrink.HpPercent; worth = worth / itemTemplate._props.MaxResource * item.upd.FoodDrink.HpPercent;
} }
if ("Repairable" in item.upd && itemTemplate._props.armorClass > 0) if ("Repairable" in item.upd && <number>itemTemplate._props.armorClass > 0)
{ {
const num2 = 0.01 * Math.pow(0.0, item.upd.Repairable.MaxDurability); const num2 = 0.01 * Math.pow(0.0, item.upd.Repairable.MaxDurability);
worth = worth * ((item.upd.Repairable.MaxDurability / itemTemplate._props.Durability) - num2) - Math.floor(itemTemplate._props.RepairCost * (item.upd.Repairable.MaxDurability - item.upd.Repairable.Durability)); worth = worth * ((item.upd.Repairable.MaxDurability / itemTemplate._props.Durability) - num2) - Math.floor(itemTemplate._props.RepairCost * (item.upd.Repairable.MaxDurability - item.upd.Repairable.Durability));