Server/project/src/models/eft/itemEvent/IItemEventRouterBase.ts
Refringe 4ac12ef70a Formatting/Linting Changes (!168)
These are the formatting & linting configuration changes from the `3.8.0` branch and the changes that they make to the overall project.

The majority of these changes are from running two commands:

`npm run lint:fix`
`npm run style:fix`

This has already been run on the `3.8.0` branch and this PR should make `master` play nicer when it comes to merges going forward.

There are now four VSCode plugins recommended for server development. They've been added to the workspace file and a user should get a UI notification when the workspace is opened if they're not installed.

The four plugins are:
https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
https://marketplace.visualstudio.com/items?itemName=dprint.dprint
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
https://marketplace.visualstudio.com/items?itemName=biomejs.biome

Once installed they should just work within the workspace.

Also, be sure to `npm i` to get the new dprint application.

Co-authored-by: Refringe <brownelltyler@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/168
2023-11-16 21:42:06 +00:00

100 lines
2.2 KiB
TypeScript

import { Health, IQuestStatus, Productive, Skills, TraderData } from "@spt-aki/models/eft/common/tables/IBotBase";
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest";
import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType";
export interface IItemEventRouterBase
{
warnings: Warning[];
profileChanges: TProfileChanges | "";
}
export type TProfileChanges = Record<string, ProfileChange>;
export interface Warning
{
index: number;
errmsg: string;
code?: string;
data?: any;
}
export interface ProfileChange
{
_id: string;
experience: number;
quests: IQuest[];
ragFairOffers: IRagfairOffer[];
weaponBuilds: IWeaponBuildChange[];
equipmentBuilds: IEquipmentBuildChange[];
items: ItemChanges;
production: Record<string, Productive>;
/** Hideout area improvement id */
improvements: Record<string, Improvement>;
skills: Skills;
health: Health;
traderRelations: Record<string, TraderData>;
repeatableQuests?: IPmcDataRepeatableQuest[];
recipeUnlocked: Record<string, boolean>;
changedHideoutStashes?: Record<string, IHideoutStashItem>;
questsStatus: IQuestStatus[];
}
export interface IHideoutStashItem
{
Id: string;
Tpl: string;
}
export interface IWeaponBuildChange
{
id: string;
name: string;
root: string;
items: Item[];
}
export interface IEquipmentBuildChange
{
id: string;
name: string;
root: string;
items: Item[];
type: string;
fastpanel: any[];
buildType: EquipmentBuildType;
}
export interface ItemChanges
{
new: Product[];
change: Product[];
del: Product[];
}
export interface Improvement
{
completed: boolean;
improveCompleteTimestamp: number;
}
export interface Product
{
_id: string;
_tpl?: string;
parentId?: string;
slotId?: string;
location?: ItemChangeLocation;
upd?: Upd;
}
export interface ItemChangeLocation
{
x: number;
y: number;
r: number;
isSearched?: boolean;
}