Lint fixes
This commit is contained in:
parent
c05347279b
commit
740ab1e563
@ -340,8 +340,8 @@ export class InventoryController
|
||||
): IItemEventRouterResponse
|
||||
{
|
||||
const inventoryItems = this.inventoryHelper.getOwnerInventoryItems(body, sessionID);
|
||||
const sourceItem = inventoryItems.from.find((item) => item._id == body.item);
|
||||
const destinationItem = inventoryItems.to.find((item) => item._id == body.with);
|
||||
const sourceItem = inventoryItems.from.find((item) => item._id === body.item);
|
||||
const destinationItem = inventoryItems.to.find((item) => item._id === body.with);
|
||||
|
||||
if (sourceItem === null)
|
||||
{
|
||||
|
@ -9,11 +9,11 @@ import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IWildBody } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import {
|
||||
Common,
|
||||
Health as PmcHealth,
|
||||
IBaseJsonSkills,
|
||||
IBaseSkill,
|
||||
IBotBase,
|
||||
Info,
|
||||
Health as PmcHealth,
|
||||
Skills as botSkills,
|
||||
} from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
|
@ -789,7 +789,7 @@ export class RagfairOfferGenerator
|
||||
for (const armorItem of armorWithMods)
|
||||
{
|
||||
const itemDbDetails = this.itemHelper.getItem(armorItem._tpl)[1];
|
||||
if ((parseInt(<string>itemDbDetails._props.armorClass)) > 1)
|
||||
if ((Number.parseInt(<string>itemDbDetails._props.armorClass)) > 1)
|
||||
{
|
||||
this.itemHelper.addUpdObjectToItem(armorItem);
|
||||
|
||||
|
@ -175,7 +175,7 @@ export class WeatherGenerator
|
||||
|
||||
protected getRandomFloat(node: string): number
|
||||
{
|
||||
return parseFloat(
|
||||
return Number.parseFloat(
|
||||
this.randomUtil.getFloat(this.weatherConfig.weather[node].min, this.weatherConfig.weather[node].max)
|
||||
.toPrecision(3),
|
||||
);
|
||||
|
@ -158,7 +158,7 @@ export class AssortHelper
|
||||
{
|
||||
if (assort.items[a]._id === idsToRemove[i])
|
||||
{
|
||||
assort.items.splice(parseInt(a), 1);
|
||||
assort.items.splice(Number.parseInt(a), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ export class BotGeneratorHelper
|
||||
{
|
||||
let maxDurability: number;
|
||||
let currentDurability: number;
|
||||
if (parseInt(`${itemTemplate._props.armorClass}`) === 0)
|
||||
if (Number.parseInt(`${itemTemplate._props.armorClass}`) === 0)
|
||||
{
|
||||
maxDurability = itemTemplate._props.MaxDurability;
|
||||
currentDurability = itemTemplate._props.MaxDurability;
|
||||
|
@ -560,7 +560,7 @@ export class ProfileFixerService
|
||||
continue;
|
||||
}
|
||||
|
||||
if (quest.status && Number.isNaN(parseInt(<string><unknown>quest.status)))
|
||||
if (quest.status && Number.isNaN(Number.parseInt(<string><unknown>quest.status)))
|
||||
{
|
||||
fixes[quest.status] = (fixes[quest.status] ?? 0) + 1;
|
||||
|
||||
@ -570,7 +570,7 @@ export class ProfileFixerService
|
||||
|
||||
for (const statusTimer in quest.statusTimers)
|
||||
{
|
||||
if (Number.isNaN(parseInt(statusTimer)))
|
||||
if (Number.isNaN(Number.parseInt(statusTimer)))
|
||||
{
|
||||
timerFixes[statusTimer] = (timerFixes[statusTimer] ?? 0) + 1;
|
||||
|
||||
|
@ -349,7 +349,7 @@ export class RepairService
|
||||
const materialType = itemToRepairDetails._props.ArmorMaterial ?? "";
|
||||
const armorMaterial = globals.config.ArmorMaterials[materialType] as IArmorType;
|
||||
const destructability = 1 + armorMaterial.Destructibility;
|
||||
const armorClass = parseInt(`${itemToRepairDetails._props.armorClass}`);
|
||||
const armorClass = Number.parseInt(`${itemToRepairDetails._props.armorClass}`);
|
||||
const armorClassDivisor = globals.config.RepairSettings.armorClassDivisor;
|
||||
const armorClassMultiplier = 1.0 + armorClass / armorClassDivisor;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { QuestStatus } from "@spt-aki/models/enums/QuestStatus";
|
||||
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { inject, injectable } from "tsyringe";
|
||||
import { QuestStatus } from "@spt-aki/models/enums/QuestStatus";
|
||||
|
||||
@injectable()
|
||||
export class TraderServicesService
|
||||
@ -47,7 +47,7 @@ export class TraderServicesService
|
||||
for (const questId of service.requirements.completedQuests)
|
||||
{
|
||||
const quest = pmcData.Quests.find((x) => x.qid === questId);
|
||||
if (!quest || quest.status != QuestStatus.Success)
|
||||
if (!quest || quest.status !== QuestStatus.Success)
|
||||
{
|
||||
servicesToDelete.push(service.serviceType);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user