diff --git a/.gitattributes b/.gitattributes index 8bf218f2..0ef37475 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,62 +1,7 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### +# Normalize Line Endings * text=auto eol=lf -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain + +# LFS File Listing project/assets/database/locations/interchange/looseLoot.json filter=lfs diff=lfs merge=lfs -text project/assets/database/locations/interchange/staticLoot.json filter=lfs diff=lfs merge=lfs -text project/assets/database/locations/interchange/staticContainers.json filter=lfs diff=lfs merge=lfs -text diff --git a/.gitea/workflows/run-lint.yaml b/.gitea/workflows/run-lint.yaml index 4870b564..fabc8634 100644 --- a/.gitea/workflows/run-lint.yaml +++ b/.gitea/workflows/run-lint.yaml @@ -53,6 +53,7 @@ jobs: - name: Fix Instructions if: failure() && steps.run-tests.outcome == 'failure' run: | - echo -e "Code linting has failed. The linter has been configured to look for coding errors, defects, and questionable patterns. Please look into resolving these errors. The linter may be able to resolve some of these issues automatically. You can launch the automatic fixer by running the following command from within the 'project' directory. Anything not resolved by running this command must be resolved manually.\n\nnpm run lint:fix\n" + echo -e "Code linting has failed. The linter has been configured to look for coding errors, defects, questionable patterns, and code formatting issues. Please look into resolving these errors. The linter may be able to resolve some of these issues automatically. You can launch the automatic fixer by running the following command from within the 'project' directory. Anything not resolved by running this command must be resolved manually.\n\nnpm run lint:fix\n" + echo -e "To automatically format code on-save in your IDE, please install the recommended VSCode plugins listed within the 'project/Server.code-workspace' file.\n" echo -e "Consistency is professionalism.™" shell: bash diff --git a/.gitea/workflows/run-style.yaml b/.gitea/workflows/run-style.yaml deleted file mode 100644 index cdc20708..00000000 --- a/.gitea/workflows/run-style.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Check Code Style - -on: - push: - branches: '*' - pull_request: - branches: '*' - -jobs: - dprint: - runs-on: ubuntu-latest - container: - image: refringe/spt-build-node:1.0.7 - steps: - - name: Clone - run: | - rm -rf /workspace/SPT-AKI/Build/server - git clone https://dev.sp-tarkov.com/${GITHUB_REPOSITORY}.git --branch master /workspace/SPT-AKI/Build/server - - cd /workspace/SPT-AKI/Build/server - git checkout ${GITHUB_SHA} - shell: bash - - - name: Pull LFS Files - run: | - cd /workspace/SPT-AKI/Build/server - git lfs pull - git lfs ls-files - shell: bash - - - name: Cache NPM Dependencies - id: cache-npm-dependencies - uses: actions/cache@v4 - with: - path: /workspace/SPT-AKI/Build/server/project/node_modules - key: npm-dependencies-${{ hashFiles('/workspace/SPT-AKI/Build/server/project/package.json') }} - - - name: Install NPM Dependencies - if: steps.cache-npm-dependencies.outputs.cache-hit != 'true' - run: | - cd /workspace/SPT-AKI/Build/server/project - rm -rf node_modules - npm install - shell: bash - - - name: Check Code Style - id: check-code-style - run: | - cd /workspace/SPT-AKI/Build/server/project - npm run style - shell: bash - - - name: Fix Instructions - if: failure() && steps.check-code-style.outcome == 'failure' - run: | - echo -e "The code style check has failed. To fix this, please ensure your code adheres to the project's style guidelines. You can automatically format the project code by running the following command from within the 'project' directory.\n\nnpm run style:fix\n" - echo -e "To automatically format code on-save in your IDE, please install the recommended VSCode plugins listed within the 'project/Server.code-workspace' file.\n" - echo -e "Thank you for keeping our house clean. ♥" - shell: bash diff --git a/README.md b/README.md index de26217d..b1cebba3 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,7 @@ This project has been built in [Visual Studio Code](https://code.visualstudio.co There are a number of VSC extensions that we recommended for this project. VSC will prompt you to install these when you open the workspace file. If you do not see the prompt, you can install them manually: - [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - Editor Settings Synchronization -- [Dprint Code Formatter](https://marketplace.visualstudio.com/items?itemName=dprint.dprint) - Formatting on Save - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Linting for Coding Issues & Naming Conventions -- [Biome](https://marketplace.visualstudio.com/items?itemName=biomejs.biome) - Linting for Coding Standards - [Vitest](https://marketplace.visualstudio.com/items?itemName=vitest.explorer) - Debugging Tests - [SPT ID Highlighter](https://marketplace.visualstudio.com/items?itemName=refringe.spt-id-highlighter) - Converts IDs to Names @@ -54,26 +52,24 @@ To prepare the project for development you will need to: The following commands are available after the initial setup. Run them with `npm run `. -| Command | Description | -|--------------------------|----------------------------------------------------------------------| -| `check:circular` | Check for circular dependencies in the project. | -| `lint` | Lint the project for coding standards. | -| `lint:fix` | Attempt to automatically fix coding standard issues. | -| `style` | Check the project for style/formatting issues. | -| `style:fix` | Attempt to automatically fix style/formatting issues. | -| `test` | Run all tests. | -| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. | -| `test:coverage` | Run tests and generate a coverage report. | -| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. | -| `build:release` | Build the project for release. | -| `build:debug` | Build the project for debugging. | -| `build:bleeding` | Build the project on the bleeding edge. | -| `build:bleedingmods` | Build the project on the bleeding edge with mods. | -| `run:build` | Run the project in build mode. | -| `run:debug` | Run the project in debug mode. | -| `run:profiler` | Run the project in profiler mode. | -| `gen:types` | Generate types for the project. | -| `gen:docs` | Generate documentation for the project. | +| Command | Description | +|--------------------------|-----------------------------------------------------------------------| +| `check:circular` | Check for circular dependencies in the project. | +| `lint` | Check the project for coding standards and style/formatting issues. | +| `lint:fix` | Automatically fix coding standard issues and style/formatting issues. | +| `test` | Run all tests. | +| `test:watch` | Run tests in watch mode. Tests will re-run when files are changed. | +| `test:coverage` | Run tests and generate a coverage report. | +| `test:ui` | Run tests in UI mode. This will open a browser window to view tests. | +| `build:release` | Build the project for release. | +| `build:debug` | Build the project for debugging. | +| `build:bleeding` | Build the project on the bleeding edge. | +| `build:bleedingmods` | Build the project on the bleeding edge with mods. | +| `run:build` | Run the project in build mode. | +| `run:debug` | Run the project in debug mode. | +| `run:profiler` | Run the project in profiler mode. | +| `gen:types` | Generate types for the project. | +| `gen:docs` | Generate documentation for the project. | ### Debugging @@ -83,7 +79,7 @@ To debug the project in Visual Studio Code, you can select the `Run` tab and the To debug a server mod in Visual Studio Code, you can copy the mod files into the `user/mods` folder and then start the server in [debug mode](#debugging). You should now be able to set breakpoints in the mod's Typescript files and they will be hit when the server runs the mod files. -## Contributing +## Contributing We're really excited that you're interested in contributing! Before submitting your contribution, please consider the following: @@ -111,7 +107,7 @@ We're really excited that you're interested in contributing! Before submitting y ### Style Guide -We use Dprint to enforce a consistent code style. Please run `npm run style` and/or `npm run style:fix` before submitting your changes. This is made easier by using the recommended VSC extensions to automatically format your code whenever you save a file. +We use ESLint Stylistic to enforce a consistent code style. Please run `npm run lint` and/or `npm run lint:fix` before submitting your changes. This is made easier by using the recommended VSC extensions to automatically format your code whenever you save a file. ### Tests diff --git a/project/.editorconfig b/project/.editorconfig index a3284cad..04dc276e 100644 --- a/project/.editorconfig +++ b/project/.editorconfig @@ -7,3 +7,6 @@ charset = utf-8 indent_style = space indent_size = 4 max_line_length = 120 + +[*.md] +trim_trailing_whitespace = false diff --git a/project/.eslintignore b/project/.eslintignore index 0761328e..607008c7 100644 --- a/project/.eslintignore +++ b/project/.eslintignore @@ -1,5 +1,5 @@ # Exclude these folders from linting -node_modules +node_modules/ out/ obj/ build/ @@ -12,4 +12,4 @@ user/mods/ *.ico *.jpg *.txt -*.exe \ No newline at end of file +*.exe diff --git a/project/.eslintrc.json b/project/.eslintrc.json index 72de65ff..2923eff8 100644 --- a/project/.eslintrc.json +++ b/project/.eslintrc.json @@ -1,23 +1,34 @@ { - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "env": { - "node": true - }, "extends": [ - "plugin:@typescript-eslint/eslint-recommended" + "plugin:@typescript-eslint/recommended", + "plugin:@stylistic/recommended-extends", + "plugin:import/recommended", + "plugin:import/typescript" ], + "plugins": [ + "@typescript-eslint", + "@stylistic", + "import" + ], + "settings": { + "import/resolver": { + "typescript": { + "project": "tsconfig.json" + }, + "node": { + "extensions": [".ts", ".mjs"] + } + } + }, "rules": { - "brace-style": ["error", "allman"], - "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-dynamic-delete": "off", + "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", // We use a bunch of these. - "@typescript-eslint/no-unused-vars": "off", // Typescript compiler already checks--Will grey out variable. "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/explicit-module-boundary-types": ["error", { "allowArgumentsExplicitlyTypedAsAny": true }], + "@typescript-eslint/explicit-module-boundary-types": ["error", { + "allowArgumentsExplicitlyTypedAsAny": true + }], "@typescript-eslint/naming-convention": ["error", { "selector": "default", "format": ["camelCase"], @@ -40,24 +51,63 @@ "selector": "property", "modifiers": ["readonly", "static"], "format": ["UPPER_CASE"] + }], + "@stylistic/indent": ["error", 4, { "MemberExpression": 1, "SwitchCase": 1 }], + "@stylistic/brace-style": ["error", "allman", { "allowSingleLine": false }], + "@stylistic/semi": ["error", "always"], + "@stylistic/quotes": ["error", "double", { "avoidEscape": true }], + "@stylistic/linebreak-style": ["error", "unix"], + "@stylistic/max-len": ["error", { + "code": 120, + "tabWidth": 4, + "ignoreComments": true, + "ignoreTrailingComments": true, + "ignoreUrls": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreRegExpLiterals": true + }], + "@stylistic/multiline-ternary": ["error", "always-multiline"], + "@stylistic/no-extra-parens": ["error", "all"], + "@stylistic/new-parens": "error", + "@stylistic/newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }], + "@stylistic/no-extra-semi": "error", + "@stylistic/no-floating-decimal": "error", + "@stylistic/no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }], + "@stylistic/switch-colon-spacing": "error", + "@stylistic/type-annotation-spacing": "error", + "@stylistic/type-generic-spacing": ["error"], + "@stylistic/type-named-tuple-spacing": ["error"], + "@stylistic/wrap-regex": "error", + "@stylistic/yield-star-spacing": ["error", "both"], + "import/order": ["error", { + "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], + "pathGroups": [ + { + "pattern": "tsyringe", + "group": "builtin", + "position": "before" + } + ], + "newlines-between": "never", + "alphabetize": { + "order": "asc", + "caseInsensitive": true + } }] }, - "overrides": [{ - "files": [ - "src/loaders/**/*.ts" - ], - "rules": { - "@typescript-eslint/no-var-requires": "off" + "overrides": [ + { + "files": ["src/di/**/*.ts"], + "rules": { + "@typescript-eslint/no-extraneous-class": "off" + } + }, + { + "files": ["src/loaders/**/*.ts"], + "rules": { + "@typescript-eslint/no-var-requires": "off" + } } - }, { - "files": [ - "**/vitest.config.ts" - ], - "rules": { - "@typescript-eslint/naming-convention": ["error", { - "selector": "objectLiteralProperty", - "format": null - }] - } - }] + ] } diff --git a/project/.vscode/extensions.json b/project/.vscode/extensions.json index 49f98cc2..547ba280 100644 --- a/project/.vscode/extensions.json +++ b/project/.vscode/extensions.json @@ -1,10 +1,8 @@ { "recommendations": [ "EditorConfig.EditorConfig", - "dprint.dprint", - "dbaeumer.vscode-eslint", - "biomejs.biome", "vitest.explorer", - "refringe.spt-id-highlighter" + "refringe.spt-id-highlighter", + "dbaeumer.vscode-eslint" ] } diff --git a/project/Server.code-workspace b/project/Server.code-workspace index 5ab13e4e..a47cd254 100644 --- a/project/Server.code-workspace +++ b/project/Server.code-workspace @@ -7,9 +7,11 @@ "settings": { "window.title": "SPT-AKI Server", "editor.formatOnSave": true, - "editor.defaultFormatter": "dprint.dprint", - "editor.codeActionsOnSave": [ - "source.organizeImports.biome" - ] + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.debug": true, + "eslint.experimental.useFlatConfig": false } } diff --git a/project/assets/database/bots/types/bear.json b/project/assets/database/bots/types/bear.json index d215d661..4cdf0ae9 100644 --- a/project/assets/database/bots/types/bear.json +++ b/project/assets/database/bots/types/bear.json @@ -2495,7 +2495,8 @@ "Gizzy", "LuckyCharmT", "Rena-chan", - "HB" + "HB", + "John Pork" ], "generation": { "items": { diff --git a/project/assets/database/bots/types/usec.json b/project/assets/database/bots/types/usec.json index 5c58bd78..d80f409e 100644 --- a/project/assets/database/bots/types/usec.json +++ b/project/assets/database/bots/types/usec.json @@ -2492,7 +2492,8 @@ "Gizzy", "LuckyCharmT", "Rena-chan", - "HB" + "HB", + "John Pork" ], "generation": { "items": { diff --git a/project/biome.json b/project/biome.json deleted file mode 100644 index 0577bbda..00000000 --- a/project/biome.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", - "javascript": { - "parser": { - "unsafeParameterDecoratorsEnabled": true - } - }, - "organizeImports": { - "enabled": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "style": { - "useImportType": "off", - "noImplicitBoolean": "off", - "noParameterAssign": "warn", - "useTemplate": "warn", - "useSingleVarDeclarator": "warn" - }, - "a11y": { - "useKeyWithClickEvents": "off", - "useValidAnchor": "warn" - }, - "suspicious": { - "noExplicitAny": "off", - "noDoubleEquals": "warn", - "noShadowRestrictedNames": "warn", - "noEmptyInterface": "off" - }, - "performance": { - "noDelete": "off" - }, - "correctness": { - "noUnnecessaryContinue": "warn" - }, - "complexity": { - "noStaticOnlyClass": "off", - "useSimplifiedLogicExpression": "warn", - "useOptionalChain": "warn" - } - } - }, - "formatter": { - "enabled": false - }, - "files": { - "ignore": [ - "**/*.js", - "**/*.json", - "**/*.d.ts", - "**/Dockerfile.*", - "**/.git/**/*", - "**/.vscode/**/*", - "**/node_modules/**/*", - "**/build/**/*", - "**/obj/**/*", - "**/dist/**/*", - "**/user/**/*", - "**/logs/**/*", - "**/assets/**/*", - "**/Aki_Data/**/*", - "**/types/**/*", - "**/tests/__cache__/**/*", - "**/tests/__coverage__/**/*" - ] - } -} diff --git a/project/dprint.json b/project/dprint.json deleted file mode 100644 index 96405138..00000000 --- a/project/dprint.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "incremental": false, - "lineWidth": 120, - "indentWidth": 4, - "newLineKind": "lf", - "useTabs": false, - "typescript": { - "semiColons": "always", - "quoteStyle": "alwaysDouble", - "quoteProps": "asNeeded", - "useBraces": "always", - "bracePosition": "nextLine", - "singleBodyPosition": "maintain", - "nextControlFlowPosition": "nextLine", - "trailingCommas": "onlyMultiLine", - "operatorPosition": "nextLine", - "preferHanging": false, - "preferSingleLine": true, - "arrowFunction.useParentheses": "force", - "binaryExpression.linePerExpression": false, - "memberExpression.linePerExpression": false, - "typeLiteral.separatorKind": "semiColon", - "enumDeclaration.memberSpacing": "newLine", - "spaceAround": false, - "spaceSurroundingProperties": true, - "objectExpression.spaceSurroundingProperties": true, - "objectPattern.spaceSurroundingProperties": true, - "typeLiteral.spaceSurroundingProperties": true, - "binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator": true, - "commentLine.forceSpaceAfterSlashes": true, - "constructor.spaceBeforeParentheses": false, - "constructorType.spaceAfterNewKeyword": false, - "constructSignature.spaceAfterNewKeyword": false, - "doWhileStatement.spaceAfterWhileKeyword": true, - "module.sortImportDeclarations": "maintain", - "module.sortExportDeclarations": "maintain", - "exportDeclaration.sortNamedExports": "maintain", - "importDeclaration.sortNamedImports": "maintain", - "exportDeclaration.spaceSurroundingNamedExports": false, - "forInStatement.spaceAfterForKeyword": true, - "forOfStatement.spaceAfterForKeyword": true, - "forStatement.spaceAfterForKeyword": true, - "forStatement.spaceAfterSemiColons": true, - "functionDeclaration.spaceBeforeParentheses": false, - "functionExpression.spaceBeforeParentheses": false, - "functionExpression.spaceAfterFunctionKeyword": false, - "getAccessor.spaceBeforeParentheses": false, - "ifStatement.spaceAfterIfKeyword": true, - "importDeclaration.spaceSurroundingNamedImports": true, - "method.spaceBeforeParentheses": false, - "setAccessor.spaceBeforeParentheses": false, - "taggedTemplate.spaceBeforeLiteral": false, - "typeAnnotation.spaceBeforeColon": false, - "typeAssertion.spaceBeforeExpression": false, - "whileStatement.spaceAfterWhileKeyword": true - }, - "json": { - "trailingCommas": "never", - "preferSingleLine": false - }, - "markdown": { - "textWrap": "always", - "emphasisKind": "underscores", - "strongKind": "asterisks" - }, - "dockerfile": {}, - "excludes": [ - "**/*.js", - "**/*.d.ts", - "**/*-lock.json", - "**/.git/**/*", - "**/node_modules/**/*", - "**/build/**/*", - "**/obj/**/*", - "**/dist/**/*", - "**/user/**/*", - "**/logs/**/*", - "**/assets/**/*", - "**/Aki_Data/**/*", - "**/types/**/*", - "**/tests/__cache__/**/*", - "**/tests/__coverage__/**/*" - ], - "plugins": [ - "https://plugins.dprint.dev/typescript-0.88.3.wasm", - "https://plugins.dprint.dev/json-0.19.0.wasm", - "https://plugins.dprint.dev/markdown-0.16.2.wasm", - "https://plugins.dprint.dev/dockerfile-0.3.0.wasm" - ] -} diff --git a/project/package.json b/project/package.json index afe2dfc6..9c7493c5 100644 --- a/project/package.json +++ b/project/package.json @@ -12,10 +12,8 @@ }, "scripts": { "check:circular": "madge --circular --ts-config tsconfig.json --extensions ts ./src/", - "lint": "biome ci src --formatter-enabled=false --max-diagnostics=200", - "lint:fix": "biome check --apply-unsafe --max-diagnostics=200 . && dprint fmt --incremental=false", - "style": "dprint check --incremental=false", - "style:fix": "dprint fmt --incremental=false", + "lint": "eslint src", + "lint:fix": "eslint src --fix", "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", @@ -32,7 +30,7 @@ }, "dependencies": { "atomically": "~1.7", - "buffer-crc32": "^1.0.0", + "buffer-crc32": "~1.0", "date-fns": "~2.30", "date-fns-tz": "~2.0", "i18n": "~0.15", @@ -51,8 +49,9 @@ "ws": "~8.16" }, "devDependencies": { - "@biomejs/biome": "~1.6", + "@eslint/js": "~9.2", "@pnpm/exe": "8.15.4", + "@stylistic/eslint-plugin": "~1.8", "@swc/cli": "~0.3", "@swc/core": "~1.4", "@types/i18n": "~0.13", @@ -60,15 +59,16 @@ "@types/proper-lockfile": "~4.1", "@types/semver": "~7.5", "@types/ws": "~8.5", - "@typescript-eslint/eslint-plugin": "~7.2", - "@typescript-eslint/parser": "~7.2", + "@typescript-eslint/eslint-plugin": "~7.8", + "@typescript-eslint/parser": "~7.8", "@vitest/coverage-istanbul": "~1.3", "@vitest/ui": "~1.3", "@yao-pkg/pkg": "5.11.5", "@yao-pkg/pkg-fetch": "3.5.9", "cross-env": "~7.0", - "dprint": "~0.45", "eslint": "~8.57", + "eslint-import-resolver-typescript": "~3.6", + "eslint-plugin-import": "~2.29", "fs-extra": "~11.2", "gulp": "~4.0", "gulp-decompress": "~3.0", @@ -82,6 +82,7 @@ "tsconfig-paths": "~4.2", "typedoc": "~0.25", "typemoq": "~2.1", + "typescript-eslint": "~7.8", "vitest": "~1.3" }, "targets": { diff --git a/project/src/ErrorHandler.ts b/project/src/ErrorHandler.ts index b8b286ac..b918ac1b 100644 --- a/project/src/ErrorHandler.ts +++ b/project/src/ErrorHandler.ts @@ -1,5 +1,4 @@ import readline from "node:readline"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { AsyncQueue } from "@spt-aki/utils/AsyncQueue"; import { WinstonMainLogger } from "@spt-aki/utils/logging/WinstonMainLogger"; @@ -24,7 +23,7 @@ export class ErrorHandler this.logger.error(`\nStacktrace:\n${err.stack}`); } - this.readLine.question("Press Enter to close the window", (_ans) => this.readLine.close()); + this.readLine.question("Press Enter to close the window", _ans => this.readLine.close()); this.readLine.on("close", () => process.exit(1)); } } diff --git a/project/src/Program.ts b/project/src/Program.ts index 476e69e0..9bb2b9c1 100644 --- a/project/src/Program.ts +++ b/project/src/Program.ts @@ -1,7 +1,6 @@ import { container } from "tsyringe"; - -import { ErrorHandler } from "@spt-aki/ErrorHandler"; import { Container } from "@spt-aki/di/Container"; +import { ErrorHandler } from "@spt-aki/ErrorHandler"; import type { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; import { App } from "@spt-aki/utils/App"; import { Watermark } from "@spt-aki/utils/Watermark"; diff --git a/project/src/callbacks/AchievementCallbacks.ts b/project/src/callbacks/AchievementCallbacks.ts index 435ab0f9..70fb5219 100644 --- a/project/src/callbacks/AchievementCallbacks.ts +++ b/project/src/callbacks/AchievementCallbacks.ts @@ -1,3 +1,4 @@ +import { inject, injectable } from "tsyringe"; import { AchievementController } from "@spt-aki/controllers/AchievementController"; import { ProfileController } from "@spt-aki/controllers/ProfileController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; @@ -6,7 +7,6 @@ import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyR import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse"; import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { inject, injectable } from "tsyringe"; @injectable() export class AchievementCallbacks diff --git a/project/src/callbacks/BotCallbacks.ts b/project/src/callbacks/BotCallbacks.ts index 4ce6f3af..3359cba4 100644 --- a/project/src/callbacks/BotCallbacks.ts +++ b/project/src/callbacks/BotCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotController } from "@spt-aki/controllers/BotController"; import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; diff --git a/project/src/callbacks/BuildsCallbacks.ts b/project/src/callbacks/BuildsCallbacks.ts index b3849354..c347f561 100644 --- a/project/src/callbacks/BuildsCallbacks.ts +++ b/project/src/callbacks/BuildsCallbacks.ts @@ -1,3 +1,4 @@ +import { inject, injectable } from "tsyringe"; import { BuildController } from "@spt-aki/controllers/BuildController"; import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; @@ -7,7 +8,6 @@ import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/I import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData"; import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { inject, injectable } from "tsyringe"; @injectable() export class BuildsCallbacks diff --git a/project/src/callbacks/BundleCallbacks.ts b/project/src/callbacks/BundleCallbacks.ts index 260159d2..f3d73715 100644 --- a/project/src/callbacks/BundleCallbacks.ts +++ b/project/src/callbacks/BundleCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; diff --git a/project/src/callbacks/ClientLogCallbacks.ts b/project/src/callbacks/ClientLogCallbacks.ts index 856c3a88..8a7cdb62 100644 --- a/project/src/callbacks/ClientLogCallbacks.ts +++ b/project/src/callbacks/ClientLogCallbacks.ts @@ -1,3 +1,4 @@ +import { inject, injectable } from "tsyringe"; import { ClientLogController } from "@spt-aki/controllers/ClientLogController"; import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; @@ -7,7 +8,6 @@ import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { inject, injectable } from "tsyringe"; /** Handle client logging related events */ @injectable() diff --git a/project/src/callbacks/CustomizationCallbacks.ts b/project/src/callbacks/CustomizationCallbacks.ts index 47af98ec..8555782f 100644 --- a/project/src/callbacks/CustomizationCallbacks.ts +++ b/project/src/callbacks/CustomizationCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { CustomizationController } from "@spt-aki/controllers/CustomizationController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/callbacks/DataCallbacks.ts b/project/src/callbacks/DataCallbacks.ts index 4111bec6..6d82a8d0 100644 --- a/project/src/callbacks/DataCallbacks.ts +++ b/project/src/callbacks/DataCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HideoutController } from "@spt-aki/controllers/HideoutController"; import { RagfairController } from "@spt-aki/controllers/RagfairController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; diff --git a/project/src/callbacks/DialogueCallbacks.ts b/project/src/callbacks/DialogueCallbacks.ts index 5b0e620b..a24afde5 100644 --- a/project/src/callbacks/DialogueCallbacks.ts +++ b/project/src/callbacks/DialogueCallbacks.ts @@ -1,8 +1,8 @@ import { inject, injectable } from "tsyringe"; - import { DialogueController } from "@spt-aki/controllers/DialogueController"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, @@ -247,14 +247,14 @@ export class DialogueCallbacks implements OnUpdate /** Handle client/friend/ignore/set */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public ignoreFriend(url: string, request: { uid: string; }, sessionID: string): INullResponseData + public ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } /** Handle client/friend/ignore/remove */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public unIgnoreFriend(url: string, request: { uid: string; }, sessionID: string): INullResponseData + public unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } diff --git a/project/src/callbacks/GameCallbacks.ts b/project/src/callbacks/GameCallbacks.ts index b8ea950d..c968d319 100644 --- a/project/src/callbacks/GameCallbacks.ts +++ b/project/src/callbacks/GameCallbacks.ts @@ -1,8 +1,8 @@ import { inject, injectable } from "tsyringe"; - import { GameController } from "@spt-aki/controllers/GameController"; import { OnLoad } from "@spt-aki/di/OnLoad"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; @@ -14,7 +14,6 @@ import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; -import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -160,7 +159,7 @@ export class GameCallbacks implements OnLoad return this.httpResponse.noBody({ Version: this.watermark.getInGameVersionLabel() }); } - public reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData + public reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData { return this.httpResponse.nullResponse(); } diff --git a/project/src/callbacks/HandbookCallbacks.ts b/project/src/callbacks/HandbookCallbacks.ts index 588fb04a..b85489e4 100644 --- a/project/src/callbacks/HandbookCallbacks.ts +++ b/project/src/callbacks/HandbookCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookController } from "@spt-aki/controllers/HandbookController"; import { OnLoad } from "@spt-aki/di/OnLoad"; diff --git a/project/src/callbacks/HealthCallbacks.ts b/project/src/callbacks/HealthCallbacks.ts index 1cbaaf49..a6af1a83 100644 --- a/project/src/callbacks/HealthCallbacks.ts +++ b/project/src/callbacks/HealthCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HealthController } from "@spt-aki/controllers/HealthController"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/callbacks/HideoutCallbacks.ts b/project/src/callbacks/HideoutCallbacks.ts index 78ddcdc2..9319fb25 100644 --- a/project/src/callbacks/HideoutCallbacks.ts +++ b/project/src/callbacks/HideoutCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HideoutController } from "@spt-aki/controllers/HideoutController"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/callbacks/HttpCallbacks.ts b/project/src/callbacks/HttpCallbacks.ts index ef34a6ea..95932f16 100644 --- a/project/src/callbacks/HttpCallbacks.ts +++ b/project/src/callbacks/HttpCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { HttpServer } from "@spt-aki/servers/HttpServer"; diff --git a/project/src/callbacks/InraidCallbacks.ts b/project/src/callbacks/InraidCallbacks.ts index 87a5dec2..809b5f34 100644 --- a/project/src/callbacks/InraidCallbacks.ts +++ b/project/src/callbacks/InraidCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InraidController } from "@spt-aki/controllers/InraidController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; diff --git a/project/src/callbacks/InsuranceCallbacks.ts b/project/src/callbacks/InsuranceCallbacks.ts index 59e6a443..754b4210 100644 --- a/project/src/callbacks/InsuranceCallbacks.ts +++ b/project/src/callbacks/InsuranceCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InsuranceController } from "@spt-aki/controllers/InsuranceController"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/callbacks/InventoryCallbacks.ts b/project/src/callbacks/InventoryCallbacks.ts index 9233acb7..5e023c90 100644 --- a/project/src/callbacks/InventoryCallbacks.ts +++ b/project/src/callbacks/InventoryCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InventoryController } from "@spt-aki/controllers/InventoryController"; import { QuestController } from "@spt-aki/controllers/QuestController"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/callbacks/ItemEventCallbacks.ts b/project/src/callbacks/ItemEventCallbacks.ts index 6878ab95..0d1d7064 100644 --- a/project/src/callbacks/ItemEventCallbacks.ts +++ b/project/src/callbacks/ItemEventCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { Warning } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; @@ -24,7 +23,7 @@ export class ItemEventCallbacks ): Promise> { const eventResponse = await this.itemEventRouter.handleEvents(info, sessionID); - const result = (this.isCriticalError(eventResponse.warnings)) + const result = this.isCriticalError(eventResponse.warnings) ? this.httpResponse.getBody( eventResponse, this.getErrorCode(eventResponse.warnings), diff --git a/project/src/callbacks/LauncherCallbacks.ts b/project/src/callbacks/LauncherCallbacks.ts index dfaf0467..61adbb21 100644 --- a/project/src/callbacks/LauncherCallbacks.ts +++ b/project/src/callbacks/LauncherCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LauncherController } from "@spt-aki/controllers/LauncherController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IChangeRequestData } from "@spt-aki/models/eft/launcher/IChangeRequestData"; @@ -29,13 +28,13 @@ export class LauncherCallbacks public login(url: string, info: ILoginRequestData, sessionID: string): string { const output = this.launcherController.login(info); - return (!output) ? "FAILED" : output; + return !output ? "FAILED" : output; } public register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK" { const output = this.launcherController.register(info); - return (!output) ? "FAILED" : "OK"; + return !output ? "FAILED" : "OK"; } public get(url: string, info: ILoginRequestData, sessionID: string): string @@ -47,19 +46,19 @@ export class LauncherCallbacks public changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK" { const output = this.launcherController.changeUsername(info); - return (!output) ? "FAILED" : "OK"; + return !output ? "FAILED" : "OK"; } public changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK" { const output = this.launcherController.changePassword(info); - return (!output) ? "FAILED" : "OK"; + return !output ? "FAILED" : "OK"; } public wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK" { const output = this.launcherController.wipe(info); - return (!output) ? "FAILED" : "OK"; + return !output ? "FAILED" : "OK"; } public getServerVersion(): string diff --git a/project/src/callbacks/LocationCallbacks.ts b/project/src/callbacks/LocationCallbacks.ts index a0f0db11..e37afd49 100644 --- a/project/src/callbacks/LocationCallbacks.ts +++ b/project/src/callbacks/LocationCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LocationController } from "@spt-aki/controllers/LocationController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; diff --git a/project/src/callbacks/MatchCallbacks.ts b/project/src/callbacks/MatchCallbacks.ts index 7c91bf1a..8016b5d2 100644 --- a/project/src/callbacks/MatchCallbacks.ts +++ b/project/src/callbacks/MatchCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; @@ -112,6 +111,7 @@ export class MatchCallbacks { return this.httpResponse.getBody(true); } + /** Handle client/match/group/transfer */ // eslint-disable-next-line @typescript-eslint/no-unused-vars public transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData diff --git a/project/src/callbacks/ModCallbacks.ts b/project/src/callbacks/ModCallbacks.ts index 9396cef9..4a685e0a 100644 --- a/project/src/callbacks/ModCallbacks.ts +++ b/project/src/callbacks/ModCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { PostAkiModLoader } from "@spt-aki/loaders/PostAkiModLoader"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; diff --git a/project/src/callbacks/NoteCallbacks.ts b/project/src/callbacks/NoteCallbacks.ts index 95e450ec..0b126e13 100644 --- a/project/src/callbacks/NoteCallbacks.ts +++ b/project/src/callbacks/NoteCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { NoteController } from "@spt-aki/controllers/NoteController"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; diff --git a/project/src/callbacks/NotifierCallbacks.ts b/project/src/callbacks/NotifierCallbacks.ts index 595cde68..76f5c828 100644 --- a/project/src/callbacks/NotifierCallbacks.ts +++ b/project/src/callbacks/NotifierCallbacks.ts @@ -1,11 +1,10 @@ import { inject, injectable } from "tsyringe"; - import { NotifierController } from "@spt-aki/controllers/NotifierController"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; -import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData"; import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -38,8 +37,8 @@ export class NotifierCallbacks * be sent to client as NEWLINE separated strings... yup. */ this.notifierController.notifyAsync(tmpSessionID).then((messages: any) => - messages.map((message: any) => this.jsonUtil.serialize(message)).join("\n") - ).then((text) => this.httpServerHelper.sendTextJson(resp, text)); + messages.map((message: any) => this.jsonUtil.serialize(message)).join("\n"), + ).then(text => this.httpServerHelper.sendTextJson(resp, text)); } /** Handle push/notifier/get */ @@ -68,7 +67,7 @@ export class NotifierCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public selectProfile( url: string, - info: ISelectProfileRequestData, + info: IUIDRequestData, sessionID: string, ): IGetBodyResponseData { diff --git a/project/src/callbacks/PresetCallbacks.ts b/project/src/callbacks/PresetCallbacks.ts index 23b11de8..5740a264 100644 --- a/project/src/callbacks/PresetCallbacks.ts +++ b/project/src/callbacks/PresetCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PresetController } from "@spt-aki/controllers/PresetController"; import { OnLoad } from "@spt-aki/di/OnLoad"; diff --git a/project/src/callbacks/ProfileCallbacks.ts b/project/src/callbacks/ProfileCallbacks.ts index c345d044..faa7f23d 100644 --- a/project/src/callbacks/ProfileCallbacks.ts +++ b/project/src/callbacks/ProfileCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileController } from "@spt-aki/controllers/ProfileController"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; diff --git a/project/src/callbacks/QuestCallbacks.ts b/project/src/callbacks/QuestCallbacks.ts index b2c76970..a232fd66 100644 --- a/project/src/callbacks/QuestCallbacks.ts +++ b/project/src/callbacks/QuestCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { QuestController } from "@spt-aki/controllers/QuestController"; import { RepeatableQuestController } from "@spt-aki/controllers/RepeatableQuestController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; diff --git a/project/src/callbacks/RagfairCallbacks.ts b/project/src/callbacks/RagfairCallbacks.ts index 908d0518..406d6af1 100644 --- a/project/src/callbacks/RagfairCallbacks.ts +++ b/project/src/callbacks/RagfairCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairController } from "@spt-aki/controllers/RagfairController"; import { OnLoad } from "@spt-aki/di/OnLoad"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; diff --git a/project/src/callbacks/RepairCallbacks.ts b/project/src/callbacks/RepairCallbacks.ts index d5514850..9ec9b421 100644 --- a/project/src/callbacks/RepairCallbacks.ts +++ b/project/src/callbacks/RepairCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RepairController } from "@spt-aki/controllers/RepairController"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; diff --git a/project/src/callbacks/SaveCallbacks.ts b/project/src/callbacks/SaveCallbacks.ts index 7af5ec16..359cf1a5 100644 --- a/project/src/callbacks/SaveCallbacks.ts +++ b/project/src/callbacks/SaveCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; diff --git a/project/src/callbacks/TradeCallbacks.ts b/project/src/callbacks/TradeCallbacks.ts index 3fad61eb..2602ac3d 100644 --- a/project/src/callbacks/TradeCallbacks.ts +++ b/project/src/callbacks/TradeCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { TradeController } from "@spt-aki/controllers/TradeController"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; diff --git a/project/src/callbacks/TraderCallbacks.ts b/project/src/callbacks/TraderCallbacks.ts index 607272b7..be2ee5d1 100644 --- a/project/src/callbacks/TraderCallbacks.ts +++ b/project/src/callbacks/TraderCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { TraderController } from "@spt-aki/controllers/TraderController"; import { OnLoad } from "@spt-aki/di/OnLoad"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; diff --git a/project/src/callbacks/WeatherCallbacks.ts b/project/src/callbacks/WeatherCallbacks.ts index 6448e536..5a156d99 100644 --- a/project/src/callbacks/WeatherCallbacks.ts +++ b/project/src/callbacks/WeatherCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { WeatherController } from "@spt-aki/controllers/WeatherController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/callbacks/WishlistCallbacks.ts b/project/src/callbacks/WishlistCallbacks.ts index 550e59d5..25f16459 100644 --- a/project/src/callbacks/WishlistCallbacks.ts +++ b/project/src/callbacks/WishlistCallbacks.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { WishlistController } from "@spt-aki/controllers/WishlistController"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; diff --git a/project/src/context/ApplicationContext.ts b/project/src/context/ApplicationContext.ts index 4047d8a6..5fd2ab60 100644 --- a/project/src/context/ApplicationContext.ts +++ b/project/src/context/ApplicationContext.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { ContextVariable } from "@spt-aki/context/ContextVariable"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { LinkedList } from "@spt-aki/utils/collections/lists/LinkedList"; diff --git a/project/src/controllers/AchievementController.ts b/project/src/controllers/AchievementController.ts index 7d08f1e2..d460dd90 100644 --- a/project/src/controllers/AchievementController.ts +++ b/project/src/controllers/AchievementController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse"; import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; diff --git a/project/src/controllers/BotController.ts b/project/src/controllers/BotController.ts index 41168e5b..44bfc930 100644 --- a/project/src/controllers/BotController.ts +++ b/project/src/controllers/BotController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { BotGenerator } from "@spt-aki/generators/BotGenerator"; @@ -62,7 +61,7 @@ export class BotController */ public getBotPresetGenerationLimit(type: string): number { - const value = this.botConfig.presetBatch[(type === "assaultGroup") ? "assault" : type]; + const value = this.botConfig.presetBatch[type === "assaultGroup" ? "assault" : type]; if (!value) { @@ -148,7 +147,7 @@ export class BotController const result = {}; const botDb = this.databaseServer.getTables().bots.types; - const botTypes = Object.keys(WildSpawnTypeNumber).filter((v) => Number.isNaN(Number(v))); + const botTypes = Object.keys(WildSpawnTypeNumber).filter(v => Number.isNaN(Number(v))); for (let botType of botTypes) { const enumType = botType.toLowerCase(); @@ -212,8 +211,8 @@ export class BotController const raidSettings = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION)?.getValue< IGetRaidConfigurationRequestData >(); - const pmcLevelRangeForMap = - this.pmcConfig.locationSpecificPmcLevelOverride[raidSettings?.location.toLowerCase()]; + const pmcLevelRangeForMap + = this.pmcConfig.locationSpecificPmcLevelOverride[raidSettings?.location.toLowerCase()]; const allPmcsHaveSameNameAsPlayer = this.randomUtil.getChance100( this.pmcConfig.allPMCsHavePlayerNameWithRandomPrefixChance, @@ -239,7 +238,7 @@ export class BotController conditionPromises.push(this.generateWithBotDetails(condition, botGenerationDetails, sessionId)); } - await Promise.all(conditionPromises).then((p) => Promise.all(p)); + await Promise.all(conditionPromises).then(p => Promise.all(p)); return []; } @@ -326,8 +325,8 @@ export class BotController const raidSettings = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION)?.getValue< IGetRaidConfigurationRequestData >(); - const pmcLevelRangeForMap = - this.pmcConfig.locationSpecificPmcLevelOverride[raidSettings.location.toLowerCase()]; + const pmcLevelRangeForMap + = this.pmcConfig.locationSpecificPmcLevelOverride[raidSettings.location.toLowerCase()]; // Create gen request for when cache is empty const botGenerationDetails: BotGenerationDetails = { diff --git a/project/src/controllers/BuildController.ts b/project/src/controllers/BuildController.ts index b43ec7cb..b1cee1fa 100644 --- a/project/src/controllers/BuildController.ts +++ b/project/src/controllers/BuildController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest"; @@ -43,11 +42,11 @@ export class BuildController const defaultEquipmentPresetsClone = this.jsonUtil.clone( this.databaseServer.getTables().templates.defaultEquipmentPresets, ); - const playerSecureContainer = profile.characters.pmc.Inventory.items?.find((x) => - x.slotId === secureContainerSlotId + const playerSecureContainer = profile.characters.pmc.Inventory.items?.find(x => + x.slotId === secureContainerSlotId, ); - const firstDefaultItemsSecureContainer = defaultEquipmentPresetsClone[0]?.Items?.find((x) => - x.slotId === secureContainerSlotId + const firstDefaultItemsSecureContainer = defaultEquipmentPresetsClone[0]?.Items?.find(x => + x.slotId === secureContainerSlotId, ); if (playerSecureContainer && playerSecureContainer?._tpl !== firstDefaultItemsSecureContainer?._tpl) { @@ -55,7 +54,7 @@ export class BuildController for (const defaultPreset of defaultEquipmentPresetsClone) { // Find presets secure container - const secureContainer = defaultPreset.Items.find((item) => item.slotId === secureContainerSlotId); + const secureContainer = defaultPreset.Items.find(item => item.slotId === secureContainerSlotId); if (secureContainer) { secureContainer._tpl = playerSecureContainer._tpl; @@ -84,7 +83,7 @@ export class BuildController const newBuild: IWeaponBuild = { Id: body.Id, Name: body.Name, Root: body.Root, Items: body.Items }; const savedWeaponBuilds = this.saveServer.getProfile(sessionId).userbuilds.weaponBuilds; - const existingBuild = savedWeaponBuilds.find((x) => x.Id === body.Id); + const existingBuild = savedWeaponBuilds.find(x => x.Id === body.Id); if (existingBuild) { // exists, replace @@ -107,8 +106,8 @@ export class BuildController const buildType = "equipmentBuilds"; const pmcData = this.profileHelper.getPmcProfile(sessionID); - const existingSavedEquipmentBuilds: IEquipmentBuild[] = - this.saveServer.getProfile(sessionID).userbuilds[buildType]; + const existingSavedEquipmentBuilds: IEquipmentBuild[] = this.saveServer.getProfile(sessionID) + .userbuilds[buildType]; // Replace duplicate ID's. The first item is the base item. // Root ID and the base item ID need to match. @@ -122,8 +121,8 @@ export class BuildController Items: request.Items, }; - const existingBuild = existingSavedEquipmentBuilds.find((build) => - build.Name === request.Name || build.Id === request.Id + const existingBuild = existingSavedEquipmentBuilds.find(build => + build.Name === request.Name || build.Id === request.Id, ); if (existingBuild) { @@ -141,7 +140,7 @@ export class BuildController } } - /** Handle client/builds/delete*/ + /** Handle client/builds/delete */ public removeBuild(sessionID: string, request: IRemoveBuildRequestData): void { this.removePlayerBuild(request.id, sessionID); @@ -155,7 +154,7 @@ export class BuildController const magazineBuilds = profile.userbuilds.magazineBuilds; // Check for id in weapon array first - const matchingWeaponBuild = weaponBuilds.find((weaponBuild) => weaponBuild.Id === idToRemove); + const matchingWeaponBuild = weaponBuilds.find(weaponBuild => weaponBuild.Id === idToRemove); if (matchingWeaponBuild) { weaponBuilds.splice(weaponBuilds.indexOf(matchingWeaponBuild), 1); @@ -164,7 +163,7 @@ export class BuildController } // Id not found in weapons, try equipment - const matchingEquipmentBuild = equipmentBuilds.find((equipmentBuild) => equipmentBuild.Id === idToRemove); + const matchingEquipmentBuild = equipmentBuilds.find(equipmentBuild => equipmentBuild.Id === idToRemove); if (matchingEquipmentBuild) { equipmentBuilds.splice(equipmentBuilds.indexOf(matchingEquipmentBuild), 1); @@ -173,7 +172,7 @@ export class BuildController } // Id not found in weapons/equipment, try mags - const matchingMagazineBuild = magazineBuilds.find((magBuild) => magBuild.Id === idToRemove); + const matchingMagazineBuild = magazineBuilds.find(magBuild => magBuild.Id === idToRemove); if (matchingMagazineBuild) { magazineBuilds.splice(magazineBuilds.indexOf(matchingMagazineBuild), 1); @@ -208,7 +207,7 @@ export class BuildController profile.userbuilds.magazineBuilds = []; } - const existingArrayId = profile.userbuilds.magazineBuilds.findIndex((item) => item.Name === request.Name); + const existingArrayId = profile.userbuilds.magazineBuilds.findIndex(item => item.Name === request.Name); if (existingArrayId === -1) { diff --git a/project/src/controllers/ClientLogController.ts b/project/src/controllers/ClientLogController.ts index 988f6442..ca0ba74b 100644 --- a/project/src/controllers/ClientLogController.ts +++ b/project/src/controllers/ClientLogController.ts @@ -1,9 +1,9 @@ +import { inject, injectable } from "tsyringe"; import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest"; import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; import { LogLevel } from "@spt-aki/models/spt/logging/LogLevel"; import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { inject, injectable } from "tsyringe"; @injectable() export class ClientLogController diff --git a/project/src/controllers/CustomizationController.ts b/project/src/controllers/CustomizationController.ts index d1aac172..8a7b5500 100644 --- a/project/src/controllers/CustomizationController.ts +++ b/project/src/controllers/CustomizationController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; @@ -43,10 +42,10 @@ export class CustomizationController const suits = this.databaseServer.getTables().traders[traderID].suits; // Get an inner join of clothing from templates.customization and Ragman's suits array - const matchingSuits = suits.filter((x) => x.suiteId in templates); + const matchingSuits = suits.filter(x => x.suiteId in templates); // Return all suits that have a side array containing the players side (usec/bear) - return matchingSuits.filter((x) => templates[x.suiteId]._props.Side.includes(pmcData.Info.Side)); + return matchingSuits.filter(x => templates[x.suiteId]._props.Side.includes(pmcData.Info.Side)); } /** @@ -133,7 +132,7 @@ export class CustomizationController protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit { - return this.getAllTraderSuits(sessionId).find((x) => x._id === offerId); + return this.getAllTraderSuits(sessionId).find(x => x._id === offerId); } /** @@ -181,7 +180,7 @@ export class CustomizationController output: IItemEventRouterResponse, ): void { - const relatedItem = pmcData.Inventory.items.find((x) => x._id === clothingItem.id); + const relatedItem = pmcData.Inventory.items.find(x => x._id === clothingItem.id); if (!relatedItem) { this.logger.error( diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 6bc4546b..346f855f 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -1,5 +1,4 @@ import { inject, injectAll, injectable } from "tsyringe"; - import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; @@ -34,21 +33,21 @@ export class DialogueController // if give command is disabled or commando commands are disabled if (!coreConfigs.features?.chatbotFeatures?.commandoEnabled) { - const sptCommando = this.dialogueChatBots.find((c) => - c.getChatBot()._id.toLocaleLowerCase() === "sptcommando" + const sptCommando = this.dialogueChatBots.find(c => + c.getChatBot()._id.toLocaleLowerCase() === "sptcommando", ); this.dialogueChatBots.splice(this.dialogueChatBots.indexOf(sptCommando), 1); } if (!coreConfigs.features?.chatbotFeatures?.sptFriendEnabled) { - const sptFriend = this.dialogueChatBots.find((c) => c.getChatBot()._id.toLocaleLowerCase() === "sptFriend"); + const sptFriend = this.dialogueChatBots.find(c => c.getChatBot()._id.toLocaleLowerCase() === "sptFriend"); this.dialogueChatBots.splice(this.dialogueChatBots.indexOf(sptFriend), 1); } } public registerChatBot(chatBot: IDialogueChatBot): void { - if (this.dialogueChatBots.some((cb) => cb.getChatBot()._id === chatBot.getChatBot()._id)) + if (this.dialogueChatBots.some(cb => cb.getChatBot()._id === chatBot.getChatBot()._id)) { throw new Error(`The chat bot ${chatBot.getChatBot()._id} being registered already exists!`); } @@ -73,7 +72,7 @@ export class DialogueController public getFriendList(sessionID: string): IGetFriendListDataResponse { // Force a fake friend called SPT into friend list - return { Friends: this.dialogueChatBots.map((v) => v.getChatBot()), Ignore: [], InIgnoreList: [] }; + return { Friends: this.dialogueChatBots.map(v => v.getChatBot()), Ignore: [], InIgnoreList: [] }; } /** @@ -117,6 +116,7 @@ export class DialogueController return result; } + /** * Get the users involved in a dialog (player + other party) * @param dialog The dialog to check for users @@ -131,7 +131,7 @@ export class DialogueController // User to user messages are special in that they need the player to exist in them, add if they don't if ( messageType === MessageType.USER_MESSAGE - && !dialog.Users?.find((userDialog) => userDialog._id === profile.characters.pmc.sessionId) + && !dialog.Users?.find(userDialog => userDialog._id === profile.characters.pmc.sessionId) ) { if (!dialog.Users) @@ -207,7 +207,7 @@ export class DialogueController if (request.type === MessageType.USER_MESSAGE) { profile.dialogues[request.dialogId].Users = []; - const chatBot = this.dialogueChatBots.find((cb) => cb.getChatBot()._id === request.dialogId); + const chatBot = this.dialogueChatBots.find(cb => cb.getChatBot()._id === request.dialogId); if (chatBot) { profile.dialogues[request.dialogId].Users.push(chatBot.getChatBot()); @@ -217,6 +217,7 @@ export class DialogueController return profile.dialogues[request.dialogId]; } + /** * Get the users involved in a mail between two entities * @param fullProfile Player profile @@ -230,7 +231,7 @@ export class DialogueController { result.push(...dialogUsers); - if (!result.find((userDialog) => userDialog._id === fullProfile.info.id)) + if (!result.find(userDialog => userDialog._id === fullProfile.info.id)) { // Player doesnt exist, add them in before returning const pmcProfile = fullProfile.characters.pmc; @@ -278,7 +279,7 @@ export class DialogueController */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean { - return messages.some((message) => message.items?.data?.length > 0); + return messages.some(message => message.items?.data?.length > 0); } /** @@ -375,7 +376,7 @@ export class DialogueController { this.mailSendService.sendPlayerMessageToNpc(sessionId, request.dialogId, request.text); - return this.dialogueChatBots.find((cb) => cb.getChatBot()._id === request.dialogId)?.handleMessage( + return this.dialogueChatBots.find(cb => cb.getChatBot()._id === request.dialogId)?.handleMessage( sessionId, request, ) ?? request.dialogId; @@ -391,7 +392,7 @@ export class DialogueController { const timeNow = this.timeUtil.getTimestamp(); const dialogs = this.dialogueHelper.getDialogsForProfile(sessionId); - return dialogs[dialogueId].messages.filter((message) => timeNow < (message.dt + message.maxStorageTime)); + return dialogs[dialogueId].messages.filter(message => timeNow < message.dt + message.maxStorageTime); } /** @@ -401,7 +402,7 @@ export class DialogueController */ protected getMessagesWithAttachments(messages: Message[]): Message[] { - return messages.filter((message) => message.items?.data?.length > 0); + return messages.filter(message => message.items?.data?.length > 0); } /** @@ -446,6 +447,6 @@ export class DialogueController */ protected messageHasExpired(message: Message): boolean { - return (this.timeUtil.getTimestamp()) > (message.dt + message.maxStorageTime); + return this.timeUtil.getTimestamp() > message.dt + message.maxStorageTime; } } diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index c1762567..04b45bf2 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; @@ -360,8 +359,8 @@ export class GameController for (const positionToAdd of positionsToAdd) { // Exists already, add new items to existing positions pool - const existingLootPosition = mapLooseLoot.spawnpoints.find((x) => - x.template.Id === positionToAdd.template.Id + const existingLootPosition = mapLooseLoot.spawnpoints.find(x => + x.template.Id === positionToAdd.template.Id, ); if (existingLootPosition) { @@ -391,7 +390,7 @@ export class GameController const mapLootAdjustmentsDict = adjustments[mapId]; for (const lootKey in mapLootAdjustmentsDict) { - const lootPostionToAdjust = mapLooseLootData.spawnpoints.find((x) => x.template.Id === lootKey); + const lootPostionToAdjust = mapLooseLootData.spawnpoints.find(x => x.template.Id === lootKey); if (!lootPostionToAdjust) { this.logger.warning(`Unable to adjust loot position: ${lootKey} on map: ${mapId}`); @@ -424,7 +423,7 @@ export class GameController for (const botToLimit of this.locationConfig.botTypeLimits[mapId]) { - const index = map.base.MinMaxBots.findIndex((x) => x.WildSpawnType === botToLimit.type); + const index = map.base.MinMaxBots.findIndex(x => x.WildSpawnType === botToLimit.type); if (index !== -1) { // Existing bot type found in MinMaxBots array, edit @@ -452,9 +451,9 @@ export class GameController public getGameConfig(sessionID: string): IGameConfigResponse { const profile = this.profileHelper.getPmcProfile(sessionID); - const gameTime = - profile.Stats?.Eft.OverallCounters.Items?.find((counter) => - counter.Key.includes("LifeTime") && counter.Key.includes("Pmc") + const gameTime + = profile.Stats?.Eft.OverallCounters.Items?.find(counter => + counter.Key.includes("LifeTime") && counter.Key.includes("Pmc"), )?.Value ?? 0; const config: IGameConfigResponse = { @@ -599,12 +598,12 @@ export class GameController let hpRegenPerHour = 456.6; // Set new values, whatever is smallest - energyRegenPerHour += pmcProfile.Bonuses.filter((bonus) => bonus.type === BonusType.ENERGY_REGENERATION) + energyRegenPerHour += pmcProfile.Bonuses.filter(bonus => bonus.type === BonusType.ENERGY_REGENERATION) .reduce((sum, curr) => sum + curr.value, 0); - hydrationRegenPerHour += pmcProfile.Bonuses.filter((bonus) => - bonus.type === BonusType.HYDRATION_REGENERATION + hydrationRegenPerHour += pmcProfile.Bonuses.filter(bonus => + bonus.type === BonusType.HYDRATION_REGENERATION, ).reduce((sum, curr) => sum + curr.value, 0); - hpRegenPerHour += pmcProfile.Bonuses.filter((bonus) => bonus.type === BonusType.HEALTH_REGENERATION).reduce( + hpRegenPerHour += pmcProfile.Bonuses.filter(bonus => bonus.type === BonusType.HEALTH_REGENERATION).reduce( (sum, curr) => sum + curr.value, 0, ); @@ -701,7 +700,7 @@ export class GameController for (const wave of location.base.waves ?? []) { - if ((wave.slots_max - wave.slots_min === 0)) + if (wave.slots_max - wave.slots_min === 0) { this.logger.debug( `Fixed ${wave.WildSpawnType} Spawn: ${locationKey} wave: ${wave.number} of type: ${wave.WildSpawnType} in zone: ${wave.SpawnPoints} with Max Slots of ${wave.slots_max}`, @@ -739,13 +738,13 @@ export class GameController const currentTimeStamp = this.timeUtil.getTimestamp(); // One day post-profile creation - if (currentTimeStamp > (timeStampProfileCreated + oneDaySeconds)) + if (currentTimeStamp > timeStampProfileCreated + oneDaySeconds) { this.giftService.sendPraporStartingGift(pmcProfile.sessionId, 1); } // Two day post-profile creation - if (currentTimeStamp > (timeStampProfileCreated + (oneDaySeconds * 2))) + if (currentTimeStamp > timeStampProfileCreated + oneDaySeconds * 2) { this.giftService.sendPraporStartingGift(pmcProfile.sessionId, 2); } @@ -771,7 +770,7 @@ export class GameController // Wave has size that makes it candidate for splitting if ( wave.slots_max - wave.slots_min - >= this.locationConfig.splitWaveIntoSingleSpawnsSettings.waveSizeThreshold + >= this.locationConfig.splitWaveIntoSingleSpawnsSettings.waveSizeThreshold ) { // Get count of bots to be spawned in wave @@ -842,8 +841,8 @@ export class GameController { const modDetails = activeMods[modKey]; if ( - fullProfile.aki.mods.some((x) => - x.author === modDetails.author && x.name === modDetails.name && x.version === modDetails.version + fullProfile.aki.mods.some(x => + x.author === modDetails.author && x.name === modDetails.name && x.version === modDetails.version, ) ) { @@ -958,8 +957,8 @@ export class GameController protected adjustLabsRaiderSpawnRate(): void { const labsBase = this.databaseServer.getTables().locations.laboratory.base; - const nonTriggerLabsBossSpawns = labsBase.BossLocationSpawn.filter((x) => - x.TriggerId === "" && x.TriggerName === "" + const nonTriggerLabsBossSpawns = labsBase.BossLocationSpawn.filter(x => + x.TriggerId === "" && x.TriggerName === "", ); if (nonTriggerLabsBossSpawns) { diff --git a/project/src/controllers/HandbookController.ts b/project/src/controllers/HandbookController.ts index d9a957da..5823d583 100644 --- a/project/src/controllers/HandbookController.ts +++ b/project/src/controllers/HandbookController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; diff --git a/project/src/controllers/HealthController.ts b/project/src/controllers/HealthController.ts index f69ade0e..a8f2aec2 100644 --- a/project/src/controllers/HealthController.ts +++ b/project/src/controllers/HealthController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HealthHelper } from "@spt-aki/helpers/HealthHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -66,7 +65,7 @@ export class HealthController const output = this.eventOutputHolder.getOutput(sessionID); // Update medkit used (hpresource) - const healingItemToUse = pmcData.Inventory.items.find((item) => item._id === request.item); + const healingItemToUse = pmcData.Inventory.items.find(item => item._id === request.item); if (!healingItemToUse) { const errorMessage = this.localisationService.getText( @@ -114,7 +113,7 @@ export class HealthController const output = this.eventOutputHolder.getOutput(sessionID); let resourceLeft = 0; - const itemToConsume = pmcData.Inventory.items.find((x) => x._id === request.item); + const itemToConsume = pmcData.Inventory.items.find(x => x._id === request.item); if (!itemToConsume) { // Item not found, very bad diff --git a/project/src/controllers/HideoutController.ts b/project/src/controllers/HideoutController.ts index d6d27841..66ab043a 100644 --- a/project/src/controllers/HideoutController.ts +++ b/project/src/controllers/HideoutController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator"; import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; @@ -106,7 +105,7 @@ export class HideoutController { const items = request.items.map((reqItem) => { - const item = pmcData.Inventory.items.find((invItem) => invItem._id === reqItem.id); + const item = pmcData.Inventory.items.find(invItem => invItem._id === reqItem.id); return { inventoryItem: item, requestedItem: reqItem }; }); @@ -139,7 +138,7 @@ export class HideoutController } // Construction time management - const profileHideoutArea = pmcData.Hideout.Areas.find((area) => area.type === request.areaType); + const profileHideoutArea = pmcData.Hideout.Areas.find(area => area.type === request.areaType); if (!profileHideoutArea) { this.logger.error(this.localisationService.getText("hideout-unable_to_find_area", request.areaType)); @@ -148,8 +147,8 @@ export class HideoutController return; } - const hideoutDataDb = this.databaseServer.getTables().hideout.areas.find((area) => - area.type === request.areaType + const hideoutDataDb = this.databaseServer.getTables().hideout.areas.find(area => + area.type === request.areaType, ); if (!hideoutDataDb) { @@ -192,7 +191,7 @@ export class HideoutController { const db = this.databaseServer.getTables(); - const profileHideoutArea = pmcData.Hideout.Areas.find((area) => area.type === request.areaType); + const profileHideoutArea = pmcData.Hideout.Areas.find(area => area.type === request.areaType); if (!profileHideoutArea) { this.logger.error(this.localisationService.getText("hideout-unable_to_find_area", request.areaType)); @@ -206,7 +205,7 @@ export class HideoutController profileHideoutArea.completeTime = 0; profileHideoutArea.constructing = false; - const hideoutData = db.hideout.areas.find((area) => area.type === profileHideoutArea.type); + const hideoutData = db.hideout.areas.find(area => area.type === profileHideoutArea.type); if (!hideoutData) { this.logger.error( @@ -264,11 +263,11 @@ export class HideoutController */ protected checkAndUpgradeWall(pmcData: IPmcData): void { - const medStation = pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.MEDSTATION); - const waterCollector = pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.WATER_COLLECTOR); + const medStation = pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.MEDSTATION); + const waterCollector = pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.WATER_COLLECTOR); if (medStation?.level >= 1 && waterCollector?.level >= 1) { - const wall = pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.EMERGENCY_WALL); + const wall = pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.EMERGENCY_WALL); if (wall?.level === 0) { wall.level = 3; @@ -310,8 +309,8 @@ export class HideoutController } // Some areas like gun stand have a child area linked to it, it needs to do the same as above - const childDbArea = this.databaseServer.getTables().hideout.areas.find((x) => - x.parentArea === dbHideoutArea._id + const childDbArea = this.databaseServer.getTables().hideout.areas.find(x => + x.parentArea === dbHideoutArea._id, ); if (childDbArea) { @@ -322,8 +321,8 @@ export class HideoutController } // Set child area level to same as parent area - pmcData.Hideout.Areas.find((x) => x.type === childDbArea.type).level = pmcData.Hideout.Areas.find((x) => - x.type === profileParentHideoutArea.type + pmcData.Hideout.Areas.find(x => x.type === childDbArea.type).level = pmcData.Hideout.Areas.find(x => + x.type === profileParentHideoutArea.type, ).level; // Add/upgrade stash item in player inventory @@ -343,7 +342,7 @@ export class HideoutController */ protected addUpdateInventoryItemToProfile(pmcData: IPmcData, dbHideoutData: IHideoutArea, hideoutStage: Stage): void { - const existingInventoryItem = pmcData.Inventory.items.find((x) => x._id === dbHideoutData._id); + const existingInventoryItem = pmcData.Inventory.items.find(x => x._id === dbHideoutData._id); if (existingInventoryItem) { // Update existing items container tpl to point to new id (tpl) @@ -400,11 +399,11 @@ export class HideoutController const itemsToAdd = Object.entries(addItemToHideoutRequest.items).map((kvp) => { - const item = pmcData.Inventory.items.find((invItem) => invItem._id === kvp[1].id); + const item = pmcData.Inventory.items.find(invItem => invItem._id === kvp[1].id); return { inventoryItem: item, requestedItem: kvp[1], slot: kvp[0] }; }); - const hideoutArea = pmcData.Hideout.Areas.find((area) => area.type === addItemToHideoutRequest.areaType); + const hideoutArea = pmcData.Hideout.Areas.find(area => area.type === addItemToHideoutRequest.areaType); if (!hideoutArea) { this.logger.error( @@ -431,7 +430,7 @@ export class HideoutController // Add item to area.slots const destinationLocationIndex = Number(item.slot); - const hideoutSlotIndex = hideoutArea.slots.findIndex((x) => x.locationIndex === destinationLocationIndex); + const hideoutSlotIndex = hideoutArea.slots.findIndex(x => x.locationIndex === destinationLocationIndex); hideoutArea.slots[hideoutSlotIndex].item = [{ _id: item.inventoryItem._id, _tpl: item.inventoryItem._tpl, @@ -463,7 +462,7 @@ export class HideoutController { const output = this.eventOutputHolder.getOutput(sessionID); - const hideoutArea = pmcData.Hideout.Areas.find((area) => area.type === request.areaType); + const hideoutArea = pmcData.Hideout.Areas.find(area => area.type === request.areaType); if (!hideoutArea) { this.logger.error(this.localisationService.getText("hideout-unable_to_find_area", request.areaType)); @@ -520,7 +519,7 @@ export class HideoutController const slotIndexToRemove = removeResourceRequest.slots[0]; // Assume only one item in slot - const itemToReturn = hideoutArea.slots.find((slot) => slot.locationIndex === slotIndexToRemove).item[0]; + const itemToReturn = hideoutArea.slots.find(slot => slot.locationIndex === slotIndexToRemove).item[0]; const request: IAddItemDirectRequest = { itemWithModsToAdd: [itemToReturn], @@ -537,7 +536,7 @@ export class HideoutController } // Remove items from slot, locationIndex remains - const hideoutSlotIndex = hideoutArea.slots.findIndex((slot) => slot.locationIndex === slotIndexToRemove); + const hideoutSlotIndex = hideoutArea.slots.findIndex(slot => slot.locationIndex === slotIndexToRemove); hideoutArea.slots[hideoutSlotIndex].item = undefined; return output; @@ -562,7 +561,7 @@ export class HideoutController // Force a production update (occur before area is toggled as it could be generator and doing it after generator enabled would cause incorrect calculaton of production progress) this.hideoutHelper.updatePlayerHideout(sessionID); - const hideoutArea = pmcData.Hideout.Areas.find((area) => area.type === request.areaType); + const hideoutArea = pmcData.Hideout.Areas.find(area => area.type === request.areaType); if (!hideoutArea) { this.logger.error(this.localisationService.getText("hideout-unable_to_find_area", request.areaType)); @@ -592,20 +591,20 @@ export class HideoutController this.hideoutHelper.registerProduction(pmcData, body, sessionID); // Find the recipe of the production - const recipe = this.databaseServer.getTables().hideout.production.find((p) => p._id === body.recipeId); + const recipe = this.databaseServer.getTables().hideout.production.find(p => p._id === body.recipeId); // Find the actual amount of items we need to remove because body can send weird data const recipeRequirementsClone = this.jsonUtil.clone( - recipe.requirements.filter((i) => i.type === "Item" || i.type === "Tool"), + recipe.requirements.filter(i => i.type === "Item" || i.type === "Tool"), ); const output = this.eventOutputHolder.getOutput(sessionID); const itemsToDelete = body.items.concat(body.tools); for (const itemToDelete of itemsToDelete) { - const itemToCheck = pmcData.Inventory.items.find((i) => i._id === itemToDelete.id); - const requirement = recipeRequirementsClone.find((requirement) => - requirement.templateId === itemToCheck._tpl + const itemToCheck = pmcData.Inventory.items.find(i => i._id === itemToDelete.id); + const requirement = recipeRequirementsClone.find(requirement => + requirement.templateId === itemToCheck._tpl, ); // Handle tools not having a `count`, but always only requiring 1 @@ -645,7 +644,7 @@ export class HideoutController for (const requestedItem of body.items) { - const inventoryItem = pmcData.Inventory.items.find((item) => item._id === requestedItem.id); + const inventoryItem = pmcData.Inventory.items.find(item => item._id === requestedItem.id); if (!inventoryItem) { this.logger.error( @@ -667,7 +666,7 @@ export class HideoutController } } - const recipe = this.databaseServer.getTables().hideout.scavcase.find((r) => r._id === body.recipeId); + const recipe = this.databaseServer.getTables().hideout.scavcase.find(r => r._id === body.recipeId); if (!recipe) { this.logger.error( @@ -679,13 +678,12 @@ export class HideoutController // @Important: Here we need to be very exact: // - normal recipe: Production time value is stored in attribute "productionTime" with small "p" // - scav case recipe: Production time value is stored in attribute "ProductionTime" with capital "P" - const adjustedCraftTime = recipe.ProductionTime - - this.hideoutHelper.getSkillProductionTimeReduction( - pmcData, - recipe.ProductionTime, - SkillTypes.CRAFTING, - this.databaseServer.getTables().globals.config.SkillsSettings.Crafting.CraftTimeReductionPerLevel, - ); + const adjustedCraftTime = recipe.ProductionTime - this.hideoutHelper.getSkillProductionTimeReduction( + pmcData, + recipe.ProductionTime, + SkillTypes.CRAFTING, + this.databaseServer.getTables().globals.config.SkillsSettings.Crafting.CraftTimeReductionPerLevel, + ); const modifiedScavCaseTime = this.getScavCaseTime(pmcData, adjustedCraftTime); @@ -772,7 +770,7 @@ export class HideoutController return output; } - const recipe = hideoutDb.production.find((r) => r._id === request.recipeId); + const recipe = hideoutDb.production.find(r => r._id === request.recipeId); if (recipe) { this.handleRecipe(sessionID, recipe, pmcData, request, output); @@ -780,7 +778,7 @@ export class HideoutController return output; } - const scavCase = hideoutDb.scavcase.find((r) => r._id === request.recipeId); + const scavCase = hideoutDb.scavcase.find(r => r._id === request.recipeId); if (scavCase) { this.handleScavCase(sessionID, pmcData, request, output); @@ -938,7 +936,7 @@ export class HideoutController } // Check if the recipe is the same as the last one - get bonus when crafting same thing multiple times - const area = pmcData.Hideout.Areas.find((area) => area.type === recipe.areaType); + const area = pmcData.Hideout.Areas.find(area => area.type === recipe.areaType); if (area && request.recipeId !== area.lastRecipe) { // 1 point per craft upon the end of production for alternating between 2 different crafting recipes in the same module @@ -948,7 +946,7 @@ export class HideoutController // Update variable with time spent crafting item(s) // 1 point per 8 hours of crafting hoursCrafting += recipe.productionTime; - if ((hoursCrafting / this.hideoutConfig.hoursForSkillCrafting) >= 1) + if (hoursCrafting / this.hideoutConfig.hoursForSkillCrafting >= 1) { // Spent enough time crafting to get a bonus xp multipler const multiplierCrafting = Math.floor(hoursCrafting / this.hideoutConfig.hoursForSkillCrafting); @@ -1016,7 +1014,7 @@ export class HideoutController { this.profileHelper.addSkillPointsToPlayer(pmcData, SkillTypes.CRAFTING, craftingExpAmount); - const intellectAmountToGive = 0.5 * (Math.round(craftingExpAmount / 15)); + const intellectAmountToGive = 0.5 * Math.round(craftingExpAmount / 15); if (intellectAmountToGive > 0) { this.profileHelper.addSkillPointsToPlayer(pmcData, SkillTypes.INTELLECT, intellectAmountToGive); @@ -1189,14 +1187,14 @@ export class HideoutController public recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): void { // Check if counter exists, add placeholder if it doesnt - if (!pmcData.Stats.Eft.OverallCounters.Items.find((x) => x.Key.includes("ShootingRangePoints"))) + if (!pmcData.Stats.Eft.OverallCounters.Items.find(x => x.Key.includes("ShootingRangePoints"))) { pmcData.Stats.Eft.OverallCounters.Items.push({ Key: ["ShootingRangePoints"], Value: 0 }); } // Find counter by key and update value - const shootingRangeHighScore = pmcData.Stats.Eft.OverallCounters.Items.find((x) => - x.Key.includes("ShootingRangePoints") + const shootingRangeHighScore = pmcData.Stats.Eft.OverallCounters.Items.find(x => + x.Key.includes("ShootingRangePoints"), ); shootingRangeHighScore.Value = request.points; } @@ -1218,7 +1216,7 @@ export class HideoutController // Create mapping of required item with corrisponding item from player inventory const items = request.items.map((reqItem) => { - const item = pmcData.Inventory.items.find((invItem) => invItem._id === reqItem.id); + const item = pmcData.Inventory.items.find(invItem => invItem._id === reqItem.id); return { inventoryItem: item, requestedItem: reqItem }; }); @@ -1248,14 +1246,14 @@ export class HideoutController } } - const profileHideoutArea = pmcData.Hideout.Areas.find((x) => x.type === request.areaType); + const profileHideoutArea = pmcData.Hideout.Areas.find(x => x.type === request.areaType); if (!profileHideoutArea) { this.logger.error(this.localisationService.getText("hideout-unable_to_find_area", request.areaType)); return this.httpResponse.appendErrorToOutput(output); } - const hideoutDbData = this.databaseServer.getTables().hideout.areas.find((x) => x.type === request.areaType); + const hideoutDbData = this.databaseServer.getTables().hideout.areas.find(x => x.type === request.areaType); if (!hideoutDbData) { this.logger.error( diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index ba2d94ad..7a8d9713 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; @@ -204,8 +203,8 @@ export class InraidController if (locationName === "lighthouse" && postRaidRequest.profile.Info.Side.toLowerCase() === "usec") { // Decrement counter if it exists, don't go below 0 - const remainingCounter = serverPmcProfile?.Stats.Eft.OverallCounters.Items.find((x) => - x.Key.includes("UsecRaidRemainKills") + const remainingCounter = serverPmcProfile?.Stats.Eft.OverallCounters.Items.find(x => + x.Key.includes("UsecRaidRemainKills"), ); if (remainingCounter?.Value > 0) { @@ -229,9 +228,9 @@ export class InraidController // Not dead // Check for cultist amulets in special slot (only slot it can fit) - const amuletOnPlayer = serverPmcProfile.Inventory.items.filter((item) => - item.slotId?.startsWith("SpecialSlot") - ).find((item) => item._tpl === "64d0b40fbe2eed70e254e2d4"); + const amuletOnPlayer = serverPmcProfile.Inventory.items.filter(item => + item.slotId?.startsWith("SpecialSlot"), + ).find(item => item._tpl === "64d0b40fbe2eed70e254e2d4"); if (amuletOnPlayer) { // No charges left, delete it @@ -250,8 +249,8 @@ export class InraidController } } - const victims = postRaidRequest.profile.Stats.Eft.Victims.filter((x) => - ["sptbear", "sptusec"].includes(x.Role.toLowerCase()) + const victims = postRaidRequest.profile.Stats.Eft.Victims.filter(x => + ["sptbear", "sptusec"].includes(x.Role.toLowerCase()), ); if (victims?.length > 0) { @@ -283,9 +282,13 @@ export class InraidController // Find and remove the completed condition from profile if player died, otherwise quest is stuck in limbo // and quest items cannot be picked up again const allQuests = this.questHelper.getQuestsFromDb(); - const activeQuestIdsInProfile = pmcData.Quests.filter((profileQuest) => - ![QuestStatus.AvailableForStart, QuestStatus.Success, QuestStatus.Expired].includes(profileQuest.status) - ).map((x) => x.qid); + const activeQuestIdsInProfile = pmcData.Quests.filter( + profileQuest => ![ + QuestStatus.AvailableForStart, + QuestStatus.Success, + QuestStatus.Expired, + ].includes(profileQuest.status), + ).map(x => x.qid); for (const questItem of postRaidSaveRequest.profile.Stats.Eft.CarriedQuestItems) { // Get quest/find condition for carried quest item @@ -399,7 +402,7 @@ export class InraidController */ protected mergePmcAndScavEncyclopedias(primary: IPmcData, secondary: IPmcData): void { - function extend(target: { [key: string]: boolean; }, source: Record) + function extend(target: { [key: string]: boolean }, source: Record) { for (const key in source) { @@ -469,7 +472,7 @@ export class InraidController for (const quest of scavProfile.Quests) { - const pmcQuest = pmcProfile.Quests.find((x) => x.qid === quest.qid); + const pmcQuest = pmcProfile.Quests.find(x => x.qid === quest.qid); if (!pmcQuest) { this.logger.warning(`No PMC quest found for ID: ${quest.qid}`); @@ -504,7 +507,7 @@ export class InraidController for (const scavCounter of Object.values(scavProfile.TaskConditionCounters)) { // If this is an achievement that isn't for the scav, don't process it - const achievement = achievements.find((achievement) => achievement.id === scavCounter.sourceId); + const achievement = achievements.find(achievement => achievement.id === scavCounter.sourceId); if (achievement && achievement.side !== "Savage") { continue; @@ -541,7 +544,7 @@ export class InraidController */ protected isPlayerDead(statusOnExit: PlayerRaidEndState): boolean { - return (statusOnExit !== PlayerRaidEndState.SURVIVED && statusOnExit !== PlayerRaidEndState.RUNNER); + return statusOnExit !== PlayerRaidEndState.SURVIVED && statusOnExit !== PlayerRaidEndState.RUNNER; } /** @@ -686,8 +689,8 @@ export class InraidController // Remove any items that were returned by the item delivery, but also insured, from the player's insurance list // This is to stop items being duplicated by being returned from both the item delivery, and insurance - const deliveredItemIds = items.map((x) => x._id); - pmcData.InsuredItems = pmcData.InsuredItems.filter((x) => !deliveredItemIds.includes(x.itemId)); + const deliveredItemIds = items.map(x => x._id); + pmcData.InsuredItems = pmcData.InsuredItems.filter(x => !deliveredItemIds.includes(x.itemId)); // Send the items to the player this.mailSendService.sendLocalisedNpcMessageToPlayer( diff --git a/project/src/controllers/InsuranceController.ts b/project/src/controllers/InsuranceController.ts index 572deacf..7c2ebd50 100644 --- a/project/src/controllers/InsuranceController.ts +++ b/project/src/controllers/InsuranceController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; @@ -113,7 +112,7 @@ export class InsuranceController this.logger.debug(`Found ${profileInsuranceDetails.length} insurance packages in profile ${sessionID}`); } - return profileInsuranceDetails.filter((insured) => insuranceTime >= insured.scheduledTime); + return profileInsuranceDetails.filter(insured => insuranceTime >= insured.scheduledTime); } /** @@ -161,7 +160,7 @@ export class InsuranceController */ protected countAllInsuranceItems(insurance: Insurance[]): number { - return this.mathUtil.arraySum(insurance.map((ins) => ins.items.length)); + return this.mathUtil.arraySum(insurance.map(ins => ins.items.length)); } /** @@ -174,11 +173,11 @@ export class InsuranceController protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void { const profile = this.saveServer.getProfile(sessionID); - profile.insurance = profile.insurance.filter((insurance) => + profile.insurance = profile.insurance.filter(insurance => insurance.traderId !== insPackage.traderId || insurance.systemData.date !== insPackage.systemData.date || insurance.systemData.time !== insPackage.systemData.time - || insurance.systemData.location !== insPackage.systemData.location + || insurance.systemData.location !== insPackage.systemData.location, ); this.logger.debug(`Removed processed insurance package. Remaining packages: ${profile.insurance.length}`); @@ -201,8 +200,8 @@ export class InsuranceController let parentAttachmentsMap = this.populateParentAttachmentsMap(rootItemParentID, insured, itemsMap); // Check to see if any regular items are present. - const hasRegularItems = Array.from(itemsMap.values()).some((item) => - !this.itemHelper.isAttachmentAttached(item) + const hasRegularItems = Array.from(itemsMap.values()).some(item => + !this.itemHelper.isAttachmentAttached(item), ); // Process all items that are not attached, attachments; those are handled separately, by value. @@ -250,7 +249,7 @@ export class InsuranceController for (const insuredItem of insured.items) { // Use the parent ID from the item to get the parent item. - const parentItem = insured.items.find((item) => item._id === insuredItem.parentId); + const parentItem = insured.items.find(item => item._id === insuredItem.parentId); // The parent (not the hideout) could not be found. Skip and warn. if (!parentItem && insuredItem.parentId !== rootItemParentID) @@ -490,7 +489,7 @@ export class InsuranceController { this.logger.debug( `Attachment ${index} Id: ${attachmentId} Tpl: ${ - attachments.find((x) => x._id === attachmentId)?._tpl + attachments.find(x => x._id === attachmentId)?._tpl } - Price: ${attachmentPrices[attachmentId]}`, ); index++; @@ -557,7 +556,7 @@ export class InsuranceController */ protected removeItemsFromInsurance(insured: Insurance, toDelete: Set): void { - insured.items = insured.items.filter((item) => !toDelete.has(item._id)); + insured.items = insured.items.filter(item => !toDelete.has(item._id)); } /** @@ -746,6 +745,6 @@ export class InsuranceController // Represents an insurance item that has had it's common locale-name and value added to it. interface EnrichedItem extends Item { - name: string; - dynamicPrice: number; + name: string + dynamicPrice: number } diff --git a/project/src/controllers/InventoryController.ts b/project/src/controllers/InventoryController.ts index ca29ae69..0c2f7f57 100644 --- a/project/src/controllers/InventoryController.ts +++ b/project/src/controllers/InventoryController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LootGenerator } from "@spt-aki/generators/LootGenerator"; import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; @@ -107,7 +106,7 @@ export class InventoryController } // Check for item in inventory before allowing internal transfer - const originalItemLocation = ownerInventoryItems.from.find((item) => item._id === moveRequest.item); + const originalItemLocation = ownerInventoryItems.from.find(item => item._id === moveRequest.item); if (!originalItemLocation) { // Internal item move but item never existed, possible dupe glitch @@ -169,7 +168,7 @@ export class InventoryController return; } - const profileToRemoveItemFrom = (!request.fromOwner || request.fromOwner.id === pmcData._id) + const profileToRemoveItemFrom = !request.fromOwner || request.fromOwner.id === pmcData._id ? pmcData : this.profileHelper.getFullProfile(sessionID).characters.scav; @@ -198,12 +197,12 @@ export class InventoryController // Handle cartridge edge-case if (!request.container.location && request.container.container === "cartridges") { - const matchingItems = inventoryItems.to.filter((x) => x.parentId === request.container.id); + const matchingItems = inventoryItems.to.filter(x => x.parentId === request.container.id); request.container.location = matchingItems.length; // Wrong location for first cartridge } // The item being merged has three possible sources: pmc, scav or mail, getOwnerInventoryItems() handles getting correct one - const itemToSplit = inventoryItems.from.find((x) => x._id === request.splitItem); + const itemToSplit = inventoryItems.from.find(x => x._id === request.splitItem); if (!itemToSplit) { const errorMessage = `Unable to split stack as source item: ${request.splitItem} cannot be found`; @@ -259,7 +258,7 @@ export class InventoryController const inventoryItems = this.inventoryHelper.getOwnerInventoryItems(body, sessionID); // Get source item (can be from player or trader or mail) - const sourceItem = inventoryItems.from.find((x) => x._id === body.item); + const sourceItem = inventoryItems.from.find(x => x._id === body.item); if (!sourceItem) { const errorMessage = `Unable to merge stacks as source item: ${body.with} cannot be found`; @@ -271,7 +270,7 @@ export class InventoryController } // Get item being merged into - const destinationItem = inventoryItems.to.find((x) => x._id === body.with); + const destinationItem = inventoryItems.to.find(x => x._id === body.with); if (!destinationItem) { const errorMessage = `Unable to merge stacks as destination item: ${body.with} cannot be found`; @@ -282,7 +281,7 @@ export class InventoryController return output; } - if (!(destinationItem.upd?.StackObjectsCount)) + if (!destinationItem.upd?.StackObjectsCount) { // No stackcount on destination, add one destinationItem.upd = { StackObjectsCount: 1 }; @@ -307,7 +306,7 @@ export class InventoryController destinationItem.upd.StackObjectsCount += sourceItem.upd.StackObjectsCount; // Add source stackcount to destination output.profileChanges[sessionID].items.del.push({ _id: sourceItem._id }); // Inform client source item being deleted - const indexOfItemToRemove = inventoryItems.from.findIndex((x) => x._id === sourceItem._id); + const indexOfItemToRemove = inventoryItems.from.findIndex(x => x._id === sourceItem._id); if (indexOfItemToRemove === -1) { const errorMessage = `Unable to find item: ${sourceItem._id} to remove from sender inventory`; @@ -340,8 +339,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) { @@ -397,13 +396,13 @@ export class InventoryController */ public swapItem(pmcData: IPmcData, request: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse { - const itemOne = pmcData.Inventory.items.find((x) => x._id === request.item); + const itemOne = pmcData.Inventory.items.find(x => x._id === request.item); if (!itemOne) { this.logger.error(`Unable to find item: ${request.item} to swap positions with: ${request.item2}`); } - const itemTwo = pmcData.Inventory.items.find((x) => x._id === request.item2); + const itemTwo = pmcData.Inventory.items.find(x => x._id === request.item2); if (!itemTwo) { this.logger.error(`Unable to find item: ${request.item2} to swap positions with: ${request.item}`); @@ -454,7 +453,7 @@ export class InventoryController playerData = this.profileHelper.getScavProfile(sessionID); } - const itemToFold = playerData.Inventory.items.find((item) => item?._id === request.item); + const itemToFold = playerData.Inventory.items.find(item => item?._id === request.item); if (!itemToFold) { // Item not found @@ -488,7 +487,7 @@ export class InventoryController playerData = this.profileHelper.getScavProfile(sessionID); } - const itemToToggle = playerData.Inventory.items.find((x) => x._id === body.item); + const itemToToggle = playerData.Inventory.items.find(x => x._id === body.item); if (itemToToggle) { this.itemHelper.addUpdObjectToItem( @@ -689,15 +688,15 @@ export class InventoryController if (request.fromOwner.id === Traders.FENCE) { // Get tpl from fence assorts - return this.fenceService.getRawFenceAssorts().items.find((x) => x._id === request.item)._tpl; + return this.fenceService.getRawFenceAssorts().items.find(x => x._id === request.item)._tpl; } if (request.fromOwner.type === "Trader") { // Not fence // get tpl from trader assort - return this.databaseServer.getTables().traders[request.fromOwner.id].assort.items.find((item) => - item._id === request.item + return this.databaseServer.getTables().traders[request.fromOwner.id].assort.items.find(item => + item._id === request.item, )._tpl; } @@ -718,7 +717,7 @@ export class InventoryController } // Try find examine item inside offer items array - const matchingItem = offer.items.find((offerItem) => offerItem._id === request.item); + const matchingItem = offer.items.find(offerItem => offerItem._id === request.item); if (matchingItem) { return matchingItem._tpl; @@ -754,7 +753,7 @@ export class InventoryController { for (const change of request.changedItems) { - const inventoryItem = pmcData.Inventory.items.find((x) => x._id === change._id); + const inventoryItem = pmcData.Inventory.items.find(x => x._id === change._id); if (!inventoryItem) { this.logger.error( @@ -793,7 +792,7 @@ export class InventoryController ): void { // Get map from inventory - const mapItem = pmcData.Inventory.items.find((i) => i._id === request.item); + const mapItem = pmcData.Inventory.items.find(i => i._id === request.item); // add marker mapItem.upd.Map = mapItem.upd.Map || { Markers: [] }; @@ -819,7 +818,7 @@ export class InventoryController ): void { // Get map from inventory - const mapItem = pmcData.Inventory.items.find((i) => i._id === request.item); + const mapItem = pmcData.Inventory.items.find(i => i._id === request.item); // remove marker const markers = mapItem.upd.Map.Markers.filter((marker) => @@ -847,10 +846,10 @@ export class InventoryController ): void { // Get map from inventory - const mapItem = pmcData.Inventory.items.find((i) => i._id === request.item); + const mapItem = pmcData.Inventory.items.find(i => i._id === request.item); // edit marker - const indexOfExistingNote = mapItem.upd.Map.Markers.findIndex((m) => m.X === request.X && m.Y === request.Y); + const indexOfExistingNote = mapItem.upd.Map.Markers.findIndex(m => m.X === request.X && m.Y === request.Y); request.mapMarker.Note = this.sanitiseMapMarkerText(request.mapMarker.Note); mapItem.upd.Map.Markers[indexOfExistingNote] = request.mapMarker; @@ -884,7 +883,7 @@ export class InventoryController ): void { /** Container player opened in their inventory */ - const openedItem = pmcData.Inventory.items.find((item) => item._id === body.item); + const openedItem = pmcData.Inventory.items.find(item => item._id === body.item); const containerDetailsDb = this.itemHelper.getItem(openedItem._tpl); const isSealedWeaponBox = containerDetailsDb[1]._name.includes("event_container_airdrop"); @@ -935,8 +934,8 @@ export class InventoryController // Hard coded to `SYSTEM` for now // TODO: make this dynamic const dialog = fullProfile.dialogues["59e7125688a45068a6249071"]; - const mail = dialog.messages.find((x) => x._id === event.MessageId); - const mailEvent = mail.profileChangeEvents.find((x) => x._id === event.EventId); + const mail = dialog.messages.find(x => x._id === event.MessageId); + const mailEvent = mail.profileChangeEvents.find(x => x._id === event.EventId); switch (mailEvent.Type) { @@ -955,15 +954,15 @@ export class InventoryController break; case "SkillPoints": { - const profileSkill = pmcData.Skills.Common.find((x) => x.Id === mailEvent.entity); + const profileSkill = pmcData.Skills.Common.find(x => x.Id === mailEvent.entity); profileSkill.Progress = mailEvent.value; this.logger.success(`Set profile skill: ${mailEvent.entity} to: ${mailEvent.value}`); break; } case "ExamineAllItems": { - const itemsToInspect = this.itemHelper.getItems().filter((x) => x._type !== "Node"); - this.flagItemsAsInspectedAndRewardXp(itemsToInspect.map((x) => x._id), fullProfile); + const itemsToInspect = this.itemHelper.getItems().filter(x => x._type !== "Node"); + this.flagItemsAsInspectedAndRewardXp(itemsToInspect.map(x => x._id), fullProfile); this.logger.success(`Flagged ${itemsToInspect.length} items as examined`); break; } @@ -988,7 +987,7 @@ export class InventoryController for (const itemId of request.items) { // If id already exists in array, we're removing it - const indexOfItemAlreadyFavorited = pmcData.Inventory.favoriteItems.findIndex((x) => x === itemId); + const indexOfItemAlreadyFavorited = pmcData.Inventory.favoriteItems.findIndex(x => x === itemId); if (indexOfItemAlreadyFavorited > -1) { pmcData.Inventory.favoriteItems.splice(indexOfItemAlreadyFavorited, 1); diff --git a/project/src/controllers/LauncherController.ts b/project/src/controllers/LauncherController.ts index 0e280622..5bd42e25 100644 --- a/project/src/controllers/LauncherController.ts +++ b/project/src/controllers/LauncherController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; diff --git a/project/src/controllers/LocationController.ts b/project/src/controllers/LocationController.ts index af4e144d..b1c1f436 100644 --- a/project/src/controllers/LocationController.ts +++ b/project/src/controllers/LocationController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { LocationGenerator } from "@spt-aki/generators/LocationGenerator"; diff --git a/project/src/controllers/MatchController.ts b/project/src/controllers/MatchController.ts index 60b69751..619ed620 100644 --- a/project/src/controllers/MatchController.ts +++ b/project/src/controllers/MatchController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { LootGenerator } from "@spt-aki/generators/LootGenerator"; @@ -191,7 +190,7 @@ export class MatchController return false; } - return (this.inRaidConfig.coopExtracts.includes(extractName.trim())); + return this.inRaidConfig.coopExtracts.includes(extractName.trim()); } protected sendCoopTakenFenceMessage(sessionId: string): void diff --git a/project/src/controllers/NoteController.ts b/project/src/controllers/NoteController.ts index d6689621..d1414eee 100644 --- a/project/src/controllers/NoteController.ts +++ b/project/src/controllers/NoteController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { Note } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; diff --git a/project/src/controllers/NotifierController.ts b/project/src/controllers/NotifierController.ts index 60ad5e83..9c61bc66 100644 --- a/project/src/controllers/NotifierController.ts +++ b/project/src/controllers/NotifierController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; diff --git a/project/src/controllers/PresetController.ts b/project/src/controllers/PresetController.ts index 2989249c..efe86cd4 100644 --- a/project/src/controllers/PresetController.ts +++ b/project/src/controllers/PresetController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; diff --git a/project/src/controllers/ProfileController.ts b/project/src/controllers/ProfileController.ts index 4d225831..ba0cc4dc 100644 --- a/project/src/controllers/ProfileController.ts +++ b/project/src/controllers/ProfileController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -81,7 +80,7 @@ export class ProfileController const pmc = profile.characters.pmc; // make sure character completed creation - if (!(pmc?.Info?.Level)) + if (!pmc?.Info?.Level) { return { username: profile.info.username, @@ -104,7 +103,7 @@ export class ProfileController side: pmc.Info.Side, currlvl: pmc.Info.Level, currexp: pmc.Info.Experience ?? 0, - prevexp: (currlvl === 0) ? 0 : this.profileHelper.getExperience(currlvl), + prevexp: currlvl === 0 ? 0 : this.profileHelper.getExperience(currlvl), nextlvl: nextlvl, maxlvl: maxlvl, akiData: profile.aki, @@ -130,8 +129,10 @@ export class ProfileController public createProfile(info: IProfileCreateRequestData, sessionID: string): string { const account = this.saveServer.getProfile(sessionID).info; - const profile: ITemplateSide = - this.databaseServer.getTables().templates.profiles[account.edition][info.side.toLowerCase()]; + const profile: ITemplateSide = this.databaseServer + .getTables() + .templates + .profiles[account.edition][info.side.toLowerCase()]; const pmcData = profile.character; // Delete existing profile @@ -151,7 +152,7 @@ export class ProfileController pmcData.Customization.Head = info.headId; pmcData.Health.UpdateTime = this.timeUtil.getTimestamp(); pmcData.Quests = []; - pmcData.Hideout.Seed = this.timeUtil.getTimestamp() + (8 * 60 * 60 * 24 * 365); // 8 years in future why? who knows, we saw it in live + pmcData.Hideout.Seed = this.timeUtil.getTimestamp() + 8 * 60 * 60 * 24 * 365; // 8 years in future why? who knows, we saw it in live pmcData.RepeatableQuests = []; pmcData.CarExtractCounts = {}; pmcData.CoopExtractCounts = {}; @@ -458,7 +459,7 @@ export class ProfileController skills: playerPmc.Skills, equipment: { // Default inventory tpl - Id: playerPmc.Inventory.items.find((x) => x._tpl === "55d7217a4bdc2d86028b456d")._id, + Id: playerPmc.Inventory.items.find(x => x._tpl === "55d7217a4bdc2d86028b456d")._id, Items: playerPmc.Inventory.items, }, achievements: playerPmc.Achievements, diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index 934bf19c..766c246c 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; @@ -79,7 +78,7 @@ export class QuestController for (const quest of allQuests) { // Player already accepted the quest, show it regardless of status - const questInProfile = profile.Quests.find((x) => x.qid === quest._id); + const questInProfile = profile.Quests.find(x => x.qid === quest._id); if (questInProfile) { quest.sptStatus = questInProfile.status; @@ -137,8 +136,8 @@ export class QuestController for (const conditionToFulfil of questRequirements) { // If the previous quest isn't in the user profile, it hasn't been completed or started - const prerequisiteQuest = profile.Quests.find((profileQuest) => - conditionToFulfil.target.includes(profileQuest.qid) + const prerequisiteQuest = profile.Quests.find(profileQuest => + conditionToFulfil.target.includes(profileQuest.qid), ); if (!prerequisiteQuest) { @@ -148,7 +147,7 @@ export class QuestController // Prereq does not have its status requirement fulfilled // Some bsg status ids are strings, MUST convert to number before doing includes check - if (!conditionToFulfil.status.map((status) => Number(status)).includes(prerequisiteQuest.status)) + if (!conditionToFulfil.status.map(status => Number(status)).includes(prerequisiteQuest.status)) { haveCompletedPreviousQuest = false; break; @@ -292,7 +291,7 @@ export class QuestController // Does quest exist in profile // Restarting a failed quest can mean quest exists in profile - const existingQuestStatus = pmcData.Quests.find((x) => x.qid === acceptedQuest.qid); + const existingQuestStatus = pmcData.Quests.find(x => x.qid === acceptedQuest.qid); if (existingQuestStatus) { // Update existing @@ -399,15 +398,15 @@ export class QuestController fullProfile.characters.scav.Quests.push(newRepeatableQuest); } - const repeatableSettings = pmcData.RepeatableQuests.find((x) => - x.name === repeatableQuestProfile.sptRepatableGroupName + const repeatableSettings = pmcData.RepeatableQuests.find(x => + x.name === repeatableQuestProfile.sptRepatableGroupName, ); const change = {}; change[repeatableQuestProfile._id] = repeatableSettings.changeRequirement[repeatableQuestProfile._id]; const responseData: IPmcDataRepeatableQuest = { - id: repeatableSettings.id ?? this.questConfig.repeatableQuests.find((x) => - x.name === repeatableQuestProfile.sptRepatableGroupName + id: repeatableSettings.id ?? this.questConfig.repeatableQuests.find(x => + x.name === repeatableQuestProfile.sptRepatableGroupName, ).id, name: repeatableSettings.name, endTime: repeatableSettings.endTime, @@ -435,7 +434,7 @@ export class QuestController { for (const repeatableQuest of pmcData.RepeatableQuests) { - const matchingQuest = repeatableQuest.activeQuests.find((x) => x._id === acceptedQuest.qid); + const matchingQuest = repeatableQuest.activeQuests.find(x => x._id === acceptedQuest.qid); if (matchingQuest) { this.logger.debug(`Accepted repeatable quest ${acceptedQuest.qid} from ${repeatableQuest.name}`); @@ -504,8 +503,8 @@ export class QuestController // Check if it's a repeatable quest. If so, remove from Quests for (const currentRepeatable of pmcData.RepeatableQuests) { - const repeatableQuest = currentRepeatable.activeQuests.find((activeRepeatable) => - activeRepeatable._id === completedQuestId + const repeatableQuest = currentRepeatable.activeQuests.find(activeRepeatable => + activeRepeatable._id === completedQuestId, ); if (repeatableQuest) { @@ -548,15 +547,15 @@ export class QuestController // Quest already failed in profile, skip if ( - pmcProfile.Quests.some((profileQuest) => - profileQuest.qid === quest._id && profileQuest.status === QuestStatus.Fail + pmcProfile.Quests.some(profileQuest => + profileQuest.qid === quest._id && profileQuest.status === QuestStatus.Fail, ) ) { return false; } - return quest.conditions.Fail.some((condition) => condition.target?.includes(completedQuestId)); + return quest.conditions.Fail.some(condition => condition.target?.includes(completedQuestId)); }); } @@ -568,7 +567,7 @@ export class QuestController protected removeQuestFromScavProfile(sessionId: string, questIdToRemove: string): void { const fullProfile = this.profileHelper.getFullProfile(sessionId); - const repeatableInScavProfile = fullProfile.characters.scav.Quests?.find((x) => x.qid === questIdToRemove); + const repeatableInScavProfile = fullProfile.characters.scav.Quests?.find(x => x.qid === questIdToRemove); if (!repeatableInScavProfile) { this.logger.warning( @@ -600,7 +599,7 @@ export class QuestController for (const quest of postQuestStatuses) { // Add quest if status differs or quest not found - const preQuest = preQuestStatusus.find((x) => x.qid === quest.qid); + const preQuest = preQuestStatusus.find(x => x.qid === quest.qid); if (!preQuest || preQuest.status !== quest.status) { result.push(quest); @@ -653,8 +652,8 @@ export class QuestController for (const quest of quests) { // If quest has prereq of completed quest + availableAfter value > 0 (quest has wait time) - const nextQuestWaitCondition = quest.conditions.AvailableForStart.find((x) => - x.target?.includes(completedQuestId) && x.availableAfter > 0 + const nextQuestWaitCondition = quest.conditions.AvailableForStart.find(x => + x.target?.includes(completedQuestId) && x.availableAfter > 0, ); if (nextQuestWaitCondition) { @@ -662,7 +661,7 @@ export class QuestController const availableAfterTimestamp = this.timeUtil.getTimestamp() + nextQuestWaitCondition.availableAfter; // Update quest in profile with status of AvailableAfter - const existingQuestInProfile = pmcData.Quests.find((x) => x.qid === quest._id); + const existingQuestInProfile = pmcData.Quests.find(x => x.qid === quest._id); if (existingQuestInProfile) { existingQuestInProfile.availableAfter = availableAfterTimestamp; @@ -679,7 +678,7 @@ export class QuestController status: QuestStatus.AvailableAfter, statusTimers: { // eslint-disable-next-line @typescript-eslint/naming-convention - "9": this.timeUtil.getTimestamp(), + 9: this.timeUtil.getTimestamp(), }, availableAfter: availableAfterTimestamp, }); @@ -705,12 +704,12 @@ export class QuestController for (const questToFail of questsToFail) { // Skip failing a quest that has a fail status of something other than success - if (questToFail.conditions.Fail?.some((x) => x.status?.some((status) => status !== QuestStatus.Success))) + if (questToFail.conditions.Fail?.some(x => x.status?.some(status => status !== QuestStatus.Success))) { continue; } - const isActiveQuestInPlayerProfile = pmcData.Quests.find((quest) => quest.qid === questToFail._id); + const isActiveQuestInPlayerProfile = pmcData.Quests.find(quest => quest.qid === questToFail._id); if (isActiveQuestInPlayerProfile) { if (isActiveQuestInPlayerProfile.status !== QuestStatus.Fail) @@ -772,7 +771,7 @@ export class QuestController isItemHandoverQuest = condition.conditionType === handoverQuestTypes[0]; handoverRequirements = condition; - const profileCounter = (handoverQuestRequest.conditionId in pmcData.TaskConditionCounters) + const profileCounter = handoverQuestRequest.conditionId in pmcData.TaskConditionCounters ? pmcData.TaskConditionCounters[handoverQuestRequest.conditionId].value : 0; handedInCount -= profileCounter; @@ -806,7 +805,7 @@ export class QuestController let totalItemCountToRemove = 0; for (const itemHandover of handoverQuestRequest.items) { - const matchingItemInProfile = pmcData.Inventory.items.find((item) => item._id === itemHandover.id); + const matchingItemInProfile = pmcData.Inventory.items.find(item => item._id === itemHandover.id); if (!(matchingItemInProfile && handoverRequirements.target.includes(matchingItemInProfile._tpl))) { // Item handed in by player doesnt match what was requested diff --git a/project/src/controllers/RagfairController.ts b/project/src/controllers/RagfairController.ts index a0ffe20f..dbf37b02 100644 --- a/project/src/controllers/RagfairController.ts +++ b/project/src/controllers/RagfairController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; @@ -160,7 +159,7 @@ export class RagfairController public getOfferById(sessionId: string, request: IGetRagfairOfferByIdRequest): IRagfairOffer { const offers = this.ragfairOfferService.getOffers(); - const offerToReturn = offers.find((x) => x.intId === request.id); + const offerToReturn = offers.find(x => x.intId === request.id); return offerToReturn; } @@ -208,14 +207,18 @@ export class RagfairController ): Record { // Linked/required search categories - const playerHasFleaUnlocked = - pmcProfile.Info.Level >= this.databaseServer.getTables().globals.config.RagFair.minUserLevel; + const playerHasFleaUnlocked = pmcProfile.Info.Level >= this.databaseServer + .getTables() + .globals + .config + .RagFair + .minUserLevel; let offerPool = []; if (this.isLinkedSearch(searchRequest) || this.isRequiredSearch(searchRequest)) { offerPool = offers; } - else if ((!(this.isLinkedSearch(searchRequest) || this.isRequiredSearch(searchRequest)))) + else if (!(this.isLinkedSearch(searchRequest) || this.isRequiredSearch(searchRequest))) { // Get all categories offerPool = this.ragfairOfferService.getOffers(); @@ -260,7 +263,7 @@ export class RagfairController const traderAssorts = this.traderHelper.getTraderAssortsByTraderId(offer.user.id).items; const assortId = offer.items[0]._id; - const assortData = traderAssorts.find((x) => x._id === assortId); + const assortData = traderAssorts.find(x => x._id === assortId); // Use value stored in profile, otherwise use value directly from in-memory trader assort data offer.buyRestrictionCurrent = fullProfile.traderPurchases[offer.user.id][assortId] @@ -279,7 +282,7 @@ export class RagfairController const firstItem = offer.items[0]; const traderAssorts = this.traderHelper.getTraderAssortsByTraderId(offer.user.id).items; - const assortPurchased = traderAssorts.find((x) => x._id === offer.items[0]._id); + const assortPurchased = traderAssorts.find(x => x._id === offer.items[0]._id); if (!assortPurchased) { this.logger.warning( @@ -357,7 +360,7 @@ export class RagfairController const avg = offers.reduce((sum, offer) => { // Exclude barter items, they tend to have outrageous equivalent prices - if (offer.requirements.some((req) => !this.paymentHelper.isMoneyTpl(req._tpl))) + if (offer.requirements.some(req => !this.paymentHelper.isMoneyTpl(req._tpl))) { return sum; } @@ -456,15 +459,15 @@ export class RagfairController // Multiply single item price by stack count and quality averageOfferPrice *= rootItem.upd.StackObjectsCount * qualityMultiplier; - const itemStackCount = (offerRequest.sellInOnePiece) ? 1 : rootItem.upd.StackObjectsCount; + const itemStackCount = offerRequest.sellInOnePiece ? 1 : rootItem.upd.StackObjectsCount; // Get averaged price of a single item being listed - const averageSingleItemPrice = (offerRequest.sellInOnePiece) + const averageSingleItemPrice = offerRequest.sellInOnePiece ? averageOfferPrice / rootItem.upd.StackObjectsCount // Packs are a single offer made of many items : averageOfferPrice / itemStackCount; // Get averaged price of listing - const averagePlayerListedPriceInRub = (offerRequest.sellInOnePiece) + const averagePlayerListedPriceInRub = offerRequest.sellInOnePiece ? playerListedPriceInRub / rootItem.upd.StackObjectsCount : playerListedPriceInRub; @@ -540,7 +543,7 @@ export class RagfairController offerRequest.sellInOnePiece, ); - this.logger.debug(`Offer tax to charge: ${tax}, pulled from client: ${(!!storedClientTaxValue)}`); + this.logger.debug(`Offer tax to charge: ${tax}, pulled from client: ${!!storedClientTaxValue}`); // cleanup of cache now we've used the tax value from it this.ragfairTaxService.clearStoredOfferTaxById(offerRequest.items[0]); @@ -602,8 +605,8 @@ export class RagfairController } else { - requirementsPriceInRub += this.ragfairPriceService.getDynamicPriceForItem(requestedItemTpl) - * item.count; + requirementsPriceInRub += this.ragfairPriceService + .getDynamicPriceForItem(requestedItemTpl) * item.count; } } @@ -619,7 +622,7 @@ export class RagfairController protected getItemsToListOnFleaFromInventory( pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], - ): { items: Item[] | null; errorMessage: string | null; } + ): { items: Item[] | null, errorMessage: string | null } { const itemsToReturn = []; let errorMessage: string | null = null; @@ -627,7 +630,7 @@ export class RagfairController // Count how many items are being sold and multiply the requested amount accordingly for (const itemId of itemIdsFromFleaOfferRequest) { - let item = pmcData.Inventory.items.find((i) => i._id === itemId); + let item = pmcData.Inventory.items.find(i => i._id === itemId); if (!item) { errorMessage = this.localisationService.getText("ragfair-unable_to_find_item_in_inventory", { @@ -663,7 +666,7 @@ export class RagfairController const loyalLevel = 1; const formattedItems: Item[] = items.map((item) => { - const isChild = items.find((it) => it._id === item.parentId); + const isChild = items.find(it => it._id === item.parentId); return { _id: item._id, @@ -724,7 +727,7 @@ export class RagfairController pmcData.RagfairInfo.offers = []; } - const playerOfferIndex = playerProfileOffers.findIndex((offer) => offer._id === removeRequest.offerId); + const playerOfferIndex = playerProfileOffers.findIndex(offer => offer._id === removeRequest.offerId); if (playerOfferIndex === -1) { this.logger.error( @@ -761,7 +764,7 @@ export class RagfairController const pmcData = this.saveServer.getProfile(sessionId).characters.pmc; const playerOffers = pmcData.RagfairInfo.offers; - const playerOfferIndex = playerOffers.findIndex((offer) => offer._id === extendRequest.offerId); + const playerOfferIndex = playerOffers.findIndex(offer => offer._id === extendRequest.offerId); const secondsToAdd = extendRequest.renewalTime * TimeUtil.ONE_HOUR_AS_SECONDS; if (playerOfferIndex === -1) diff --git a/project/src/controllers/RepairController.ts b/project/src/controllers/RepairController.ts index 2249afc7..28a2e94a 100644 --- a/project/src/controllers/RepairController.ts +++ b/project/src/controllers/RepairController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index 7a60a38f..aabacbe3 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; @@ -83,15 +82,15 @@ export class RepeatableQuestController * @param {string} _info Request from client * @param {string} sessionID Player's session id * - * @returns {array} Array of "repeatableQuestObjects" as descibed above + * @returns {array} Array of "repeatableQuestObjects" as described above */ public getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[] { const returnData: Array = []; const pmcData = this.profileHelper.getPmcProfile(sessionID); const time = this.timeUtil.getTimestamp(); - const scavQuestUnlocked = - pmcData?.Hideout?.Areas?.find((hideoutArea) => hideoutArea.type === HideoutAreas.INTEL_CENTER)?.level >= 1; + const scavQuestUnlocked + = pmcData?.Hideout?.Areas?.find(hideoutArea => hideoutArea.type === HideoutAreas.INTEL_CENTER)?.level >= 1; // Daily / weekly / Daily_Savage for (const repeatableConfig of this.questConfig.repeatableQuests) @@ -119,7 +118,7 @@ export class RepeatableQuestController for (const activeQuest of currentRepeatableQuestType.activeQuests) { // Keep finished quests in list so player can hand in - const quest = pmcData.Quests.find((quest) => quest.qid === activeQuest._id); + const quest = pmcData.Quests.find(quest => quest.qid === activeQuest._id); if (quest) { if (quest.status === QuestStatus.AvailableForFinish) @@ -135,7 +134,7 @@ export class RepeatableQuestController this.profileFixerService.removeDanglingConditionCounters(pmcData); // Remove expired quest from pmc.quest array - pmcData.Quests = pmcData.Quests.filter((quest) => quest.qid !== activeQuest._id); + pmcData.Quests = pmcData.Quests.filter(quest => quest.qid !== activeQuest._id); currentRepeatableQuestType.inactiveQuests.push(activeQuest); } currentRepeatableQuestType.activeQuests = questsToKeep; @@ -217,9 +216,14 @@ export class RepeatableQuestController ) { // Elite charisma skill gives extra daily quest(s) - return repeatableConfig.numQuests - + this.databaseServer.getTables().globals.config.SkillsSettings.Charisma.BonusSettings - .EliteBonusSettings.RepeatableQuestExtraCount; + return repeatableConfig.numQuests + this.databaseServer.getTables() + .globals + .config + .SkillsSettings + .Charisma + .BonusSettings + .EliteBonusSettings + .RepeatableQuestExtraCount; } return repeatableConfig.numQuests; @@ -237,7 +241,7 @@ export class RepeatableQuestController ): IPmcDataRepeatableQuest { // Get from profile, add if missing - let repeatableQuestDetails = pmcData.RepeatableQuests.find((x) => x.name === repeatableConfig.name); + let repeatableQuestDetails = pmcData.RepeatableQuests.find(x => x.name === repeatableConfig.name); if (!repeatableQuestDetails) { repeatableQuestDetails = { @@ -327,8 +331,8 @@ export class RepeatableQuestController const possibleLocations = Object.keys(locations); // Set possible locations for elimination task, if target is savage, exclude labs from locations - questPool.pool.Elimination.targets[probabilityObject.key] = (probabilityObject.key === "Savage") - ? { locations: possibleLocations.filter((x) => x !== "laboratory") } + questPool.pool.Elimination.targets[probabilityObject.key] = probabilityObject.key === "Savage" + ? { locations: possibleLocations.filter(x => x !== "laboratory") } : { locations: possibleLocations }; } } @@ -396,7 +400,7 @@ export class RepeatableQuestController return true; } - return (pmcLevel <= locationBase.RequiredPlayerLevelMax && pmcLevel >= locationBase.RequiredPlayerLevelMin); + return pmcLevel <= locationBase.RequiredPlayerLevelMax && pmcLevel >= locationBase.RequiredPlayerLevelMin; } public debugLogRepeatableQuestIds(pmcData: IPmcData): void @@ -439,7 +443,7 @@ export class RepeatableQuestController for (const currentRepeatablePool of pmcData.RepeatableQuests) { // Check for existing quest in (daily/weekly/scav arrays) - const questToReplace = currentRepeatablePool.activeQuests.find((x) => x._id === changeRequest.qid); + const questToReplace = currentRepeatablePool.activeQuests.find(x => x._id === changeRequest.qid); if (!questToReplace) { continue; @@ -449,8 +453,8 @@ export class RepeatableQuestController replacedQuestTraderId = questToReplace.traderId; // Update active quests to exclude the quest we're replacing - currentRepeatablePool.activeQuests = currentRepeatablePool.activeQuests.filter((x) => - x._id !== changeRequest.qid + currentRepeatablePool.activeQuests = currentRepeatablePool.activeQuests.filter(x => + x._id !== changeRequest.qid, ); // Get cost to replace existing quest @@ -458,8 +462,8 @@ export class RepeatableQuestController delete currentRepeatablePool.changeRequirement[changeRequest.qid]; // TODO: somehow we need to reduce the questPool by the currently active quests (for all repeatables) - const repeatableConfig = this.questConfig.repeatableQuests.find((x) => - x.name === currentRepeatablePool.name + const repeatableConfig = this.questConfig.repeatableQuests.find(x => + x.name === currentRepeatablePool.name, ); const questTypePool = this.generateQuestPool(repeatableConfig, pmcData.Info.Level); const newRepeatableQuest = this.attemptToGenerateRepeatableQuest(pmcData, questTypePool, repeatableConfig); diff --git a/project/src/controllers/TradeController.ts b/project/src/controllers/TradeController.ts index e924be2e..82b9e76f 100644 --- a/project/src/controllers/TradeController.ts +++ b/project/src/controllers/TradeController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TradeHelper } from "@spt-aki/helpers/TradeHelper"; @@ -294,7 +293,7 @@ export class TradeController this.traderHelper.getTraderById(trader), MessageType.MESSAGE_WITH_ITEMS, this.randomUtil.getArrayValue(this.databaseServer.getTables().traders[trader].dialogue.soldItems), - curencyReward.flatMap((x) => x), + curencyReward.flatMap(x => x), this.timeUtil.getHoursAsSeconds(72), ); } @@ -320,12 +319,12 @@ export class TradeController for (const itemToSell of itemWithChildren) { const itemDetails = this.itemHelper.getItem(itemToSell._tpl); - if ( - !(itemDetails[0] - && this.itemHelper.isOfBaseclasses(itemDetails[1]._id, traderDetails.items_buy.category)) - ) + if (!(itemDetails[0] && this.itemHelper.isOfBaseclasses( + itemDetails[1]._id, + traderDetails.items_buy.category, + ))) { - // Skip if tpl isnt item OR item doesn't fulfill match traders buy categories + // Skip if tpl isn't item OR item doesn't fulfil match traders buy categories continue; } diff --git a/project/src/controllers/TraderController.ts b/project/src/controllers/TraderController.ts index ca9cea94..5f950509 100644 --- a/project/src/controllers/TraderController.ts +++ b/project/src/controllers/TraderController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { FenceBaseAssortGenerator } from "@spt-aki/generators/FenceBaseAssortGenerator"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; @@ -30,8 +29,7 @@ export class TraderController @inject("ProfileHelper") protected profileHelper: ProfileHelper, @inject("TraderHelper") protected traderHelper: TraderHelper, @inject("TraderAssortService") protected traderAssortService: TraderAssortService, - @inject("TraderPurchasePersisterService") protected traderPurchasePersisterService: - TraderPurchasePersisterService, + @inject("TraderPurchasePersisterService") protected traderPurchasePersisterService: TraderPurchasePersisterService, @inject("FenceService") protected fenceService: FenceService, @inject("FenceBaseAssortGenerator") protected fenceBaseAssortGenerator: FenceBaseAssortGenerator, @inject("JsonUtil") protected jsonUtil: JsonUtil, diff --git a/project/src/controllers/WeatherController.ts b/project/src/controllers/WeatherController.ts index becef9f5..f807cf12 100644 --- a/project/src/controllers/WeatherController.ts +++ b/project/src/controllers/WeatherController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; import { IWeatherData } from "@spt-aki/models/eft/weather/IWeatherData"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; diff --git a/project/src/controllers/WishlistController.ts b/project/src/controllers/WishlistController.ts index eefa8c9b..c6407c6a 100644 --- a/project/src/controllers/WishlistController.ts +++ b/project/src/controllers/WishlistController.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActionData"; diff --git a/project/src/di/Container.ts b/project/src/di/Container.ts index e3235f1f..cdf23076 100644 --- a/project/src/di/Container.ts +++ b/project/src/di/Container.ts @@ -1,5 +1,4 @@ import { DependencyContainer, Lifecycle } from "tsyringe"; - import { AchievementCallbacks } from "@spt-aki/callbacks/AchievementCallbacks"; import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; import { BuildsCallbacks } from "@spt-aki/callbacks/BuildsCallbacks"; @@ -71,18 +70,18 @@ import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; import { FenceBaseAssortGenerator } from "@spt-aki/generators/FenceBaseAssortGenerator"; import { LocationGenerator } from "@spt-aki/generators/LocationGenerator"; import { LootGenerator } from "@spt-aki/generators/LootGenerator"; -import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; import { PlayerScavGenerator } from "@spt-aki/generators/PlayerScavGenerator"; +import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator"; import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator"; import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator"; -import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; import { BarrelInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/BarrelInventoryMagGen"; import { ExternalInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/ExternalInventoryMagGen"; import { InternalMagazineInventoryMagGen } from "@spt-aki/generators/weapongen/implementations/InternalMagazineInventoryMagGen"; import { UbglExternalMagGen } from "@spt-aki/generators/weapongen/implementations/UbglExternalMagGen"; +import { WeatherGenerator } from "@spt-aki/generators/WeatherGenerator"; import { AssortHelper } from "@spt-aki/helpers/AssortHelper"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; @@ -133,10 +132,6 @@ import { PostAkiModLoader } from "@spt-aki/loaders/PostAkiModLoader"; import { PostDBModLoader } from "@spt-aki/loaders/PostDBModLoader"; import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; -import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; -import { HttpRouter } from "@spt-aki/routers/HttpRouter"; -import { ImageRouter } from "@spt-aki/routers/ImageRouter"; -import { ItemEventRouter } from "@spt-aki/routers/ItemEventRouter"; import { BotDynamicRouter } from "@spt-aki/routers/dynamic/BotDynamicRouter"; import { BundleDynamicRouter } from "@spt-aki/routers/dynamic/BundleDynamicRouter"; import { CustomizationDynamicRouter } from "@spt-aki/routers/dynamic/CustomizationDynamicRouter"; @@ -146,6 +141,9 @@ import { InraidDynamicRouter } from "@spt-aki/routers/dynamic/InraidDynamicRoute import { LocationDynamicRouter } from "@spt-aki/routers/dynamic/LocationDynamicRouter"; import { NotifierDynamicRouter } from "@spt-aki/routers/dynamic/NotifierDynamicRouter"; import { TraderDynamicRouter } from "@spt-aki/routers/dynamic/TraderDynamicRouter"; +import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; +import { HttpRouter } from "@spt-aki/routers/HttpRouter"; +import { ImageRouter } from "@spt-aki/routers/ImageRouter"; import { CustomizationItemEventRouter } from "@spt-aki/routers/item_events/CustomizationItemEventRouter"; import { HealthItemEventRouter } from "@spt-aki/routers/item_events/HealthItemEventRouter"; import { HideoutItemEventRouter } from "@spt-aki/routers/item_events/HideoutItemEventRouter"; @@ -157,6 +155,7 @@ import { RagfairItemEventRouter } from "@spt-aki/routers/item_events/RagfairItem import { RepairItemEventRouter } from "@spt-aki/routers/item_events/RepairItemEventRouter"; import { TradeItemEventRouter } from "@spt-aki/routers/item_events/TradeItemEventRouter"; import { WishlistItemEventRouter } from "@spt-aki/routers/item_events/WishlistItemEventRouter"; +import { ItemEventRouter } from "@spt-aki/routers/ItemEventRouter"; import { HealthSaveLoadRouter } from "@spt-aki/routers/save_load/HealthSaveLoadRouter"; import { InraidSaveLoadRouter } from "@spt-aki/routers/save_load/InraidSaveLoadRouter"; import { InsuranceSaveLoadRouter } from "@spt-aki/routers/save_load/InsuranceSaveLoadRouter"; @@ -188,16 +187,18 @@ import { TraderStaticRouter } from "@spt-aki/routers/static/TraderStaticRouter"; import { WeatherStaticRouter } from "@spt-aki/routers/static/WeatherStaticRouter"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { AkiHttpListener } from "@spt-aki/servers/http/AkiHttpListener"; import { HttpServer } from "@spt-aki/servers/HttpServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; -import { AkiHttpListener } from "@spt-aki/servers/http/AkiHttpListener"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoolService"; import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; +import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService"; import { CustomLocationWaveService } from "@spt-aki/services/CustomLocationWaveService"; import { FenceService } from "@spt-aki/services/FenceService"; import { GiftService } from "@spt-aki/services/GiftService"; @@ -209,6 +210,13 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { MatchLocationService } from "@spt-aki/services/MatchLocationService"; +import { CustomItemService } from "@spt-aki/services/mod/CustomItemService"; +import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService"; +import { HttpListenerModService } from "@spt-aki/services/mod/httpListener/HttpListenerModService"; +import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; +import { OnLoadModService } from "@spt-aki/services/mod/onLoad/OnLoadModService"; +import { OnUpdateModService } from "@spt-aki/services/mod/onUpdate/OnUpdateModService"; +import { StaticRouterModService } from "@spt-aki/services/mod/staticRouter/StaticRouterModService"; import { ModCompilerService } from "@spt-aki/services/ModCompilerService"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { OpenZoneService } from "@spt-aki/services/OpenZoneService"; @@ -230,15 +238,6 @@ import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; -import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService"; -import { CustomItemService } from "@spt-aki/services/mod/CustomItemService"; -import { DynamicRouterModService } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterModService"; -import { HttpListenerModService } from "@spt-aki/services/mod/httpListener/HttpListenerModService"; -import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; -import { OnLoadModService } from "@spt-aki/services/mod/onLoad/OnLoadModService"; -import { OnUpdateModService } from "@spt-aki/services/mod/onUpdate/OnUpdateModService"; -import { StaticRouterModService } from "@spt-aki/services/mod/staticRouter/StaticRouterModService"; import { App } from "@spt-aki/utils/App"; import { AsyncQueue } from "@spt-aki/utils/AsyncQueue"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; @@ -249,14 +248,14 @@ import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; import { ImporterUtil } from "@spt-aki/utils/ImporterUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { WinstonMainLogger } from "@spt-aki/utils/logging/WinstonMainLogger"; +import { WinstonRequestLogger } from "@spt-aki/utils/logging/WinstonRequestLogger"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { VFS } from "@spt-aki/utils/VFS"; import { Watermark, WatermarkLocale } from "@spt-aki/utils/Watermark"; -import { WinstonMainLogger } from "@spt-aki/utils/logging/WinstonMainLogger"; -import { WinstonRequestLogger } from "@spt-aki/utils/logging/WinstonRequestLogger"; /** * Handle the registration of classes to be used by the Dependency Injection code diff --git a/project/src/di/OnLoad.ts b/project/src/di/OnLoad.ts index 139f89b3..09dedeb6 100644 --- a/project/src/di/OnLoad.ts +++ b/project/src/di/OnLoad.ts @@ -1,5 +1,5 @@ export interface OnLoad { - onLoad(): Promise; - getRoute(): string; + onLoad(): Promise + getRoute(): string } diff --git a/project/src/di/OnUpdate.ts b/project/src/di/OnUpdate.ts index 57362acf..9dcd495c 100644 --- a/project/src/di/OnUpdate.ts +++ b/project/src/di/OnUpdate.ts @@ -1,5 +1,5 @@ export interface OnUpdate { - onUpdate(timeSinceLastRun: number): Promise; - getRoute(): string; + onUpdate(timeSinceLastRun: number): Promise + getRoute(): string } diff --git a/project/src/di/Router.ts b/project/src/di/Router.ts index 1c66e0ae..b9687d35 100644 --- a/project/src/di/Router.ts +++ b/project/src/di/Router.ts @@ -29,9 +29,9 @@ export class Router { if (partialMatch) { - return this.getInternalHandledRoutes().filter((r) => r.dynamic).some((r) => url.includes(r.route)); + return this.getInternalHandledRoutes().filter(r => r.dynamic).some(r => url.includes(r.route)); } - return this.getInternalHandledRoutes().filter((r) => !r.dynamic).some((r) => r.route === url); + return this.getInternalHandledRoutes().filter(r => !r.dynamic).some(r => r.route === url); } } @@ -44,12 +44,12 @@ export class StaticRouter extends Router public async handleStatic(url: string, info: any, sessionID: string, output: string): Promise { - return this.routes.find((route) => route.url === url).action(url, info, sessionID, output); + return this.routes.find(route => route.url === url).action(url, info, sessionID, output); } public override getHandledRoutes(): HandledRoute[] { - return this.routes.map((route) => new HandledRoute(route.url, false)); + return this.routes.map(route => new HandledRoute(route.url, false)); } } @@ -62,12 +62,12 @@ export class DynamicRouter extends Router public async handleDynamic(url: string, info: any, sessionID: string, output: string): Promise { - return this.routes.find((r) => url.includes(r.url)).action(url, info, sessionID, output); + return this.routes.find(r => url.includes(r.url)).action(url, info, sessionID, output); } public override getHandledRoutes(): HandledRoute[] { - return this.routes.map((route) => new HandledRoute(route.url, true)); + return this.routes.map(route => new HandledRoute(route.url, true)); } } diff --git a/project/src/generators/BotEquipmentModGenerator.ts b/project/src/generators/BotEquipmentModGenerator.ts index 3ba207da..5d35d29a 100644 --- a/project/src/generators/BotEquipmentModGenerator.ts +++ b/project/src/generators/BotEquipmentModGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; @@ -234,8 +233,8 @@ export class BotEquipmentModGenerator } // Get the front/back/side weights based on bots level - const plateSlotWeights = settings.botEquipmentConfig?.armorPlateWeighting?.find((armorWeight) => - settings.botLevel >= armorWeight.levelRange.min && settings.botLevel <= armorWeight.levelRange.max + const plateSlotWeights = settings.botEquipmentConfig?.armorPlateWeighting?.find(armorWeight => + settings.botLevel >= armorWeight.levelRange.min && settings.botLevel <= armorWeight.levelRange.max, ); if (!plateSlotWeights) { @@ -261,17 +260,17 @@ export class BotEquipmentModGenerator const chosenArmorPlateLevel = this.weightedRandomHelper.getWeightedValue(plateWeights); // Convert the array of ids into database items - const platesFromDb = existingPlateTplPool.map((plateTpl) => this.itemHelper.getItem(plateTpl)[1]); + const platesFromDb = existingPlateTplPool.map(plateTpl => this.itemHelper.getItem(plateTpl)[1]); // Filter plates to the chosen level based on its armorClass property - const filteredPlates = platesFromDb.filter((item) => item._props.armorClass === chosenArmorPlateLevel); + const filteredPlates = platesFromDb.filter(item => item._props.armorClass === chosenArmorPlateLevel); if (filteredPlates.length === 0) { this.logger.debug( `Plate filter was too restrictive for armor: ${armorItem._id}, unable to find plates of level: ${chosenArmorPlateLevel}. Using mod items default plate`, ); - const relatedItemDbModSlot = armorItem._props.Slots.find((slot) => slot._name.toLowerCase() === modSlot); + const relatedItemDbModSlot = armorItem._props.Slots.find(slot => slot._name.toLowerCase() === modSlot); const defaultPlate = relatedItemDbModSlot._props.filters[0].Plate; if (!defaultPlate) { @@ -281,8 +280,8 @@ export class BotEquipmentModGenerator const defaultPreset = this.presetHelper.getDefaultPreset(armorItem._id); if (defaultPreset) { - const relatedPresetSlot = defaultPreset._items.find((item) => - item.slotId?.toLowerCase() === modSlot + const relatedPresetSlot = defaultPreset._items.find(item => + item.slotId?.toLowerCase() === modSlot, ); if (relatedPresetSlot) { @@ -306,7 +305,7 @@ export class BotEquipmentModGenerator // Only return the items ids result.result = Result.SUCCESS; - result.plateModTpls = filteredPlates.map((item) => item._id); + result.plateModTpls = filteredPlates.map(item => item._id); return result; } @@ -346,8 +345,8 @@ export class BotEquipmentModGenerator const compatibleModsPool = modPool[parentTemplate._id]; if ( - !((parentTemplate._props.Slots.length || parentTemplate._props.Cartridges?.length) - || parentTemplate._props.Chambers?.length) + !(parentTemplate._props.Slots.length || parentTemplate._props.Cartridges?.length + || parentTemplate._props.Chambers?.length) ) { this.logger.error( @@ -468,10 +467,10 @@ export class BotEquipmentModGenerator // Handguard mod can take a sub handguard mod + weapon has no UBGL (takes same slot) // Force spawn chance to be 100% to ensure it gets added if ( - modSlot === "mod_handguard" && modToAddTemplate._props.Slots.find((slot) => - slot._name === "mod_handguard" + modSlot === "mod_handguard" && modToAddTemplate._props.Slots.find(slot => + slot._name === "mod_handguard", ) - && !weapon.find((item) => item.slotId === "mod_launcher") + && !weapon.find(item => item.slotId === "mod_launcher") ) { // Needed for handguards with lower @@ -481,9 +480,9 @@ export class BotEquipmentModGenerator // If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure sub-stock gets added // Or if mod_stock is configured to be forced on if ( - modSlot === "mod_stock" && (modToAddTemplate._props.Slots.find((slot) => - slot._name.includes("mod_stock") || botEquipConfig.forceStock - )) + modSlot === "mod_stock" && modToAddTemplate._props.Slots.find(slot => + slot._name.includes("mod_stock") || botEquipConfig.forceStock, + ) ) { // Stock mod can take additional stocks, could be a locking device, force 100% chance @@ -700,11 +699,11 @@ export class BotEquipmentModGenerator case "patron_in_weapon": case "patron_in_weapon_000": case "patron_in_weapon_001": - return parentTemplate._props.Chambers.find((chamber) => chamber._name.includes(modSlotLower)); + return parentTemplate._props.Chambers.find(chamber => chamber._name.includes(modSlotLower)); case "cartridges": - return parentTemplate._props.Cartridges.find((c) => c._name.toLowerCase() === modSlotLower); + return parentTemplate._props.Cartridges.find(c => c._name.toLowerCase() === modSlotLower); default: - return parentTemplate._props.Slots.find((s) => s._name.toLowerCase() === modSlotLower); + return parentTemplate._props.Slots.find(s => s._name.toLowerCase() === modSlotLower); } } @@ -762,7 +761,7 @@ export class BotEquipmentModGenerator ): [boolean, ITemplateItem] { /** Slot mod will fill */ - const parentSlot = parentTemplate._props.Slots.find((i) => i._name === modSlot); + const parentSlot = parentTemplate._props.Slots.find(i => i._name === modSlot); const weaponTemplate = this.itemHelper.getItem(weapon[0]._tpl)[1]; // It's ammo, use predefined ammo parameter @@ -950,8 +949,8 @@ export class BotEquipmentModGenerator if (modSpawnResult === ModSpawn.DEFAULT_MOD) { const matchingPreset = this.getMatchingPreset(weaponTemplate, parentTemplate._id); - const matchingMod = matchingPreset._items.find((item) => - item?.slotId?.toLowerCase() === modSlot.toLowerCase() + const matchingMod = matchingPreset._items.find(item => + item?.slotId?.toLowerCase() === modSlot.toLowerCase(), ); // Only filter mods down to single default item if it already exists in existing itemModPool, OR the default item has no children @@ -967,8 +966,8 @@ export class BotEquipmentModGenerator } // Check the filter of the slot to ensure a chosen mod fits - const parentSlotCompatibleItems = parentTemplate._props.Slots?.find((slot) => - slot._name.toLowerCase() === modSlot.toLowerCase() + const parentSlotCompatibleItems = parentTemplate._props.Slots?.find(slot => + slot._name.toLowerCase() === modSlot.toLowerCase(), )._props.filters[0].Filter; // Mod isnt in existing pool, only add if it has no children and matches parent filter @@ -1176,7 +1175,7 @@ export class BotEquipmentModGenerator botEquipBlacklist: EquipmentFilterDetails, ): void { - const desiredSlotObject = modTemplate._props.Slots.find((slot) => slot._name.includes(desiredSlotName)); + const desiredSlotObject = modTemplate._props.Slots.find(slot => slot._name.includes(desiredSlotName)); if (desiredSlotObject) { const supportedSubMods = desiredSlotObject._props.filters[0].Filter; @@ -1262,7 +1261,7 @@ export class BotEquipmentModGenerator const blacklist = this.itemFilterService.getBlacklistedItems().concat( botEquipBlacklist.equipment[modSlot] || [], ); - result = allowedMods.filter((tpl) => !blacklist.includes(tpl)); + result = allowedMods.filter(tpl => !blacklist.includes(tpl)); return result; } @@ -1288,7 +1287,7 @@ export class BotEquipmentModGenerator weaponName: parentTemplate._name, }), ); - const camoraSlots = parentTemplate._props.Slots.filter((slot) => slot._name.startsWith("camora")); + const camoraSlots = parentTemplate._props.Slots.filter(slot => slot._name.startsWith("camora")); // Attempt to generate camora slots for item modPool[parentTemplate._id] = {}; @@ -1422,17 +1421,17 @@ export class BotEquipmentModGenerator { // Check to see if mount has a scope slot (only include primary slot, ignore the rest like the backup sight slots) // Should only find 1 as there's currently no items with a mod_scope AND a mod_scope_000 - const scopeSlot = itemDetails._props.Slots.filter((slot) => - ["mod_scope", "mod_scope_000"].includes(slot._name) + const scopeSlot = itemDetails._props.Slots.filter(slot => + ["mod_scope", "mod_scope_000"].includes(slot._name), ); // Mods scope slot found must allow ALL whitelisted scope types OR be a mount if ( - scopeSlot?.every((slot) => - slot._props.filters[0].Filter.every((tpl) => + scopeSlot?.every(slot => + slot._props.filters[0].Filter.every(tpl => this.itemHelper.isOfBaseclasses(tpl, whitelistedSightTypes) - || this.itemHelper.isOfBaseclass(tpl, BaseClasses.MOUNT) - ) + || this.itemHelper.isOfBaseclass(tpl, BaseClasses.MOUNT), + ), ) ) { diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index dc572a86..95323c2c 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotInventoryGenerator } from "@spt-aki/generators/BotInventoryGenerator"; import { BotLevelGenerator } from "@spt-aki/generators/BotLevelGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; @@ -111,7 +110,7 @@ export class BotGenerator // Get raw json data for bot (Cloned) const botJsonTemplateClone = this.jsonUtil.clone( - this.botHelper.getBotTemplate((botGenerationDetails.isPmc) ? bot.Info.Side : botGenerationDetails.role), + this.botHelper.getBotTemplate(botGenerationDetails.isPmc ? bot.Info.Side : botGenerationDetails.role), ); bot = this.generateBot(sessionId, bot, botJsonTemplateClone, botGenerationDetails); @@ -446,7 +445,7 @@ export class BotGenerator } return skillToAdd; - }).filter((x) => x !== null); + }).filter(x => x !== null); } /** @@ -546,7 +545,7 @@ export class BotGenerator Nickname: bot.Info.Nickname, Side: bot.Info.Side, Level: bot.Info.Level, - Time: (new Date().toISOString()), + Time: new Date().toISOString(), Status: "Killed by ", KillerAccountId: "Unknown", KillerProfileId: "Unknown", @@ -557,7 +556,7 @@ export class BotGenerator const inventoryItem: Item = { _id: this.hashUtil.generate(), - _tpl: ((bot.Info.Side === "Usec") ? BaseClasses.DOG_TAG_USEC : BaseClasses.DOG_TAG_BEAR), + _tpl: bot.Info.Side === "Usec" ? BaseClasses.DOG_TAG_USEC : BaseClasses.DOG_TAG_BEAR, parentId: bot.Inventory.equipment, slotId: "Dogtag", location: undefined, diff --git a/project/src/generators/BotInventoryGenerator.ts b/project/src/generators/BotInventoryGenerator.ts index 185beb8d..80cc4785 100644 --- a/project/src/generators/BotInventoryGenerator.ts +++ b/project/src/generators/BotInventoryGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; import { BotLootGenerator } from "@spt-aki/generators/BotLootGenerator"; import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; @@ -308,12 +307,11 @@ export class BotInventoryGenerator */ protected generateEquipment(settings: IGenerateEquipmentProperties): boolean { - const spawnChance = - ([EquipmentSlots.POCKETS, EquipmentSlots.SECURED_CONTAINER] as string[]).includes( - settings.rootEquipmentSlot, - ) - ? 100 - : settings.spawnChances.equipment[settings.rootEquipmentSlot]; + const spawnChance = ([EquipmentSlots.POCKETS, EquipmentSlots.SECURED_CONTAINER] as string[]) + .includes(settings.rootEquipmentSlot) + ? 100 + : settings.spawnChances.equipment[settings.rootEquipmentSlot]; + if (typeof spawnChance === "undefined") { this.logger.warning( @@ -444,7 +442,7 @@ export class BotInventoryGenerator for (const modSlot of Object.keys(modPool ?? [])) { const blacklistedMods = equipmentBlacklist[0]?.equipment[modSlot] || []; - const filteredMods = modPool[modSlot].filter((x) => !blacklistedMods.includes(x)); + const filteredMods = modPool[modSlot].filter(x => !blacklistedMods.includes(x)); if (filteredMods.length > 0) { @@ -503,7 +501,7 @@ export class BotInventoryGenerator * @param equipmentChances Chances bot has certain equipment * @returns What slots bot should have weapons generated for */ - protected getDesiredWeaponsForBot(equipmentChances: Chances): { slot: EquipmentSlots; shouldSpawn: boolean; }[] + protected getDesiredWeaponsForBot(equipmentChances: Chances): { slot: EquipmentSlots, shouldSpawn: boolean }[] { const shouldSpawnPrimary = this.randomUtil.getChance100(equipmentChances.equipment.FirstPrimaryWeapon); return [{ slot: EquipmentSlots.FIRST_PRIMARY_WEAPON, shouldSpawn: shouldSpawnPrimary }, { @@ -532,7 +530,7 @@ export class BotInventoryGenerator */ protected addWeaponAndMagazinesToInventory( sessionId: string, - weaponSlot: { slot: EquipmentSlots; shouldSpawn: boolean; }, + weaponSlot: { slot: EquipmentSlots, shouldSpawn: boolean }, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, @@ -567,18 +565,18 @@ export class BotInventoryGenerator export interface IGenerateEquipmentProperties { /** Root Slot being generated */ - rootEquipmentSlot: string; + rootEquipmentSlot: string /** Equipment pool for root slot being generated */ - rootEquipmentPool: Record; - modPool: Mods; + rootEquipmentPool: Record + modPool: Mods /** Dictionary of mod items and their chance to spawn for this bot type */ - spawnChances: Chances; + spawnChances: Chances /** Role being generated for */ - botRole: string; + botRole: string /** Level of bot being generated */ - botLevel: number; - inventory: PmcInventory; - botEquipmentConfig: EquipmentFilters; + botLevel: number + inventory: PmcInventory + botEquipmentConfig: EquipmentFilters /** Settings from bot.json to adjust how item is generated */ - randomisationDetails: RandomisationDetails; + randomisationDetails: RandomisationDetails } diff --git a/project/src/generators/BotLevelGenerator.ts b/project/src/generators/BotLevelGenerator.ts index 07745c57..6930ad3f 100644 --- a/project/src/generators/BotLevelGenerator.ts +++ b/project/src/generators/BotLevelGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; @@ -66,7 +65,7 @@ export class BotLevelGenerator maxLevel: number, ): number { - const maxPossibleLevel = (botGenerationDetails.isPmc && botGenerationDetails.locationSpecificPmcLevelOverride) + const maxPossibleLevel = botGenerationDetails.isPmc && botGenerationDetails.locationSpecificPmcLevelOverride ? Math.min(botGenerationDetails.locationSpecificPmcLevelOverride.max, maxLevel) // Was a PMC and they have a level override : Math.min(levelDetails.max, maxLevel); // Not pmc with override or non-pmc @@ -92,7 +91,7 @@ export class BotLevelGenerator maxlevel: number, ): number { - const minPossibleLevel = (botGenerationDetails.isPmc && botGenerationDetails.locationSpecificPmcLevelOverride) + const minPossibleLevel = botGenerationDetails.isPmc && botGenerationDetails.locationSpecificPmcLevelOverride ? Math.min( Math.max(levelDetails.min, botGenerationDetails.locationSpecificPmcLevelOverride.min), // Biggest between json min and the botgen min maxlevel, // Fallback if value above is crazy (default is 79) diff --git a/project/src/generators/BotLootGenerator.ts b/project/src/generators/BotLootGenerator.ts index 9edadd85..c8a244e4 100644 --- a/project/src/generators/BotLootGenerator.ts +++ b/project/src/generators/BotLootGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator"; import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; @@ -292,7 +291,7 @@ export class BotLootGenerator // Secure // only add if not a pmc or is pmc and flag is true - if (!isPmc || (isPmc && this.pmcConfig.addSecureContainerLootFromBotConfig)) + if (!isPmc || isPmc && this.pmcConfig.addSecureContainerLootFromBotConfig) { this.addLootFromPool( this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SECURE, botJsonTemplate), @@ -317,12 +316,12 @@ export class BotLootGenerator { const result = [EquipmentSlots.POCKETS]; - if (botInventory.items.find((item) => item.slotId === EquipmentSlots.TACTICAL_VEST)) + if (botInventory.items.find(item => item.slotId === EquipmentSlots.TACTICAL_VEST)) { result.push(EquipmentSlots.TACTICAL_VEST); } - if (botInventory.items.find((item) => item.slotId === EquipmentSlots.BACKPACK)) + if (botInventory.items.find(item => item.slotId === EquipmentSlots.BACKPACK)) { result.push(EquipmentSlots.BACKPACK); } @@ -476,7 +475,7 @@ export class BotLootGenerator ); } - itemWithChildrenToAdd.push(...itemsToAdd.flatMap((moneyStack) => moneyStack)); + itemWithChildrenToAdd.push(...itemsToAdd.flatMap(moneyStack => moneyStack)); } } } diff --git a/project/src/generators/BotWeaponGenerator.ts b/project/src/generators/BotWeaponGenerator.ts index 4ebf4556..d4b8a9af 100644 --- a/project/src/generators/BotWeaponGenerator.ts +++ b/project/src/generators/BotWeaponGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectAll, injectable } from "tsyringe"; - import { BotEquipmentModGenerator } from "@spt-aki/generators/BotEquipmentModGenerator"; import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; @@ -200,7 +199,7 @@ export class BotWeaponGenerator } // Fill existing magazines to full and sync ammo type - for (const magazine of weaponWithModsArray.filter((item) => item.slotId === this.modMagazineSlotId)) + for (const magazine of weaponWithModsArray.filter(item => item.slotId === this.modMagazineSlotId)) { this.fillExistingMagazines(weaponWithModsArray, magazine, ammoTpl); } @@ -212,12 +211,12 @@ export class BotWeaponGenerator ) { // Guns have variety of possible Chamber ids, patron_in_weapon/patron_in_weapon_000/patron_in_weapon_001 - const chamberSlotNames = weaponItemTemplate._props.Chambers.map((x) => x._name); + const chamberSlotNames = weaponItemTemplate._props.Chambers.map(x => x._name); this.addCartridgeToChamber(weaponWithModsArray, ammoTpl, chamberSlotNames); } // Fill UBGL if found - const ubglMod = weaponWithModsArray.find((x) => x.slotId === "mod_launcher"); + const ubglMod = weaponWithModsArray.find(x => x.slotId === "mod_launcher"); let ubglAmmoTpl: string = undefined; if (ubglMod) { @@ -246,7 +245,7 @@ export class BotWeaponGenerator { for (const slotId of chamberSlotIds) { - const existingItemWithSlot = weaponWithModsArray.find((x) => x.slotId === slotId); + const existingItemWithSlot = weaponWithModsArray.find(x => x.slotId === slotId); if (!existingItemWithSlot) { // Not found, add new slot to weapon @@ -367,11 +366,11 @@ export class BotWeaponGenerator } // Iterate over required slots in db item, check mod exists for that slot - for (const modSlotTemplate of modTemplate._props.Slots.filter((slot) => slot._required)) + for (const modSlotTemplate of modTemplate._props.Slots.filter(slot => slot._required)) { const slotName = modSlotTemplate._name; - const weaponSlotItem = weaponItemArray.find((weaponItem) => - weaponItem.parentId === mod._id && weaponItem.slotId === slotName + const weaponSlotItem = weaponItemArray.find(weaponItem => + weaponItem.parentId === mod._id && weaponItem.slotId === slotName, ); if (!weaponSlotItem) { @@ -442,7 +441,7 @@ export class BotWeaponGenerator ammoTemplate, inventory, ); - this.inventoryMagGenComponents.find((v) => v.canHandleInventoryMagGen(inventoryMagGenModel)).process( + this.inventoryMagGenComponents.find(v => v.canHandleInventoryMagGen(inventoryMagGenModel)).process( inventoryMagGenModel, ); @@ -468,13 +467,13 @@ export class BotWeaponGenerator ): void { // Find ubgl mod item + get details of it from db - const ubglMod = weaponMods.find((x) => x.slotId === "mod_launcher"); + const ubglMod = weaponMods.find(x => x.slotId === "mod_launcher"); const ubglDbTemplate = this.itemHelper.getItem(ubglMod._tpl)[1]; // Define min/max of how many grenades bot will have const ubglMinMax: GenerationData = { // eslint-disable-next-line @typescript-eslint/naming-convention - weights: { "1": 1, "2": 1 }, + weights: { 1: 1, 2: 1 }, whitelist: {}, }; @@ -489,7 +488,7 @@ export class BotWeaponGenerator ubglAmmoDbTemplate, inventory, ); - this.inventoryMagGenComponents.find((v) => v.canHandleInventoryMagGen(ubglAmmoGenModel)).process( + this.inventoryMagGenComponents.find(v => v.canHandleInventoryMagGen(ubglAmmoGenModel)).process( ubglAmmoGenModel, ); @@ -537,7 +536,7 @@ export class BotWeaponGenerator botRole: string, ): string { - const magazine = weaponMods.find((m) => m.slotId === this.modMagazineSlotId); + const magazine = weaponMods.find(m => m.slotId === this.modMagazineSlotId); if (!magazine) { // Edge case - magazineless chamber loaded weapons dont have magazines, e.g. mp18 @@ -737,8 +736,8 @@ export class BotWeaponGenerator magazineTemplate: ITemplateItem, ): void { - const magazineCartridgeChildItem = weaponWithMods.find((m) => - m.parentId === magazine._id && m.slotId === "cartridges" + const magazineCartridgeChildItem = weaponWithMods.find(m => + m.parentId === magazine._id && m.slotId === "cartridges", ); if (magazineCartridgeChildItem) { @@ -767,7 +766,7 @@ export class BotWeaponGenerator // for CylinderMagazine we exchange the ammo in the "camoras". // This might not be necessary since we already filled the camoras with a random whitelisted and compatible ammo type, // but I'm not sure whether this is also used elsewhere - const camoras = weaponMods.filter((x) => x.parentId === magazineId && x.slotId.startsWith("camora")); + const camoras = weaponMods.filter(x => x.parentId === magazineId && x.slotId.startsWith("camora")); for (const camora of camoras) { camora._tpl = ammoTpl; diff --git a/project/src/generators/FenceBaseAssortGenerator.ts b/project/src/generators/FenceBaseAssortGenerator.ts index 25a3cf3d..3ccacdb9 100644 --- a/project/src/generators/FenceBaseAssortGenerator.ts +++ b/project/src/generators/FenceBaseAssortGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -50,7 +49,7 @@ export class FenceBaseAssortGenerator const blockedSeasonalItems = this.seasonalEventService.getInactiveSeasonalEventItems(); const baseFenceAssort = this.databaseServer.getTables().traders[Traders.FENCE].assort; - for (const rootItemDb of this.itemHelper.getItems().filter((item) => this.isValidFenceItem(item))) + for (const rootItemDb of this.itemHelper.getItems().filter(item => this.isValidFenceItem(item))) { // Skip blacklisted items if (this.itemFilterService.isItemBlacklisted(rootItemDb._id)) @@ -144,7 +143,7 @@ export class FenceBaseAssortGenerator for (const defaultPreset of defaultPresets) { // Skip presets we've already added - if (baseFenceAssort.items.some((item) => item.upd && item.upd.sptPresetId === defaultPreset._id)) + if (baseFenceAssort.items.some(item => item.upd && item.upd.sptPresetId === defaultPreset._id)) { continue; } @@ -252,7 +251,7 @@ export class FenceBaseAssortGenerator } // Check for and add required soft inserts to armors - const requiredSlots = itemDbDetails._props.Slots.filter((slot) => slot._required); + const requiredSlots = itemDbDetails._props.Slots.filter(slot => slot._required); const hasRequiredSlots = requiredSlots.length > 0; if (hasRequiredSlots) { @@ -284,8 +283,8 @@ export class FenceBaseAssortGenerator } // Check for and add plate items - const plateSlots = itemDbDetails._props.Slots.filter((slot) => - this.itemHelper.isRemovablePlateSlot(slot._name) + const plateSlots = itemDbDetails._props.Slots.filter(slot => + this.itemHelper.isRemovablePlateSlot(slot._name), ); if (plateSlots.length > 0) { diff --git a/project/src/generators/IFilterPlateModsForSlotByLevelResult.ts b/project/src/generators/IFilterPlateModsForSlotByLevelResult.ts index b4d15175..2edd8cd3 100644 --- a/project/src/generators/IFilterPlateModsForSlotByLevelResult.ts +++ b/project/src/generators/IFilterPlateModsForSlotByLevelResult.ts @@ -1,7 +1,7 @@ export interface IFilterPlateModsForSlotByLevelResult { - result: Result; - plateModTpls: string[]; + result: Result + plateModTpls: string[] } export enum Result diff --git a/project/src/generators/LocationGenerator.ts b/project/src/generators/LocationGenerator.ts index c5b47c18..0ca82c71 100644 --- a/project/src/generators/LocationGenerator.ts +++ b/project/src/generators/LocationGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -31,17 +30,17 @@ import { ProbabilityObject, ProbabilityObjectArray, RandomUtil } from "@spt-aki/ export interface IContainerItem { - items: Item[]; - width: number; - height: number; + items: Item[] + width: number + height: number } export interface IContainerGroupCount { /** Containers this group has + probabilty to spawn */ - containerIdsWithProbability: Record; + containerIdsWithProbability: Record /** How many containers the map should spawn with this group id */ - chosenCount: number; + chosenCount: number } @injectable() @@ -136,7 +135,7 @@ export class LocationGenerator // Randomisation is turned off globally or just turned off for this map if ( !(this.locationConfig.containerRandomisationSettings.enabled - && this.locationConfig.containerRandomisationSettings.maps[locationId]) + && this.locationConfig.containerRandomisationSettings.maps[locationId]) ) { this.logger.debug( @@ -219,8 +218,8 @@ export class LocationGenerator for (const chosenContainerId of chosenContainerIds) { // Look up container object from full list of containers on map - const containerObject = staticRandomisableContainersOnMap.find((staticContainer) => - staticContainer.template.Id === chosenContainerId + const containerObject = staticRandomisableContainersOnMap.find(staticContainer => + staticContainer.template.Id === chosenContainerId, ); if (!containerObject) { @@ -263,11 +262,11 @@ export class LocationGenerator */ protected getRandomisableContainersOnMap(staticContainers: IStaticContainerData[]): IStaticContainerData[] { - return staticContainers.filter((staticContainer) => + return staticContainers.filter(staticContainer => staticContainer.probability !== 1 && !staticContainer.template.IsAlwaysSpawn && !this.locationConfig.containerRandomisationSettings.containerTypesToNotRandomise.includes( staticContainer.template.Items[0]._tpl, - ) + ), ); } @@ -278,11 +277,11 @@ export class LocationGenerator */ protected getGuaranteedContainers(staticContainersOnMap: IStaticContainerData[]): IStaticContainerData[] { - return staticContainersOnMap.filter((staticContainer) => + return staticContainersOnMap.filter(staticContainer => staticContainer.probability === 1 || staticContainer.template.IsAlwaysSpawn || this.locationConfig.containerRandomisationSettings.containerTypesToNotRandomise.includes( staticContainer.template.Items[0]._tpl, - ) + ), ); } @@ -339,11 +338,11 @@ export class LocationGenerator chosenCount: this.randomUtil.getInt( Math.round( groupData.minContainers - * this.locationConfig.containerRandomisationSettings.containerGroupMinSizeMultiplier, + * this.locationConfig.containerRandomisationSettings.containerGroupMinSizeMultiplier, ), Math.round( groupData.maxContainers - * this.locationConfig.containerRandomisationSettings.containerGroupMaxSizeMultiplier, + * this.locationConfig.containerRandomisationSettings.containerGroupMaxSizeMultiplier, ), ), }; @@ -413,9 +412,9 @@ export class LocationGenerator const containerLootPool = this.getPossibleLootItemsForContainer(containerTpl, staticLootDist); // Some containers need to have items forced into it (quest keys etc) - const tplsForced = staticForced.filter((forcedStaticProp) => - forcedStaticProp.containerId === containerClone.template.Id - ).map((x) => x.itemTpl); + const tplsForced = staticForced.filter(forcedStaticProp => + forcedStaticProp.containerId === containerClone.template.Id, + ).map(x => x.itemTpl); // Draw random loot // Money spawn more than once in container @@ -428,7 +427,7 @@ export class LocationGenerator itemCountToAdd, this.locationConfig.allowDuplicateItemsInStaticContainers, locklist, - ).filter((tpl) => !tplsForced.includes(tpl)); + ).filter(tpl => !tplsForced.includes(tpl)); // Add forced loot to chosen item pool const tplsToAddToContainer = tplsForced.concat(chosenTpls); @@ -598,7 +597,7 @@ export class LocationGenerator // Build the list of forced loot from both `spawnpointsForced` and any point marked `IsAlwaysSpawn` dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpointsForced); - dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpoints.filter((point) => point.template.IsAlwaysSpawn)); + dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpoints.filter(point => point.template.IsAlwaysSpawn)); // Add forced loot this.addForcedLoot(loot, dynamicForcedSpawnPoints, locationName); @@ -608,10 +607,10 @@ export class LocationGenerator // Draw from random distribution const desiredSpawnpointCount = Math.round( this.getLooseLootMultiplerForLocation(locationName) - * this.randomUtil.getNormallyDistributedRandomNumber( - dynamicLootDist.spawnpointCount.mean, - dynamicLootDist.spawnpointCount.std, - ), + * this.randomUtil.getNormallyDistributedRandomNumber( + dynamicLootDist.spawnpointCount.mean, + dynamicLootDist.spawnpointCount.std, + ), ); // Positions not in forced but have 100% chance to spawn @@ -661,11 +660,11 @@ export class LocationGenerator // Filter out duplicate locationIds chosenSpawnpoints = [ - ...new Map(chosenSpawnpoints.map((spawnPoint) => [spawnPoint.locationId, spawnPoint])).values(), + ...new Map(chosenSpawnpoints.map(spawnPoint => [spawnPoint.locationId, spawnPoint])).values(), ]; // Do we have enough items in pool to fulfill requirement - const tooManySpawnPointsRequested = (desiredSpawnpointCount - chosenSpawnpoints.length) > 0; + const tooManySpawnPointsRequested = desiredSpawnpointCount - chosenSpawnpoints.length > 0; if (tooManySpawnPointsRequested) { this.logger.debug( @@ -705,7 +704,7 @@ export class LocationGenerator { if ( !seasonalEventActive && seasonalItemTplBlacklist.includes( - spawnPoint.template.Items.find((item) => item._id === itemDist.composedKey.key)._tpl, + spawnPoint.template.Items.find(item => item._id === itemDist.composedKey.key)._tpl, ) ) { @@ -756,8 +755,8 @@ export class LocationGenerator for (const itemTpl of lootToForceSingleAmountOnMap) { // Get all spawn positions for item tpl in forced loot array - const items = forcedSpawnPoints.filter((forcedSpawnPoint) => - forcedSpawnPoint.template.Items[0]._tpl === itemTpl + const items = forcedSpawnPoints.filter(forcedSpawnPoint => + forcedSpawnPoint.template.Items[0]._tpl === itemTpl, ); if (!items || items.length === 0) { @@ -781,7 +780,7 @@ export class LocationGenerator // Choose 1 out of all found spawn positions for spawn id and add to loot array for (const spawnPointLocationId of spawnpointArray.draw(1, false)) { - const itemToAdd = items.find((item) => item.locationId === spawnPointLocationId); + const itemToAdd = items.find(item => item.locationId === spawnPointLocationId); const lootItem = itemToAdd.template; lootItem.Root = this.objectId.generate(); lootItem.Items[0]._id = lootItem.Root; @@ -817,8 +816,8 @@ export class LocationGenerator locationTemplateToAdd.Items[0]._id = locationTemplateToAdd.Root; // Push forced location into array as long as it doesnt exist already - const existingLocation = lootLocationTemplates.find((spawnPoint) => - spawnPoint.Id === locationTemplateToAdd.Id + const existingLocation = lootLocationTemplates.find(spawnPoint => + spawnPoint.Id === locationTemplateToAdd.Id, ); if (!existingLocation) { @@ -846,7 +845,7 @@ export class LocationGenerator staticAmmoDist: Record, ): IContainerItem { - const chosenItem = spawnPoint.template.Items.find((item) => item._id === chosenComposedKey); + const chosenItem = spawnPoint.template.Items.find(item => item._id === chosenComposedKey); const chosenTpl = chosenItem._tpl; const itemTemplate = this.itemHelper.getItem(chosenTpl)[1]; @@ -946,10 +945,10 @@ export class LocationGenerator { if (this.itemHelper.isOfBaseclass(chosenTpl, BaseClasses.WEAPON)) { - return items.find((v) => v._tpl === chosenTpl && v.parentId === undefined); + return items.find(v => v._tpl === chosenTpl && v.parentId === undefined); } - return items.find((item) => item._tpl === chosenTpl); + return items.find(item => item._tpl === chosenTpl); } // TODO: rewrite, BIG yikes @@ -1053,7 +1052,7 @@ export class LocationGenerator // it can handle revolver ammo (it's not restructured to be used here yet.) // General: Make a WeaponController for Ragfair preset stuff and the generating weapons and ammo stuff from // BotGenerator - const magazine = items.filter((item) => item.slotId === "mod_magazine")[0]; + const magazine = items.filter(item => item.slotId === "mod_magazine")[0]; // some weapon presets come without magazine; only fill the mag if it exists if (magazine) { diff --git a/project/src/generators/LootGenerator.ts b/project/src/generators/LootGenerator.ts index 4b63f810..df60b3de 100644 --- a/project/src/generators/LootGenerator.ts +++ b/project/src/generators/LootGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -21,7 +20,7 @@ import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; -type ItemLimit = { current: number; max: number; }; +type ItemLimit = { current: number, max: number }; @injectable() export class LootGenerator @@ -74,8 +73,8 @@ export class LootGenerator if (desiredWeaponCrateCount > 0) { // Get list of all sealed containers from db - const sealedWeaponContainerPool = Object.values(tables.templates.items).filter((x) => - x._name.includes("event_container_airdrop") + const sealedWeaponContainerPool = Object.values(tables.templates.items).filter(x => + x._name.includes("event_container_airdrop"), ); for (let index = 0; index < desiredWeaponCrateCount; index++) @@ -92,11 +91,11 @@ export class LootGenerator } // Get items from items.json that have a type of item + not in global blacklist + basetype is in whitelist - const items = Object.entries(tables.templates.items).filter((x) => + const items = Object.entries(tables.templates.items).filter(x => !itemBlacklist.has(x[1]._id) && x[1]._type.toLowerCase() === "item" && !x[1]._props.QuestItem - && options.itemTypeWhitelist.includes(x[1]._parent) + && options.itemTypeWhitelist.includes(x[1]._parent), ); if (items.length > 0) @@ -122,8 +121,8 @@ export class LootGenerator ); if (randomisedWeaponPresetCount > 0) { - const weaponDefaultPresets = globalDefaultPresets.filter((preset) => - this.itemHelper.isOfBaseclass(preset._encyclopedia, BaseClasses.WEAPON) + const weaponDefaultPresets = globalDefaultPresets.filter(preset => + this.itemHelper.isOfBaseclass(preset._encyclopedia, BaseClasses.WEAPON), ); if (weaponDefaultPresets.length > 0) @@ -153,11 +152,11 @@ export class LootGenerator ); if (randomisedArmorPresetCount > 0) { - const armorDefaultPresets = globalDefaultPresets.filter((preset) => - this.itemHelper.armorItemCanHoldMods(preset._encyclopedia) + const armorDefaultPresets = globalDefaultPresets.filter(preset => + this.itemHelper.armorItemCanHoldMods(preset._encyclopedia), ); - const levelFilteredArmorPresets = armorDefaultPresets.filter((armor) => - this.armorIsDesiredProtectionLevel(armor, options) + const levelFilteredArmorPresets = armorDefaultPresets.filter(armor => + this.armorIsDesiredProtectionLevel(armor, options), ); // Add some armors to rewards @@ -192,21 +191,21 @@ export class LootGenerator */ protected armorIsDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean { - const frontPlate = armor._items.find((mod) => mod?.slotId?.toLowerCase() === "front_plate"); + const frontPlate = armor._items.find(mod => mod?.slotId?.toLowerCase() === "front_plate"); if (frontPlate) { const plateDb = this.itemHelper.getItem(frontPlate._tpl); return options.armorLevelWhitelist.includes(Number.parseInt(plateDb[1]._props.armorClass as any)); } - const helmetTop = armor._items.find((mod) => mod?.slotId?.toLowerCase() === "helmet_top"); + const helmetTop = armor._items.find(mod => mod?.slotId?.toLowerCase() === "helmet_top"); if (helmetTop) { const plateDb = this.itemHelper.getItem(helmetTop._tpl); return options.armorLevelWhitelist.includes(Number.parseInt(plateDb[1]._props.armorClass as any)); } - const softArmorFront = armor._items.find((mod) => mod?.slotId?.toLowerCase() === "soft_armor_front"); + const softArmorFront = armor._items.find(mod => mod?.slotId?.toLowerCase() === "soft_armor_front"); if (softArmorFront) { const plateDb = this.itemHelper.getItem(softArmorFront._tpl); @@ -242,7 +241,7 @@ export class LootGenerator */ protected findAndAddRandomItemToLoot( items: [string, ITemplateItem][], - itemTypeCounts: Record, + itemTypeCounts: Record, options: LootRequest, result: LootItem[], ): boolean @@ -317,7 +316,7 @@ export class LootGenerator */ protected findAndAddRandomPresetToLoot( presetPool: IPreset[], - itemTypeCounts: Record, + itemTypeCounts: Record, itemBlacklist: string[], result: LootItem[], ): boolean @@ -408,7 +407,7 @@ export class LootGenerator } // Get weapon preset - default or choose a random one from globals.json preset pool - let chosenWeaponPreset = (containerSettings.defaultPresetsOnly) + let chosenWeaponPreset = containerSettings.defaultPresetsOnly ? this.presetHelper.getDefaultPreset(chosenWeaponTpl) : this.randomUtil.getArrayValue(this.presetHelper.getPresets(chosenWeaponTpl)); @@ -473,7 +472,7 @@ export class LootGenerator // Need to find boxes that matches weapons caliber const weaponCaliber = weaponDetailsDb._props.ammoCaliber; - const ammoBoxesMatchingCaliber = ammoBoxesDetails.filter((x) => x._props.ammoCaliber === weaponCaliber); + const ammoBoxesMatchingCaliber = ammoBoxesDetails.filter(x => x._props.ammoCaliber === weaponCaliber); if (ammoBoxesMatchingCaliber.length === 0) { this.logger.debug(`No ammo box with caliber ${weaponCaliber} found, skipping`); @@ -493,12 +492,12 @@ export class LootGenerator } // Get all items of the desired type + not quest items + not globally blacklisted - const rewardItemPool = Object.values(this.databaseServer.getTables().templates.items).filter((x) => + const rewardItemPool = Object.values(this.databaseServer.getTables().templates.items).filter(x => x._parent === rewardTypeId && x._type.toLowerCase() === "item" && !this.itemFilterService.isItemBlacklisted(x._id) - && (!(containerSettings.allowBossItems || this.itemFilterService.isBossItem(x._id))) - && !x._props.QuestItem + && !(containerSettings.allowBossItems || this.itemFilterService.isBossItem(x._id)) + && !x._props.QuestItem, ); if (rewardItemPool.length === 0) @@ -547,8 +546,8 @@ export class LootGenerator } // Get items that fulfil reward type criteria from items that fit on gun - const relatedItems = linkedItemsToWeapon.filter((x) => - x._parent === rewardTypeId && !this.itemFilterService.isItemBlacklisted(x._id) + const relatedItems = linkedItemsToWeapon.filter(x => + x._parent === rewardTypeId && !this.itemFilterService.isItemBlacklisted(x._id), ); if (!relatedItems || relatedItems.length === 0) { diff --git a/project/src/generators/PMCLootGenerator.ts b/project/src/generators/PMCLootGenerator.ts index 68a16950..27f59ea0 100644 --- a/project/src/generators/PMCLootGenerator.ts +++ b/project/src/generators/PMCLootGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; @@ -48,8 +47,8 @@ export class PMCLootGenerator if (Object.keys(this.pocketLootPool).length === 0) { const items = this.databaseServer.getTables().templates.items; - const pmcPriceOverrides = - this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items + const pmcPriceOverrides + = this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items .Pockets; const allowedItemTypes = this.pmcConfig.pocketLoot.whitelist; @@ -59,13 +58,13 @@ export class PMCLootGenerator // Blacklist inactive seasonal items itemBlacklist.push(...this.seasonalEventService.getInactiveSeasonalEventItems()); - const itemsToAdd = Object.values(items).filter((item) => + const itemsToAdd = Object.values(items).filter(item => allowedItemTypes.includes(item._parent) && this.itemHelper.isValidItem(item._id) && !pmcItemBlacklist.includes(item._id) && !itemBlacklist.includes(item._id) && item._props.Width === 1 - && item._props.Height === 1 + && item._props.Height === 1, ); for (const itemToAdd of itemsToAdd) @@ -88,7 +87,7 @@ export class PMCLootGenerator { // Invert price so cheapest has a larger weight // Times by highest price so most expensive item has weight of 1 - this.pocketLootPool[key] = Math.round((1 / this.pocketLootPool[key]) * highestPrice); + this.pocketLootPool[key] = Math.round(1 / this.pocketLootPool[key] * highestPrice); } this.weightedRandomHelper.reduceWeightValues(this.pocketLootPool); @@ -107,8 +106,8 @@ export class PMCLootGenerator if (Object.keys(this.vestLootPool).length === 0) { const items = this.databaseServer.getTables().templates.items; - const pmcPriceOverrides = - this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items + const pmcPriceOverrides + = this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items .TacticalVest; const allowedItemTypes = this.pmcConfig.vestLoot.whitelist; @@ -118,12 +117,12 @@ export class PMCLootGenerator // Blacklist seasonal items itemBlacklist.push(...this.seasonalEventService.getInactiveSeasonalEventItems()); - const itemsToAdd = Object.values(items).filter((item) => + const itemsToAdd = Object.values(items).filter(item => allowedItemTypes.includes(item._parent) && this.itemHelper.isValidItem(item._id) && !pmcItemBlacklist.includes(item._id) && !itemBlacklist.includes(item._id) - && this.itemFitsInto2By2Slot(item) + && this.itemFitsInto2By2Slot(item), ); for (const itemToAdd of itemsToAdd) @@ -146,7 +145,7 @@ export class PMCLootGenerator { // Invert price so cheapest has a larger weight // Times by highest price so most expensive item has weight of 1 - this.vestLootPool[key] = Math.round((1 / this.vestLootPool[key]) * highestPrice); + this.vestLootPool[key] = Math.round(1 / this.vestLootPool[key] * highestPrice); } this.weightedRandomHelper.reduceWeightValues(this.vestLootPool); @@ -176,8 +175,8 @@ export class PMCLootGenerator if (Object.keys(this.backpackLootPool).length === 0) { const items = this.databaseServer.getTables().templates.items; - const pmcPriceOverrides = - this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items + const pmcPriceOverrides + = this.databaseServer.getTables().bots.types[botRole === "sptBear" ? "bear" : "usec"].inventory.items .Backpack; const allowedItemTypes = this.pmcConfig.backpackLoot.whitelist; @@ -187,11 +186,11 @@ export class PMCLootGenerator // Blacklist seasonal items itemBlacklist.push(...this.seasonalEventService.getInactiveSeasonalEventItems()); - const itemsToAdd = Object.values(items).filter((item) => + const itemsToAdd = Object.values(items).filter(item => allowedItemTypes.includes(item._parent) && this.itemHelper.isValidItem(item._id) && !pmcItemBlacklist.includes(item._id) - && !itemBlacklist.includes(item._id) + && !itemBlacklist.includes(item._id), ); for (const itemToAdd of itemsToAdd) @@ -214,7 +213,7 @@ export class PMCLootGenerator { // Invert price so cheapest has a larger weight // Times by highest price so most expensive item has weight of 1 - this.backpackLootPool[key] = Math.round((1 / this.backpackLootPool[key]) * highestPrice); + this.backpackLootPool[key] = Math.round(1 / this.backpackLootPool[key] * highestPrice); } this.weightedRandomHelper.reduceWeightValues(this.backpackLootPool); diff --git a/project/src/generators/PlayerScavGenerator.ts b/project/src/generators/PlayerScavGenerator.ts index ba21b8b6..e6c4b4eb 100644 --- a/project/src/generators/PlayerScavGenerator.ts +++ b/project/src/generators/PlayerScavGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; @@ -310,7 +309,7 @@ export class PlayerScavGenerator protected getScavLevel(scavProfile: IPmcData): number { // Info can be null on initial account creation - if (!(scavProfile.Info?.Level)) + if (!scavProfile.Info?.Level) { return 1; } @@ -321,7 +320,7 @@ export class PlayerScavGenerator protected getScavExperience(scavProfile: IPmcData): number { // Info can be null on initial account creation - if (!(scavProfile.Info?.Experience)) + if (!scavProfile.Info?.Experience) { return 0; } @@ -364,7 +363,7 @@ export class PlayerScavGenerator scavLockDuration = 10; } - scavData.Info.SavageLockTime = (Date.now() / 1000) + scavLockDuration; + scavData.Info.SavageLockTime = Date.now() / 1000 + scavLockDuration; return scavData; } diff --git a/project/src/generators/RagfairAssortGenerator.ts b/project/src/generators/RagfairAssortGenerator.ts index 228a4b0c..2039c1c7 100644 --- a/project/src/generators/RagfairAssortGenerator.ts +++ b/project/src/generators/RagfairAssortGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; @@ -75,7 +74,7 @@ export class RagfairAssortGenerator const results: Item[][] = []; /** Get cloned items from db */ - const dbItemsClone = this.itemHelper.getItems().filter((item) => item._type !== "Node"); + const dbItemsClone = this.itemHelper.getItems().filter(item => item._type !== "Node"); /** Store processed preset tpls so we dont add them when procesing non-preset items */ const processedArmorItems: string[] = []; @@ -136,7 +135,7 @@ export class RagfairAssortGenerator */ protected getPresetsToAdd(): IPreset[] { - return (this.ragfairConfig.dynamic.showDefaultPresetsOnly) + return this.ragfairConfig.dynamic.showDefaultPresetsOnly ? Object.values(this.presetHelper.getDefaultPresets()) : this.presetHelper.getAllPresets(); } diff --git a/project/src/generators/RagfairOfferGenerator.ts b/project/src/generators/RagfairOfferGenerator.ts index c843e01a..bbbbeb7e 100644 --- a/project/src/generators/RagfairOfferGenerator.ts +++ b/project/src/generators/RagfairOfferGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -37,7 +36,7 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export class RagfairOfferGenerator { protected ragfairConfig: IRagfairConfig; - protected allowedFleaPriceItemsForBarter: { tpl: string; price: number; }[]; + protected allowedFleaPriceItemsForBarter: { tpl: string, price: number }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter = 0; @@ -136,7 +135,7 @@ export class RagfairOfferGenerator } } - const itemCount = items.filter((x) => x.slotId === "hideout").length; + const itemCount = items.filter(x => x.slotId === "hideout").length; const roublePrice = Math.round(this.convertOfferRequirementsIntoRoubles(offerRequirements)); const offer: IRagfairOffer = { @@ -144,7 +143,7 @@ export class RagfairOfferGenerator intId: this.offerCounter, user: { id: this.getTraderId(userID), - memberType: (userID === "ragfair") + memberType: userID === "ragfair" ? MemberCategory.DEFAULT : this.ragfairServerHelper.getMemberType(userID), nickname: this.ragfairServerHelper.getNickname(userID), @@ -297,8 +296,8 @@ export class RagfairOfferGenerator if (this.ragfairServerHelper.isPlayer(userID)) { // Player offer = current time + offerDurationTimeInHour; - const offerDurationTimeHours = - this.databaseServer.getTables().globals.config.RagFair.offerDurationTimeInHour; + const offerDurationTimeHours + = this.databaseServer.getTables().globals.config.RagFair.offerDurationTimeInHour; return this.timeUtil.getTimestamp() + Math.round(offerDurationTimeHours * TimeUtil.ONE_HOUR_AS_SECONDS); } @@ -311,10 +310,10 @@ export class RagfairOfferGenerator // Generated fake-player offer return Math.round( time - + this.randomUtil.getInt( - this.ragfairConfig.dynamic.endTimeSeconds.min, - this.ragfairConfig.dynamic.endTimeSeconds.max, - ), + + this.randomUtil.getInt( + this.ragfairConfig.dynamic.endTimeSeconds.min, + this.ragfairConfig.dynamic.endTimeSeconds.max, + ), ); } @@ -411,8 +410,8 @@ export class RagfairOfferGenerator return false; } - const plateSlots = presetWithChildren.filter((item) => - this.itemHelper.getRemovablePlateSlotIds().includes(item.slotId?.toLowerCase()) + const plateSlots = presetWithChildren.filter(item => + this.itemHelper.getRemovablePlateSlotIds().includes(item.slotId?.toLowerCase()), ); if (plateSlots.length === 0) { @@ -461,12 +460,12 @@ export class RagfairOfferGenerator const isBarterOffer = this.randomUtil.getChance100(this.ragfairConfig.dynamic.barter.chancePercent); const isPackOffer = this.randomUtil.getChance100(this.ragfairConfig.dynamic.pack.chancePercent) - && !isBarterOffer - && itemWithChildren.length === 1 - && this.itemHelper.isOfBaseclasses( - itemWithChildren[0]._tpl, - this.ragfairConfig.dynamic.pack.itemTypeWhitelist, - ); + && !isBarterOffer + && itemWithChildren.length === 1 + && this.itemHelper.isOfBaseclasses( + itemWithChildren[0]._tpl, + this.ragfairConfig.dynamic.pack.itemTypeWhitelist, + ); const randomUserId = this.hashUtil.generate(); @@ -478,8 +477,8 @@ export class RagfairOfferGenerator const shouldRemovePlates = this.randomUtil.getChance100(armorConfig.removeRemovablePlateChance); if (shouldRemovePlates && this.itemHelper.armorItemHasRemovablePlateSlots(itemWithChildren[0]._tpl)) { - const offerItemPlatesToRemove = itemWithChildren.filter((item) => - armorConfig.plateSlotIdToRemovePool.includes(item.slotId?.toLowerCase()) + const offerItemPlatesToRemove = itemWithChildren.filter(item => + armorConfig.plateSlotIdToRemovePool.includes(item.slotId?.toLowerCase()), ); for (const plateItem of offerItemPlatesToRemove) @@ -684,8 +683,8 @@ export class RagfairOfferGenerator this.randomiseArmorDurabilityValues(itemWithMods, currentMultiplier, maxMultiplier); // Add hits to visor - const visorMod = itemWithMods.find((item) => - item.parentId === BaseClasses.ARMORED_EQUIPMENT && item.slotId === "mod_equipment_000" + const visorMod = itemWithMods.find(item => + item.parentId === BaseClasses.ARMORED_EQUIPMENT && item.slotId === "mod_equipment_000", ); if (this.randomUtil.getChance100(25) && visorMod) { @@ -717,7 +716,7 @@ export class RagfairOfferGenerator { // randomize key uses rootItem.upd.Key.NumberOfUsages = Math.round(itemDetails._props.MaximumNumberOfUsage * (1 - maxMultiplier)) - || 0; + || 0; return; } @@ -789,12 +788,12 @@ export class RagfairOfferGenerator for (const armorItem of armorWithMods) { const itemDbDetails = this.itemHelper.getItem(armorItem._tpl)[1]; - if ((Number.parseInt(itemDbDetails._props.armorClass)) > 1) + if (Number.parseInt(itemDbDetails._props.armorClass) > 1) { this.itemHelper.addUpdObjectToItem(armorItem); const lowestMaxDurability = this.randomUtil.getFloat(maxMultiplier, 1) - * itemDbDetails._props.MaxDurability; + * itemDbDetails._props.MaxDurability; const chosenMaxDurability = Math.round( this.randomUtil.getFloat(lowestMaxDurability, itemDbDetails._props.MaxDurability), ); @@ -888,9 +887,9 @@ export class RagfairOfferGenerator const fleaPrices = this.getFleaPricesAsArray(); // Filter possible barters to items that match the price range + not itself - const filtered = fleaPrices.filter((x) => + const filtered = fleaPrices.filter(x => x.price >= desiredItemCost - offerCostVariance && x.price <= desiredItemCost + offerCostVariance - && x.tpl !== offerItems[0]._tpl + && x.tpl !== offerItems[0]._tpl, ); // No items on flea have a matching price, fall back to currency @@ -909,7 +908,7 @@ export class RagfairOfferGenerator * Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter` * @returns array with tpl/price values */ - protected getFleaPricesAsArray(): { tpl: string; price: number; }[] + protected getFleaPricesAsArray(): { tpl: string, price: number }[] { // Generate if needed if (!this.allowedFleaPriceItemsForBarter) @@ -918,10 +917,10 @@ export class RagfairOfferGenerator const fleaArray = Object.entries(fleaPrices).map(([tpl, price]) => ({ tpl: tpl, price: price })); // Only get item prices for items that also exist in items.json - const filteredItems = fleaArray.filter((x) => this.itemHelper.getItem(x.tpl)[0]); + const filteredItems = fleaArray.filter(x => this.itemHelper.getItem(x.tpl)[0]); - this.allowedFleaPriceItemsForBarter = filteredItems.filter((x) => - !this.itemHelper.isOfBaseclasses(x.tpl, this.ragfairConfig.dynamic.barter.itemTypeBlacklist) + this.allowedFleaPriceItemsForBarter = filteredItems.filter(x => + !this.itemHelper.isOfBaseclasses(x.tpl, this.ragfairConfig.dynamic.barter.itemTypeBlacklist), ); } @@ -943,7 +942,7 @@ export class RagfairOfferGenerator { const currency = this.ragfairServerHelper.getDynamicOfferCurrency(); const price = this.ragfairPriceService.getDynamicOfferPriceForOffer(offerWithChildren, currency, isPackOffer) - * multipler; + * multipler; return [{ count: price, _tpl: currency }]; } diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index cef1b80d..a40833a4 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper"; @@ -42,7 +41,7 @@ export class RepeatableQuestGenerator @inject("ObjectId") protected objectId: ObjectId, @inject("RepeatableQuestHelper") protected repeatableQuestHelper: RepeatableQuestHelper, @inject("RepeatableQuestRewardGenerator") protected repeatableQuestRewardGenerator: - RepeatableQuestRewardGenerator, + RepeatableQuestRewardGenerator, @inject("ConfigServer") protected configServer: ConfigServer, ) { @@ -68,11 +67,11 @@ export class RepeatableQuestGenerator const questType = this.randomUtil.drawRandomFromList(questTypePool.types)[0]; // get traders from whitelist and filter by quest type availability - let traders = repeatableConfig.traderWhitelist.filter((x) => x.questTypes.includes(questType)).map((x) => - x.traderId + let traders = repeatableConfig.traderWhitelist.filter(x => x.questTypes.includes(questType)).map(x => + x.traderId, ); // filter out locked traders - traders = traders.filter((x) => pmcTraderInfo[x].unlocked); + traders = traders.filter(x => pmcTraderInfo[x].unlocked); const traderId = this.randomUtil.drawRandomFromList(traders)[0]; switch (questType) @@ -159,15 +158,15 @@ export class RepeatableQuestGenerator return Math.sqrt(Math.sqrt(target) + bodyPart + dist + weaponRequirement) * kill; } - targetsConfig = targetsConfig.filter((x) => - Object.keys(questTypePool.pool.Elimination.targets).includes(x.key) + targetsConfig = targetsConfig.filter(x => + Object.keys(questTypePool.pool.Elimination.targets).includes(x.key), ); - if (targetsConfig.length === 0 || targetsConfig.every((x) => x.data.isBoss)) + if (targetsConfig.length === 0 || targetsConfig.every(x => x.data.isBoss)) { // There are no more targets left for elimination; delete it as a possible quest type // also if only bosses are left we need to leave otherwise it's a guaranteed boss elimination // -> then it would not be a quest with low probability anymore - questTypePool.types = questTypePool.types.filter((t) => t !== "Elimination"); + questTypePool.types = questTypePool.types.filter(t => t !== "Elimination"); return null; } @@ -189,12 +188,12 @@ export class RepeatableQuestGenerator } else { - locations = locations.filter((l) => l !== "any"); + locations = locations.filter(l => l !== "any"); if (locations.length > 0) { locationKey = this.randomUtil.drawRandomFromList(locations)[0]; - questTypePool.pool.Elimination.targets[targetKey].locations = locations.filter((l) => - l !== locationKey + questTypePool.pool.Elimination.targets[targetKey].locations = locations.filter(l => + l !== locationKey, ); if (questTypePool.pool.Elimination.targets[targetKey].locations.length === 0) { @@ -239,18 +238,18 @@ export class RepeatableQuestGenerator if (targetsConfig.data(targetKey).isBoss) { // Get all boss spawn information - const bossSpawns = Object.values(this.databaseServer.getTables().locations).filter((x) => - "base" in x && "Id" in x.base - ).map((x) => ({ Id: x.base.Id, BossSpawn: x.base.BossLocationSpawn })); + const bossSpawns = Object.values(this.databaseServer.getTables().locations).filter(x => + "base" in x && "Id" in x.base, + ).map(x => ({ Id: x.base.Id, BossSpawn: x.base.BossLocationSpawn })); // filter for the current boss to spawn on map - const thisBossSpawns = bossSpawns.map((x) => ({ + const thisBossSpawns = bossSpawns.map(x => ({ Id: x.Id, - BossSpawn: x.BossSpawn.filter((e) => e.BossName === targetKey), - })).filter((x) => x.BossSpawn.length > 0); + BossSpawn: x.BossSpawn.filter(e => e.BossName === targetKey), + })).filter(x => x.BossSpawn.length > 0); // remove blacklisted locations - const allowedSpawns = thisBossSpawns.filter((x) => !eliminationConfig.distLocationBlacklist.includes(x.Id)); + const allowedSpawns = thisBossSpawns.filter(x => !eliminationConfig.distLocationBlacklist.includes(x.Id)); // if the boss spawns on nom-blacklisted locations and the current location is allowed we can generate a distance kill requirement - isDistanceRequirementAllowed = isDistanceRequirementAllowed && (allowedSpawns.length > 0); + isDistanceRequirementAllowed = isDistanceRequirementAllowed && allowedSpawns.length > 0; } if (eliminationConfig.distProb > Math.random() && isDistanceRequirementAllowed) @@ -258,7 +257,7 @@ export class RepeatableQuestGenerator // Random distance with lower values more likely; simple distribution for starters... distance = Math.floor( Math.abs(Math.random() - Math.random()) * (1 + eliminationConfig.maxDist - eliminationConfig.minDist) - + eliminationConfig.minDist, + + eliminationConfig.minDist, ); distance = Math.ceil(distance / 5) * 5; distanceDifficulty = maxDistDifficulty * distance / eliminationConfig.maxDist; @@ -270,14 +269,14 @@ export class RepeatableQuestGenerator // Filter out close range weapons from far distance requirement if (distance > 50) { - weaponCategoryRequirementConfig = weaponCategoryRequirementConfig.filter((category) => - ["Shotgun", "Pistol"].includes(category.key) + weaponCategoryRequirementConfig = weaponCategoryRequirementConfig.filter(category => + ["Shotgun", "Pistol"].includes(category.key), ); } else if (distance < 20) { // Filter out far range weapons from close distance requirement - weaponCategoryRequirementConfig = weaponCategoryRequirementConfig.filter((category) => - ["MarksmanRifle", "DMR"].includes(category.key) + weaponCategoryRequirementConfig = weaponCategoryRequirementConfig.filter(category => + ["MarksmanRifle", "DMR"].includes(category.key), ); } @@ -310,7 +309,7 @@ export class RepeatableQuestGenerator bodyPartDifficulty / maxBodyPartsDifficulty, distanceDifficulty / maxDistDifficulty, killDifficulty / maxKillDifficulty, - (allowedWeaponsCategory || allowedWeapon) ? 1 : 0, + allowedWeaponsCategory || allowedWeapon ? 1 : 0, ); // Aforementioned issue makes it a bit crazy since now all easier quests give significantly lower rewards than Completion / Exploration @@ -498,27 +497,27 @@ export class RepeatableQuestGenerator this.mathUtil.interp1(pmcLevel, levelsConfig, roublesConfig) * this.randomUtil.getFloat(0.5, 1), ); roublesBudget = Math.max(roublesBudget, 5000); - let itemSelection = possibleItemsToRetrievePool.filter((x) => - this.itemHelper.getItemPrice(x[0]) < roublesBudget + let itemSelection = possibleItemsToRetrievePool.filter(x => + this.itemHelper.getItemPrice(x[0]) < roublesBudget, ); // We also have the option to use whitelist and/or blacklist which is defined in repeatableQuests.json as // [{"minPlayerLevel": 1, "itemIds": ["id1",...]}, {"minPlayerLevel": 15, "itemIds": ["id3",...]}] if (repeatableConfig.questConfig.Completion.useWhitelist) { - const itemWhitelist = - this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsWhitelist; + const itemWhitelist + = this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsWhitelist; // Filter and concatenate the arrays according to current player level - const itemIdsWhitelisted = itemWhitelist.filter((p) => p.minPlayerLevel <= pmcLevel).reduce( + const itemIdsWhitelisted = itemWhitelist.filter(p => p.minPlayerLevel <= pmcLevel).reduce( (a, p) => a.concat(p.itemIds), [], ); itemSelection = itemSelection.filter((x) => { // Whitelist can contain item tpls and item base type ids - return (itemIdsWhitelisted.some((v) => this.itemHelper.isOfBaseclass(x[0], v)) - || itemIdsWhitelisted.includes(x[0])); + return itemIdsWhitelisted.some(v => this.itemHelper.isOfBaseclass(x[0], v)) + || itemIdsWhitelisted.includes(x[0]); }); // check if items are missing // const flatList = itemSelection.reduce((a, il) => a.concat(il[0]), []); @@ -527,19 +526,19 @@ export class RepeatableQuestGenerator if (repeatableConfig.questConfig.Completion.useBlacklist) { - const itemBlacklist = - this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsBlacklist; + const itemBlacklist + = this.databaseServer.getTables().templates.repeatableQuests.data.Completion.itemsBlacklist; // we filter and concatenate the arrays according to current player level - const itemIdsBlacklisted = itemBlacklist.filter((p) => p.minPlayerLevel <= pmcLevel).reduce( + const itemIdsBlacklisted = itemBlacklist.filter(p => p.minPlayerLevel <= pmcLevel).reduce( (a, p) => a.concat(p.itemIds), [], ); itemSelection = itemSelection.filter((x) => { - return itemIdsBlacklisted.every((v) => !this.itemHelper.isOfBaseclass(x[0], v)) - || !itemIdsBlacklisted.includes(x[0]); + return itemIdsBlacklisted.every(v => !this.itemHelper.isOfBaseclass(x[0], v)) + || !itemIdsBlacklisted.includes(x[0]); }); } @@ -602,7 +601,7 @@ export class RepeatableQuestGenerator if (roublesBudget > 0) { // reduce the list possible items to fulfill the new budget constraint - itemSelection = itemSelection.filter((x) => this.itemHelper.getItemPrice(x[0]) < roublesBudget); + itemSelection = itemSelection.filter(x => this.itemHelper.getItemPrice(x[0]) < roublesBudget); if (itemSelection.length === 0) { break; @@ -687,13 +686,13 @@ export class RepeatableQuestGenerator ): IRepeatableQuest { const explorationConfig = repeatableConfig.questConfig.Exploration; - const requiresSpecificExtract = - Math.random() < repeatableConfig.questConfig.Exploration.specificExits.probability; + const requiresSpecificExtract + = Math.random() < repeatableConfig.questConfig.Exploration.specificExits.probability; if (Object.keys(questTypePool.pool.Exploration.locations).length === 0) { // there are no more locations left for exploration; delete it as a possible quest type - questTypePool.types = questTypePool.types.filter((t) => t !== "Exploration"); + questTypePool.types = questTypePool.types.filter(t => t !== "Exploration"); return null; } @@ -738,15 +737,13 @@ export class RepeatableQuestGenerator const mapExits = this.getLocationExitsForSide(locationKey, repeatableConfig.side); // Only get exits that have a greater than 0% chance to spawn - const exitPool = mapExits.filter((exit) => exit.Chance > 0); + const exitPool = mapExits.filter(exit => exit.Chance > 0); // Exclude exits with a requirement to leave (e.g. car extracts) - const possibleExits = exitPool.filter(( - exit, - ) => (!("PassageRequirement" in exit) - || repeatableConfig.questConfig.Exploration.specificExits.passageRequirementWhitelist.includes( - exit.PassageRequirement, - )) + const possibleExits = exitPool.filter(exit => !("PassageRequirement" in exit) + || repeatableConfig.questConfig.Exploration.specificExits.passageRequirementWhitelist.includes( + exit.PassageRequirement, + ), ); if (possibleExits.length === 0) @@ -791,7 +788,7 @@ export class RepeatableQuestGenerator const mapExtracts = this.databaseServer.getTables().locations[locationKey.toLocaleLowerCase()] .allExtracts as Exit[]; - return mapExtracts.filter((exit) => exit.Side === playerSide); + return mapExtracts.filter(exit => exit.Side === playerSide); } protected generatePickupQuest( @@ -814,18 +811,18 @@ export class RepeatableQuestGenerator // const locationKey: string = this.randomUtil.drawRandomFromDict(questTypePool.pool.Pickup.locations)[0]; // const locationTarget = questTypePool.pool.Pickup.locations[locationKey]; - const findCondition = quest.conditions.AvailableForFinish.find((x) => x.conditionType === "FindItem"); + const findCondition = quest.conditions.AvailableForFinish.find(x => x.conditionType === "FindItem"); findCondition.target = [itemTypeToFetchWithCount.itemType]; findCondition.value = itemCountToFetch; - const counterCreatorCondition = quest.conditions.AvailableForFinish.find((x) => - x.conditionType === "CounterCreator" + const counterCreatorCondition = quest.conditions.AvailableForFinish.find(x => + x.conditionType === "CounterCreator", ); // const locationCondition = counterCreatorCondition._props.counter.conditions.find(x => x._parent === "Location"); // (locationCondition._props as ILocationConditionProps).target = [...locationTarget]; - const equipmentCondition = counterCreatorCondition.counter.conditions.find((x) => - x.conditionType === "Equipment" + const equipmentCondition = counterCreatorCondition.counter.conditions.find(x => + x.conditionType === "Equipment", ); equipmentCondition.equipmentInclusive = [[itemTypeToFetchWithCount.itemType]]; diff --git a/project/src/generators/RepeatableQuestRewardGenerator.ts b/project/src/generators/RepeatableQuestRewardGenerator.ts index 75b04926..7d3247af 100644 --- a/project/src/generators/RepeatableQuestRewardGenerator.ts +++ b/project/src/generators/RepeatableQuestRewardGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -96,20 +95,20 @@ export class RepeatableQuestRewardGenerator // rewards are generated based on pmcLevel, difficulty and a random spread const rewardXP = Math.floor( effectiveDifficulty * this.mathUtil.interp1(pmcLevel, levelsConfig, xpConfig) - * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), + * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), ); const rewardRoubles = Math.floor( effectiveDifficulty * this.mathUtil.interp1(pmcLevel, levelsConfig, roublesConfig) - * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), + * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), ); const rewardNumItems = this.randomUtil.randInt( 1, Math.round(this.mathUtil.interp1(pmcLevel, levelsConfig, itemsConfig)) + 1, ); - const rewardReputation = - Math.round( + const rewardReputation + = Math.round( 100 * effectiveDifficulty * this.mathUtil.interp1(pmcLevel, levelsConfig, reputationConfig) - * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), + * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), ) / 100; const skillRewardChance = this.mathUtil.interp1(pmcLevel, levelsConfig, skillRewardChanceConfig); const skillPointReward = this.mathUtil.interp1(pmcLevel, levelsConfig, skillPointRewardConfig); @@ -135,7 +134,7 @@ export class RepeatableQuestRewardGenerator this.addMoneyReward(traderId, rewards, rewardRoubles, rewardIndex); rewardIndex++; - const traderWhitelistDetails = repeatableConfig.traderWhitelist.find((x) => x.traderId === traderId); + const traderWhitelistDetails = repeatableConfig.traderWhitelist.find(x => x.traderId === traderId); if ( traderWhitelistDetails.rewardCanBeWeapon && this.randomUtil.getChance100(traderWhitelistDetails.weaponRewardChancePercent) @@ -151,7 +150,7 @@ export class RepeatableQuestRewardGenerator while (defaultPresetPool.hasValues()) { const randomPreset = defaultPresetPool.getRandomValue(); - const tpls = randomPreset._items.map((item) => item._tpl); + const tpls = randomPreset._items.map(item => item._tpl); const presetPrice = this.itemHelper.getItemAndChildrenPrice(tpls); if (presetPrice <= roublesBudget) { @@ -309,13 +308,13 @@ export class RepeatableQuestRewardGenerator protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean { return this.presetHelper.getDefaultPresetOrItemPrice(item._id) < maxRoublePriceToStack - && !this.itemHelper.isOfBaseclasses(item._id, [ - BaseClasses.WEAPON, - BaseClasses.ARMORED_EQUIPMENT, - BaseClasses.AMMO, - ]) - && !this.itemHelper.itemRequiresSoftInserts(item._id) - && this.randomUtil.getChance100(25); + && !this.itemHelper.isOfBaseclasses(item._id, [ + BaseClasses.WEAPON, + BaseClasses.ARMORED_EQUIPMENT, + BaseClasses.AMMO, + ]) + && !this.itemHelper.itemRequiresSoftInserts(item._id) + && this.randomUtil.getChance100(25); } protected calculateAmmoStackSizeThatFitsBudget( @@ -355,7 +354,7 @@ export class RepeatableQuestRewardGenerator const rewardableItemPool = this.getRewardableItems(repeatableConfig, traderId); const minPrice = Math.min(25000, 0.5 * roublesBudget); - let rewardableItemPoolWithinBudget = rewardableItemPool.map((x) => x[1]); + let rewardableItemPoolWithinBudget = rewardableItemPool.map(x => x[1]); rewardableItemPoolWithinBudget = this.filterRewardPoolWithinBudget( rewardableItemPoolWithinBudget, roublesBudget, @@ -370,9 +369,9 @@ export class RepeatableQuestRewardGenerator }), ); // In case we don't find any items in the price range - rewardableItemPoolWithinBudget = rewardableItemPool.filter((x) => - this.itemHelper.getItemPrice(x[0]) < roublesBudget - ).map((x) => x[1]); + rewardableItemPoolWithinBudget = rewardableItemPool.filter(x => + this.itemHelper.getItemPrice(x[0]) < roublesBudget, + ).map(x => x[1]); } return rewardableItemPoolWithinBudget; @@ -393,7 +392,7 @@ export class RepeatableQuestRewardGenerator if (preset) { - const rootItem = preset.find((x) => x._tpl === tpl); + const rootItem = preset.find(x => x._tpl === tpl); rewardItem.items = this.itemHelper.reparentItemAndChildren(rootItem, preset); rewardItem.target = rootItem._id; // Target property and root items id must match } @@ -436,8 +435,8 @@ export class RepeatableQuestRewardGenerator return false; } - const traderWhitelist = repeatableQuestConfig.traderWhitelist.find((trader) => - trader.traderId === traderId + const traderWhitelist = repeatableQuestConfig.traderWhitelist.find(trader => + trader.traderId === traderId, ); return this.isValidRewardItem(tpl, repeatableQuestConfig, traderWhitelist?.rewardBaseWhitelist); }, diff --git a/project/src/generators/ScavCaseRewardGenerator.ts b/project/src/generators/ScavCaseRewardGenerator.ts index 6442f20d..71df45ec 100644 --- a/project/src/generators/ScavCaseRewardGenerator.ts +++ b/project/src/generators/ScavCaseRewardGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; import { Product } from "@spt-aki/models/eft/common/tables/IBotBase"; @@ -61,7 +60,7 @@ export class ScavCaseRewardGenerator this.cacheDbItems(); // Get scavcase details from hideout/scavcase.json - const scavCaseDetails = this.databaseServer.getTables().hideout.scavcase.find((r) => r._id === recipeId); + const scavCaseDetails = this.databaseServer.getTables().hideout.scavcase.find(r => r._id === recipeId); const rewardItemCounts = this.getScavCaseRewardCountsAndPrices(scavCaseDetails); // Get items that fit the price criteria as set by the scavCase config @@ -122,7 +121,7 @@ export class ScavCaseRewardGenerator // Skip item if item id is on blacklist if ( - (item._type !== "Item") + item._type !== "Item" || this.scavCaseConfig.rewardItemBlacklist.includes(item._id) || this.itemFilterService.isItemBlacklisted(item._id) ) diff --git a/project/src/generators/WeatherGenerator.ts b/project/src/generators/WeatherGenerator.ts index 178aa86c..56ccf3de 100644 --- a/project/src/generators/WeatherGenerator.ts +++ b/project/src/generators/WeatherGenerator.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; @@ -78,10 +77,10 @@ export class WeatherGenerator public getInRaidTime(): Date { // tarkov time = (real time * 7 % 24 hr) + 3 hour - const russiaOffset = (this.timeUtil.getHoursAsSeconds(3)) * 1000; + const russiaOffset = this.timeUtil.getHoursAsSeconds(3) * 1000; return new Date( - (russiaOffset + (new Date().getTime() * this.weatherConfig.acceleration)) - % (this.timeUtil.getHoursAsSeconds(24) * 1000), + (russiaOffset + new Date().getTime() * this.weatherConfig.acceleration) + % (this.timeUtil.getHoursAsSeconds(24) * 1000), ); } @@ -109,7 +108,7 @@ export class WeatherGenerator wind_direction: this.getWeightedWindDirection(), wind_gustiness: this.getRandomFloat("windGustiness"), rain: rain, - rain_intensity: (rain > 1) ? this.getRandomFloat("rainIntensity") : 0, + rain_intensity: rain > 1 ? this.getRandomFloat("rainIntensity") : 0, fog: this.getWeightedFog(), temp: this.getRandomFloat("temp"), pressure: this.getRandomFloat("pressure"), diff --git a/project/src/generators/weapongen/IInventoryMagGen.ts b/project/src/generators/weapongen/IInventoryMagGen.ts index 86a1becb..68b36969 100644 --- a/project/src/generators/weapongen/IInventoryMagGen.ts +++ b/project/src/generators/weapongen/IInventoryMagGen.ts @@ -2,7 +2,7 @@ import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; export interface IInventoryMagGen { - getPriority(): number; - canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean; - process(inventoryMagGen: InventoryMagGen): void; + getPriority(): number + canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean + process(inventoryMagGen: InventoryMagGen): void } diff --git a/project/src/generators/weapongen/implementations/BarrelInventoryMagGen.ts b/project/src/generators/weapongen/implementations/BarrelInventoryMagGen.ts index 2628d5f5..0419762a 100644 --- a/project/src/generators/weapongen/implementations/BarrelInventoryMagGen.ts +++ b/project/src/generators/weapongen/implementations/BarrelInventoryMagGen.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; diff --git a/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts b/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts index e5179a19..f322e02d 100644 --- a/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts +++ b/project/src/generators/weapongen/implementations/ExternalInventoryMagGen.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; @@ -154,15 +153,15 @@ export class ExternalInventoryMagGen implements IInventoryMagGen ): ITemplateItem { // The mag Slot data for the weapon - const magSlot = this.itemHelper.getItem(weaponTpl)[1]._props.Slots.find((x) => x._name === "mod_magazine"); + const magSlot = this.itemHelper.getItem(weaponTpl)[1]._props.Slots.find(x => x._name === "mod_magazine"); if (!magSlot) { return null; } // All possible mags that fit into the weapon excluding blacklisted - const magazinePool = magSlot._props.filters[0].Filter.filter((x) => !magazineBlacklist.includes(x)).map((x) => - this.itemHelper.getItem(x)[1] + const magazinePool = magSlot._props.filters[0].Filter.filter(x => !magazineBlacklist.includes(x)).map(x => + this.itemHelper.getItem(x)[1], ); if (!magazinePool) { @@ -170,7 +169,7 @@ export class ExternalInventoryMagGen implements IInventoryMagGen } // Non-internal magazines that fit into the weapon - const externalMagazineOnlyPool = magazinePool.filter((x) => x._props.ReloadMagType !== "InternalMagazine"); + const externalMagazineOnlyPool = magazinePool.filter(x => x._props.ReloadMagType !== "InternalMagazine"); if (!externalMagazineOnlyPool || externalMagazineOnlyPool?.length === 0) { return null; diff --git a/project/src/generators/weapongen/implementations/InternalMagazineInventoryMagGen.ts b/project/src/generators/weapongen/implementations/InternalMagazineInventoryMagGen.ts index 2d865fee..8f985c4d 100644 --- a/project/src/generators/weapongen/implementations/InternalMagazineInventoryMagGen.ts +++ b/project/src/generators/weapongen/implementations/InternalMagazineInventoryMagGen.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; diff --git a/project/src/generators/weapongen/implementations/UbglExternalMagGen.ts b/project/src/generators/weapongen/implementations/UbglExternalMagGen.ts index 03abcb02..60b20ec5 100644 --- a/project/src/generators/weapongen/implementations/UbglExternalMagGen.ts +++ b/project/src/generators/weapongen/implementations/UbglExternalMagGen.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen"; import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen"; import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper"; diff --git a/project/src/helpers/AssortHelper.ts b/project/src/helpers/AssortHelper.ts index 6b0c2a29..06893af9 100644 --- a/project/src/helpers/AssortHelper.ts +++ b/project/src/helpers/AssortHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { QuestHelper } from "@spt-aki/helpers/QuestHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; @@ -77,7 +76,7 @@ export class AssortHelper protected getQuestIdAndStatusThatShowAssort( mergedQuestAssorts: Record>, assortId: string, - ): { questId: string; status: QuestStatus[]; } + ): { questId: string, status: QuestStatus[] } { if (assortId in mergedQuestAssorts.started) { diff --git a/project/src/helpers/BotDifficultyHelper.ts b/project/src/helpers/BotDifficultyHelper.ts index 9fd469d6..cd8202bf 100644 --- a/project/src/helpers/BotDifficultyHelper.ts +++ b/project/src/helpers/BotDifficultyHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; diff --git a/project/src/helpers/BotGeneratorHelper.ts b/project/src/helpers/BotGeneratorHelper.ts index 698a61de..7acc11eb 100644 --- a/project/src/helpers/BotGeneratorHelper.ts +++ b/project/src/helpers/BotGeneratorHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; @@ -52,7 +51,7 @@ export class BotGeneratorHelper * @param botRole Used by weapons to randomize the durability values. Null for non-equipped items * @returns Item Upd object with extra properties */ - public generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd; } + public generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): { upd?: Upd } { // Get raid settings, if no raid, default to day const raidSettings = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION)?.getValue< @@ -123,7 +122,7 @@ export class BotGeneratorHelper ? this.getBotEquipmentSettingFromConfig(botRole, "lightIsActiveNightChancePercent", 50) : this.getBotEquipmentSettingFromConfig(botRole, "lightIsActiveDayChancePercent", 25); itemProperties.Light = { - IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)), + IsActive: this.randomUtil.getChance100(lightLaserActiveChance), SelectedMode: 0, }; } @@ -136,7 +135,7 @@ export class BotGeneratorHelper 50, ); itemProperties.Light = { - IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)), + IsActive: this.randomUtil.getChance100(lightLaserActiveChance), SelectedMode: 0, }; } @@ -147,7 +146,7 @@ export class BotGeneratorHelper const nvgActiveChance = raidIsNight ? this.getBotEquipmentSettingFromConfig(botRole, "nvgIsActiveChanceNightPercent", 90) : this.getBotEquipmentSettingFromConfig(botRole, "nvgIsActiveChanceDayPercent", 15); - itemProperties.Togglable = { On: (this.randomUtil.getChance100(nvgActiveChance)) }; + itemProperties.Togglable = { On: this.randomUtil.getChance100(nvgActiveChance) }; } // Togglable face shield @@ -159,7 +158,7 @@ export class BotGeneratorHelper "faceShieldIsActiveChancePercent", 75, ); - itemProperties.Togglable = { On: (this.randomUtil.getChance100(faceShieldActiveChance)) }; + itemProperties.Togglable = { On: this.randomUtil.getChance100(faceShieldActiveChance) }; } return Object.keys(itemProperties).length ? { upd: itemProperties } : {}; @@ -288,7 +287,7 @@ export class BotGeneratorHelper ): IChooseRandomCompatibleModResult { // TODO: Can probably be optimized to cache itemTemplates as items are added to inventory - const equippedItemsDb = itemsEquipped.map((item) => this.databaseServer.getTables().templates.items[item._tpl]); + const equippedItemsDb = itemsEquipped.map(item => this.databaseServer.getTables().templates.items[item._tpl]); const itemToEquipDb = this.itemHelper.getItem(tplToCheck); const itemToEquip = itemToEquipDb[1]; @@ -319,7 +318,7 @@ export class BotGeneratorHelper } // Check if any of the current weapon mod templates have the incoming item defined as incompatible - const blockingItem = equippedItemsDb.find((x) => x._props.ConflictingItems?.includes(tplToCheck)); + const blockingItem = equippedItemsDb.find(x => x._props.ConflictingItems?.includes(tplToCheck)); if (blockingItem) { return { @@ -332,7 +331,7 @@ export class BotGeneratorHelper } // Check inverse to above, if the incoming item has any existing mods in its conflicting items array - const blockingModItem = itemsEquipped.find((item) => itemToEquip._props.ConflictingItems?.includes(item._tpl)); + const blockingModItem = itemsEquipped.find(item => itemToEquip._props.ConflictingItems?.includes(item._tpl)); if (blockingModItem) { return { @@ -366,7 +365,7 @@ export class BotGeneratorHelper } // TODO: Can probably be optimized to cache itemTemplates as items are added to inventory - const equippedItemsDb = itemsEquipped.map((i) => this.databaseServer.getTables().templates.items[i._tpl]); + const equippedItemsDb = itemsEquipped.map(i => this.databaseServer.getTables().templates.items[i._tpl]); const itemToEquipDb = this.itemHelper.getItem(tplToCheck); const itemToEquip = itemToEquipDb[1]; @@ -396,7 +395,7 @@ export class BotGeneratorHelper } // Does an equipped item have a property that blocks the desired item - check for prop "BlocksX" .e.g BlocksEarpiece / BlocksFaceCover - let blockingItem = equippedItemsDb.find((x) => x._props[`Blocks${equipmentSlot}`]); + let blockingItem = equippedItemsDb.find(x => x._props[`Blocks${equipmentSlot}`]); if (blockingItem) { // this.logger.warning(`1 incompatibility found between - ${itemToEquip[1]._name} and ${blockingItem._name} - ${equipmentSlot}`); @@ -410,7 +409,7 @@ export class BotGeneratorHelper } // Check if any of the current inventory templates have the incoming item defined as incompatible - blockingItem = equippedItemsDb.find((x) => x._props.ConflictingItems?.includes(tplToCheck)); + blockingItem = equippedItemsDb.find(x => x._props.ConflictingItems?.includes(tplToCheck)); if (blockingItem) { // this.logger.warning(`2 incompatibility found between - ${itemToEquip[1]._name} and ${blockingItem._props.Name} - ${equipmentSlot}`); @@ -426,7 +425,7 @@ export class BotGeneratorHelper // Does item being checked get blocked/block existing item if (itemToEquip._props.BlocksHeadwear) { - const existingHeadwear = itemsEquipped.find((x) => x.slotId === "Headwear"); + const existingHeadwear = itemsEquipped.find(x => x.slotId === "Headwear"); if (existingHeadwear) { return { @@ -442,7 +441,7 @@ export class BotGeneratorHelper // Does item being checked get blocked/block existing item if (itemToEquip._props.BlocksFaceCover) { - const existingFaceCover = itemsEquipped.find((item) => item.slotId === "FaceCover"); + const existingFaceCover = itemsEquipped.find(item => item.slotId === "FaceCover"); if (existingFaceCover) { return { @@ -458,7 +457,7 @@ export class BotGeneratorHelper // Does item being checked get blocked/block existing item if (itemToEquip._props.BlocksEarpiece) { - const existingEarpiece = itemsEquipped.find((item) => item.slotId === "Earpiece"); + const existingEarpiece = itemsEquipped.find(item => item.slotId === "Earpiece"); if (existingEarpiece) { return { @@ -474,7 +473,7 @@ export class BotGeneratorHelper // Does item being checked get blocked/block existing item if (itemToEquip._props.BlocksArmorVest) { - const existingArmorVest = itemsEquipped.find((item) => item.slotId === "ArmorVest"); + const existingArmorVest = itemsEquipped.find(item => item.slotId === "ArmorVest"); if (existingArmorVest) { return { @@ -488,7 +487,7 @@ export class BotGeneratorHelper } // Check if the incoming item has any inventory items defined as incompatible - const blockingInventoryItem = itemsEquipped.find((x) => itemToEquip._props.ConflictingItems?.includes(x._tpl)); + const blockingInventoryItem = itemsEquipped.find(x => itemToEquip._props.ConflictingItems?.includes(x._tpl)); if (blockingInventoryItem) { // this.logger.warning(`3 incompatibility found between - ${itemToEquip[1]._name} and ${blockingInventoryItem._tpl} - ${equipmentSlot}`) @@ -510,9 +509,9 @@ export class BotGeneratorHelper */ public getBotEquipmentRole(botRole: string): string { - return ([this.pmcConfig.usecType.toLowerCase(), this.pmcConfig.bearType.toLowerCase()].includes( - botRole.toLowerCase(), - )) + return [this.pmcConfig.usecType.toLowerCase(), this.pmcConfig.bearType.toLowerCase()].includes( + botRole.toLowerCase(), + ) ? "pmc" : botRole; } @@ -544,7 +543,7 @@ export class BotGeneratorHelper continue; } // Get container to put item into - const container = inventory.items.find((item) => item.slotId === equipmentSlotId); + const container = inventory.items.find(item => item.slotId === equipmentSlotId); if (!container) { missingContainerCount++; @@ -590,8 +589,8 @@ export class BotGeneratorHelper { // Grid is empty, skip or item size is bigger than grid if ( - (slotGrid._props.cellsH === 0 || slotGrid._props.cellsV === 0) - || (itemSize[0] * itemSize[1] > slotGrid._props.cellsV * slotGrid._props.cellsH) + slotGrid._props.cellsH === 0 || slotGrid._props.cellsV === 0 + || itemSize[0] * itemSize[1] > slotGrid._props.cellsV * slotGrid._props.cellsH ) { continue; @@ -605,12 +604,12 @@ export class BotGeneratorHelper } // Get all root items in found container - const existingContainerItems = inventory.items.filter((item) => - item.parentId === container._id && item.slotId === slotGrid._name + const existingContainerItems = inventory.items.filter(item => + item.parentId === container._id && item.slotId === slotGrid._name, ); // Get root items in container we can iterate over to find out what space is free - const containerItemsToCheck = existingContainerItems.filter((x) => x.slotId === slotGrid._name); + const containerItemsToCheck = existingContainerItems.filter(x => x.slotId === slotGrid._name); for (const item of containerItemsToCheck) { // Look for children on items, insert into array if found @@ -636,7 +635,7 @@ export class BotGeneratorHelper // Open slot found, add item to inventory if (findSlotResult.success) { - const parentItem = itemWithChildren.find((i) => i._id === rootItemId); + const parentItem = itemWithChildren.find(i => i._id === rootItemId); // Set items parent to container id parentItem.parentId = container._id; @@ -666,7 +665,7 @@ export class BotGeneratorHelper if (containersIdFull) { // if the item was a one by one, we know it must be full. Or if the maps cant find a slot for a one by one - if ((itemSize[0] === 1 && itemSize[1] === 1)) + if (itemSize[0] === 1 && itemSize[1] === 1) { containersIdFull.add(equipmentSlotId); } diff --git a/project/src/helpers/BotHelper.ts b/project/src/helpers/BotHelper.ts index d7c1991d..16788b5d 100644 --- a/project/src/helpers/BotHelper.ts +++ b/project/src/helpers/BotHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { MinMax } from "@spt-aki/models/common/MinMax"; import { Difficulty, IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; @@ -64,12 +63,12 @@ export class BotHelper */ public isBotPmc(botRole: string): boolean { - return (["usec", "bear", "pmc", "sptbear", "sptusec"].includes(botRole?.toLowerCase())); + return ["usec", "bear", "pmc", "sptbear", "sptusec"].includes(botRole?.toLowerCase()); } public isBotBoss(botRole: string): boolean { - return this.botConfig.bosses.some((x) => x.toLowerCase() === botRole?.toLowerCase()); + return this.botConfig.bosses.some(x => x.toLowerCase() === botRole?.toLowerCase()); } public isBotFollower(botRole: string): boolean @@ -186,7 +185,7 @@ export class BotHelper public rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean { return role.toLowerCase() in this.pmcConfig.convertIntoPmcChance - && this.randomUtil.getChance100(this.randomUtil.getInt(botConvertMinMax.min, botConvertMinMax.max)); + && this.randomUtil.getChance100(this.randomUtil.getInt(botConvertMinMax.min, botConvertMinMax.max)); } public botRoleIsPmc(botRole: string): boolean @@ -210,7 +209,7 @@ export class BotHelper return null; } - return botEquipConfig.randomisation.find((x) => botLevel >= x.levelRange.min && botLevel <= x.levelRange.max); + return botEquipConfig.randomisation.find(x => botLevel >= x.levelRange.min && botLevel <= x.levelRange.max); } /** @@ -219,7 +218,7 @@ export class BotHelper */ public getRandomizedPmcRole(): string { - return (this.randomUtil.getChance100(this.pmcConfig.isUsec)) + return this.randomUtil.getChance100(this.pmcConfig.isUsec) ? this.pmcConfig.usecType : this.pmcConfig.bearType; } @@ -248,6 +247,6 @@ export class BotHelper */ protected getRandomizedPmcSide(): string { - return (this.randomUtil.getChance100(this.pmcConfig.isUsec)) ? "Usec" : "Bear"; + return this.randomUtil.getChance100(this.pmcConfig.isUsec) ? "Usec" : "Bear"; } } diff --git a/project/src/helpers/BotWeaponGeneratorHelper.ts b/project/src/helpers/BotWeaponGeneratorHelper.ts index 1e0bfb3c..48164b03 100644 --- a/project/src/helpers/BotWeaponGeneratorHelper.ts +++ b/project/src/helpers/BotWeaponGeneratorHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; @@ -46,7 +45,7 @@ export class BotWeaponGeneratorHelper { const firstSlotAmmoTpl = magTemplate._props.Cartridges[0]._props.filters[0].Filter[0]; const ammoMaxStackSize = this.itemHelper.getItem(firstSlotAmmoTpl)[1]?._props?.StackMaxSize ?? 1; - chamberBulletCount = (ammoMaxStackSize === 1) + chamberBulletCount = ammoMaxStackSize === 1 ? 1 // Rotating grenade launcher : magTemplate._props.Slots.length; // Shotguns/revolvers. We count the number of camoras as the _max_count of the magazine is 0 } diff --git a/project/src/helpers/ContainerHelper.ts b/project/src/helpers/ContainerHelper.ts index cb32052b..7d8c86b8 100644 --- a/project/src/helpers/ContainerHelper.ts +++ b/project/src/helpers/ContainerHelper.ts @@ -35,7 +35,7 @@ export class ContainerHelper const limitX = containerX - minVolume; // Every x+y slot taken up in container, exit - if (container2D.every((x) => x.every((y) => y === 1))) + if (container2D.every(x => x.every(y => y === 1))) { return new FindSlotResult(false); } @@ -44,7 +44,7 @@ export class ContainerHelper for (let y = 0; y < limitY; y++) { // Across - if (container2D[y].every((x) => x === 1)) + if (container2D[y].every(x => x === 1)) { // Every item in row is full, skip row continue; diff --git a/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts b/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts index c5f9b5c1..ab0d0c1d 100644 --- a/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts @@ -26,7 +26,7 @@ export abstract class AbstractDialogueChatBot implements IDialogueChatBot public registerChatCommand(chatCommand: IChatCommand | ICommandoCommand): void { - if (this.chatCommands.some((cc) => cc.getCommandPrefix() === chatCommand.getCommandPrefix())) + if (this.chatCommands.some(cc => cc.getCommandPrefix() === chatCommand.getCommandPrefix())) { throw new Error( `The command "${chatCommand.getCommandPrefix()}" attempting to be registered already exists.`, @@ -49,7 +49,7 @@ export abstract class AbstractDialogueChatBot implements IDialogueChatBot const splitCommand = request.text.split(" "); - const commandos = this.chatCommands.filter((c) => c.getCommandPrefix() === splitCommand[0]); + const commandos = this.chatCommands.filter(c => c.getCommandPrefix() === splitCommand[0]); if (commandos[0]?.getCommands().has(splitCommand[1])) { return commandos[0].handle(splitCommand[1], this.getChatBot(), sessionId, request); diff --git a/project/src/helpers/Dialogue/Commando/IChatCommand.ts b/project/src/helpers/Dialogue/Commando/IChatCommand.ts index 93a63487..7ddd16a8 100644 --- a/project/src/helpers/Dialogue/Commando/IChatCommand.ts +++ b/project/src/helpers/Dialogue/Commando/IChatCommand.ts @@ -8,8 +8,8 @@ import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export type ICommandoCommand = IChatCommand; export interface IChatCommand { - getCommandPrefix(): string; - getCommandHelp(command: string): string; - getCommands(): Set; - handle(command: string, commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; + getCommandPrefix(): string + getCommandHelp(command: string): string + getCommands(): Set + handle(command: string, commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string } diff --git a/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts b/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts index 1c2a6f46..2ba054bf 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts @@ -1,3 +1,4 @@ +import { inject, injectAll, injectable } from "tsyringe"; import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; @@ -5,7 +6,6 @@ import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { inject, injectAll, injectable } from "tsyringe"; @injectable() export class SptCommandoCommands implements IChatCommand @@ -19,17 +19,17 @@ export class SptCommandoCommands implements IChatCommand // if give command is disabled or commando commands are disabled if ( !(coreConfigs.features?.chatbotFeatures?.commandoFeatures?.giveCommandEnabled - && coreConfigs.features?.chatbotFeatures?.commandoEnabled) + && coreConfigs.features?.chatbotFeatures?.commandoEnabled) ) { - const giveCommand = this.sptCommands.find((c) => c.getCommand().toLocaleLowerCase() === "give"); + const giveCommand = this.sptCommands.find(c => c.getCommand().toLocaleLowerCase() === "give"); this.sptCommands.splice(this.sptCommands.indexOf(giveCommand), 1); } } public registerSptCommandoCommand(command: ISptCommand): void { - if (this.sptCommands.some((c) => c.getCommand() === command.getCommand())) + if (this.sptCommands.some(c => c.getCommand() === command.getCommand())) { throw new Error(`The command "${command.getCommand()}" attempting to be registered already exists.`); } @@ -38,7 +38,7 @@ export class SptCommandoCommands implements IChatCommand public getCommandHelp(command: string): string { - return this.sptCommands.find((c) => c.getCommand() === command)?.getCommandHelp(); + return this.sptCommands.find(c => c.getCommand() === command)?.getCommandHelp(); } public getCommandPrefix(): string @@ -48,7 +48,7 @@ export class SptCommandoCommands implements IChatCommand public getCommands(): Set { - return new Set(this.sptCommands.map((c) => c.getCommand())); + return new Set(this.sptCommands.map(c => c.getCommand())); } public handle( @@ -58,7 +58,7 @@ export class SptCommandoCommands implements IChatCommand request: ISendMessageRequest, ): string { - return this.sptCommands.find((c) => c.getCommand() === command).performAction( + return this.sptCommands.find(c => c.getCommand() === command).performAction( commandHandler, sessionId, request, diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts index 3451d574..f1c33306 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts @@ -1,3 +1,5 @@ +import { stringSimilarity } from "string-similarity-js"; +import { inject, injectable } from "tsyringe"; import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -14,8 +16,6 @@ import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; -import { stringSimilarity } from "string-similarity-js"; -import { inject, injectable } from "tsyringe"; @injectable() export class GiveSptCommand implements ISptCommand @@ -119,7 +119,7 @@ export class GiveSptCommand implements ISptCommand this.mailSendService.sendUserMessageToPlayer( sessionId, commandHandler, - `Invalid quantity! Must be 1 or higher. Use \"help\" for more information.`, + "Invalid quantity! Must be 1 or higher. Use \"help\" for more information.", ); return request.dialogId; } @@ -128,7 +128,7 @@ export class GiveSptCommand implements ISptCommand { try { - locale = result[4] ? result[4] : (this.localeService.getDesiredGameLocale() ?? "en"); + locale = result[4] ? result[4] : this.localeService.getDesiredGameLocale() ?? "en"; if (!this.localeService.getServerSupportedLocales().includes(locale)) { this.mailSendService.sendUserMessageToPlayer( @@ -144,20 +144,23 @@ export class GiveSptCommand implements ISptCommand this.mailSendService.sendUserMessageToPlayer( sessionId, commandHandler, - `An error occurred while trying to use localized text. Locale will be defaulted to 'en'.`, + "An error occurred while trying to use localized text. Locale will be defaulted to 'en'.", ); this.logger.warning(e); locale = "en"; } - const localizedGlobal = this.databaseServer.getTables().locales.global[locale] ?? - this.databaseServer.getTables().locales.global.en; + const localizedGlobal = this.databaseServer.getTables().locales.global[locale] + ?? this.databaseServer.getTables().locales.global.en; const closestItemsMatchedByName = this.itemHelper.getItems() - .filter((i) => this.isItemAllowed(i)) - .map((i) => localizedGlobal[`${i?._id} Name`]?.toLowerCase() ?? i._props.Name) - .filter((i) => i !== undefined && i !== "") - .map(i => ({match: stringSimilarity(item.toLocaleLowerCase(), i.toLocaleLowerCase()), itemName: i})) + .filter(i => this.isItemAllowed(i)) + .map(i => localizedGlobal[`${i?._id} Name`]?.toLowerCase() ?? i._props.Name) + .filter(i => i !== undefined && i !== "") + .map(i => ({ match: stringSimilarity( + item.toLocaleLowerCase(), + i.toLocaleLowerCase(), + ), itemName: i })) .sort((a1, a2) => a2.match - a1.match); if (closestItemsMatchedByName[0].match >= GiveSptCommand.acceptableConfidence) @@ -165,13 +168,16 @@ export class GiveSptCommand implements ISptCommand item = closestItemsMatchedByName[0].itemName; } else - { + { let i = 1; const slicedItems = closestItemsMatchedByName.slice(0, 10); // max 10 item names and map them - const itemList = slicedItems.map((match) => `${i++}. ${match.itemName} (conf: ${(match.match * 100).toFixed(2)})`) + const itemList = slicedItems.map(match => `${i++}. ${match.itemName} (conf: ${(match.match * 100).toFixed(2)})`) .join("\n"); - this.savedCommand.set(sessionId, new SavedCommand(quantity, slicedItems.map(i => i.itemName), locale)); + this.savedCommand.set( + sessionId, + new SavedCommand(quantity, slicedItems.map(i => i.itemName), locale), + ); this.mailSendService.sendUserMessageToPlayer( sessionId, commandHandler, @@ -186,8 +192,8 @@ export class GiveSptCommand implements ISptCommand // item is just the tplId. const tplId = isItemName ? this.itemHelper.getItems() - .filter((i) => this.isItemAllowed(i)) - .find((i) => (this.databaseServer.getTables().locales.global[locale][`${i?._id} Name`]?.toLowerCase() ?? i._props.Name) === item)._id + .filter(i => this.isItemAllowed(i)) + .find(i => (this.databaseServer.getTables().locales.global[locale][`${i?._id} Name`]?.toLowerCase() ?? i._props.Name) === item)._id : item; const checkedItem = this.itemHelper.getItem(tplId); @@ -203,9 +209,12 @@ export class GiveSptCommand implements ISptCommand const itemsToSend: Item[] = []; if ( - this.itemHelper.isOfBaseclass(checkedItem[1]._id, BaseClasses.WEAPON) + (this.itemHelper.isOfBaseclass(checkedItem[1]._id, BaseClasses.WEAPON) || this.itemHelper.isOfBaseclass(checkedItem[1]._id, BaseClasses.ARMOR) - || this.itemHelper.isOfBaseclass(checkedItem[1]._id, BaseClasses.VEST) + || this.itemHelper.isOfBaseclass(checkedItem[1]._id, BaseClasses.VEST)) + && !["62178c4d4ecf221597654e3d", "6217726288ed9f0845317459", "624c0b3340357b5f566e8766"].includes( + checkedItem[1]._id, + ) // edge case for handheld flares ) { const preset = this.presetHelper.getDefaultPreset(checkedItem[1]._id); @@ -287,13 +296,13 @@ export class GiveSptCommand implements ISptCommand */ protected isItemAllowed(templateItem: ITemplateItem): boolean { - return templateItem._type !== "Node" && - !this.itemHelper.isQuestItem(templateItem._id) && - !this.itemFilterService.isItemBlacklisted(templateItem._id) && - (templateItem._props?.Prefab?.path ?? "") !== "" && - !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.HIDEOUT_AREA_CONTAINER) && - !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.LOOT_CONTAINER) && - !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.RANDOM_LOOT_CONTAINER) && - !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.MOB_CONTAINER); + return templateItem._type !== "Node" + && !this.itemHelper.isQuestItem(templateItem._id) + && !this.itemFilterService.isItemBlacklisted(templateItem._id) + && (templateItem._props?.Prefab?.path ?? "") !== "" + && !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.HIDEOUT_AREA_CONTAINER) + && !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.LOOT_CONTAINER) + && !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.RANDOM_LOOT_CONTAINER) + && !this.itemHelper.isOfBaseclass(templateItem._id, BaseClasses.MOB_CONTAINER); } } diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts index 8aedd1ab..9f8e3a1b 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts @@ -3,7 +3,7 @@ import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface ISptCommand { - getCommand(): string; - getCommandHelp(): string; - performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; + getCommand(): string + getCommandHelp(): string + performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string } diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts index 025a205c..9c9a41dd 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts @@ -1,3 +1,4 @@ +import { inject, injectable } from "tsyringe"; import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -13,7 +14,6 @@ import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; -import { inject, injectable } from "tsyringe"; @injectable() export class ProfileSptCommand implements ISptCommand @@ -23,8 +23,8 @@ export class ProfileSptCommand implements ISptCommand * spt profile level 20 * spt profile skill metabolism 10 */ - private static commandRegex = - /^spt profile (?level|skill)((?<=.*skill) (?[\w]+)){0,1} (?(?!0+)[0-9]+)$/; + private static commandRegex + = /^spt profile (?level|skill)((?<=.*skill) (?[\w]+)){0,1} (?(?!0+)[0-9]+)$/; protected savedCommand: SavedCommand; @@ -87,8 +87,8 @@ export class ProfileSptCommand implements ISptCommand break; case "skill": { - const enumSkill = Object.values(SkillTypes).find((t) => - t.toLocaleLowerCase() === skill.toLocaleLowerCase() + const enumSkill = Object.values(SkillTypes).find(t => + t.toLocaleLowerCase() === skill.toLocaleLowerCase(), ); if (enumSkill === undefined) diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts index feb3c0b2..7c4b1cbd 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts @@ -1,3 +1,4 @@ +import { inject, injectable } from "tsyringe"; import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/GiveCommand/SavedCommand"; import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -11,7 +12,6 @@ import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; -import { inject, injectable } from "tsyringe"; @injectable() export class TraderSptCommand implements ISptCommand @@ -66,8 +66,8 @@ export class TraderSptCommand implements ISptCommand const command: string = result.groups.command; const quantity: number = +result.groups.quantity; - const dbTrader = Object.values(this.databaseServer.getTables().traders).find((t) => - t.base.nickname.toLocaleLowerCase() === trader.toLocaleLowerCase() + const dbTrader = Object.values(this.databaseServer.getTables().traders).find(t => + t.base.nickname.toLocaleLowerCase() === trader.toLocaleLowerCase(), ); if (dbTrader === undefined) { diff --git a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts index db8018dc..7d8a71d2 100644 --- a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts @@ -1,5 +1,4 @@ import { inject, injectAll, injectable } from "tsyringe"; - import { AbstractDialogueChatBot } from "@spt-aki/helpers/Dialogue/AbstractDialogueChatBot"; import { IChatCommand } from "@spt-aki/helpers/Dialogue/Commando/IChatCommand"; import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; @@ -11,7 +10,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; export class CommandoDialogueChatBot extends AbstractDialogueChatBot { public constructor( - @inject("WinstonLogger") logger: ILogger, + @inject("WinstonLogger") logger: ILogger, @inject("MailSendService") mailSendService: MailSendService, @injectAll("CommandoCommand") chatCommands: IChatCommand[], ) @@ -30,6 +29,6 @@ export class CommandoDialogueChatBot extends AbstractDialogueChatBot protected getUnrecognizedCommandMessage(): string { - return `I'm sorry soldier, I don't recognize the command you are trying to use! Type "help" to see available commands.`; + return "I'm sorry soldier, I don't recognize the command you are trying to use! Type \"help\" to see available commands."; } } diff --git a/project/src/helpers/Dialogue/IDialogueChatBot.ts b/project/src/helpers/Dialogue/IDialogueChatBot.ts index a39ffa8a..7bc288e5 100644 --- a/project/src/helpers/Dialogue/IDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/IDialogueChatBot.ts @@ -3,6 +3,6 @@ import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IDialogueChatBot { - getChatBot(): IUserDialogInfo; - handleMessage(sessionId: string, request: ISendMessageRequest): string; + getChatBot(): IUserDialogInfo + handleMessage(sessionId: string, request: ISendMessageRequest): string } diff --git a/project/src/helpers/Dialogue/SptDialogueChatBot.ts b/project/src/helpers/Dialogue/SptDialogueChatBot.ts index 1f707c90..874533b0 100644 --- a/project/src/helpers/Dialogue/SptDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/SptDialogueChatBot.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; diff --git a/project/src/helpers/DialogueHelper.ts b/project/src/helpers/DialogueHelper.ts index cfd0bfda..19f28c7c 100644 --- a/project/src/helpers/DialogueHelper.ts +++ b/project/src/helpers/DialogueHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper"; @@ -67,7 +66,7 @@ export class DialogueHelper const dialogueData = this.saveServer.getProfile(sessionID).dialogues; for (const dialogueId in dialogueData) { - const message = dialogueData[dialogueId].messages.find((x) => x._id === messageID); + const message = dialogueData[dialogueId].messages.find(x => x._id === messageID); if (!message) { continue; @@ -88,7 +87,7 @@ export class DialogueHelper message.items.data = []; } - const rewardItemCount = message.items.data?.filter((item) => item._id !== itemId); + const rewardItemCount = message.items.data?.filter(item => item._id !== itemId); if (rewardItemCount.length === 0) { message.rewardCollected = true; diff --git a/project/src/helpers/DurabilityLimitsHelper.ts b/project/src/helpers/DurabilityLimitsHelper.ts index 1e7413b9..44dfd14f 100644 --- a/project/src/helpers/DurabilityLimitsHelper.ts +++ b/project/src/helpers/DurabilityLimitsHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; @@ -84,7 +83,7 @@ export class DurabilityLimitsHelper */ public getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number { - if (botRole && (this.botHelper.isBotPmc(botRole))) + if (botRole && this.botHelper.isBotPmc(botRole)) { return this.generateWeaponDurability("pmc", maxDurability); } @@ -111,7 +110,7 @@ export class DurabilityLimitsHelper */ public getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number { - if (botRole && (this.botHelper.isBotPmc(botRole))) + if (botRole && this.botHelper.isBotPmc(botRole)) { return this.generateArmorDurability("pmc", maxDurability); } @@ -173,11 +172,11 @@ export class DurabilityLimitsHelper const delta = this.randomUtil.getInt(minDelta, maxDelta); const result = Number((maxDurability - delta).toFixed(2)); const durabilityValueMinLimit = Math.round( - (this.getMinWeaponLimitPercentFromConfig(botRole) / 100) * maxDurability, + this.getMinWeaponLimitPercentFromConfig(botRole) / 100 * maxDurability, ); // Dont let weapon dura go below the percent defined in config - return (result >= durabilityValueMinLimit) ? result : durabilityValueMinLimit; + return result >= durabilityValueMinLimit ? result : durabilityValueMinLimit; } protected generateArmorDurability(botRole: string, maxDurability: number): number @@ -187,11 +186,11 @@ export class DurabilityLimitsHelper const delta = this.randomUtil.getInt(minDelta, maxDelta); const result = Number((maxDurability - delta).toFixed(2)); const durabilityValueMinLimit = Math.round( - (this.getMinArmorLimitPercentFromConfig(botRole) / 100) * maxDurability, + this.getMinArmorLimitPercentFromConfig(botRole) / 100 * maxDurability, ); // Dont let armor dura go below the percent defined in config - return (result >= durabilityValueMinLimit) ? result : durabilityValueMinLimit; + return result >= durabilityValueMinLimit ? result : durabilityValueMinLimit; } protected getMinWeaponDeltaFromConfig(botRole: string): number diff --git a/project/src/helpers/GameEventHelper.ts b/project/src/helpers/GameEventHelper.ts index b6b677c2..aaaea768 100644 --- a/project/src/helpers/GameEventHelper.ts +++ b/project/src/helpers/GameEventHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ISeasonalEventConfig } from "@spt-aki/models/spt/config/ISeasonalEventConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; diff --git a/project/src/helpers/HandbookHelper.ts b/project/src/helpers/HandbookHelper.ts index 54a016bf..3a00e510 100644 --- a/project/src/helpers/HandbookHelper.ts +++ b/project/src/helpers/HandbookHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; @@ -57,8 +56,8 @@ export class HandbookHelper // Add handbook overrides found in items.json config into db for (const itemTpl in this.itemConfig.handbookPriceOverride) { - let itemToUpdate = this.databaseServer.getTables().templates.handbook.Items.find((item) => - item.Id === itemTpl + let itemToUpdate = this.databaseServer.getTables().templates.handbook.Items.find(item => + item.Id === itemTpl, ); if (!itemToUpdate) { @@ -67,8 +66,8 @@ export class HandbookHelper ParentId: this.databaseServer.getTables().templates.items[itemTpl]._parent, Price: this.itemConfig.handbookPriceOverride[itemTpl], }); - itemToUpdate = this.databaseServer.getTables().templates.handbook.Items.find((item) => - item.Id === itemTpl + itemToUpdate = this.databaseServer.getTables().templates.handbook.Items.find(item => + item.Id === itemTpl, ); } @@ -119,7 +118,7 @@ export class HandbookHelper return this.handbookPriceCache.items.byId.get(tpl); } - const handbookItem = this.databaseServer.getTables().templates.handbook.Items.find((x) => x.Id === tpl); + const handbookItem = this.databaseServer.getTables().templates.handbook.Items.find(x => x.Id === tpl); if (!handbookItem) { const newValue = 0; @@ -208,6 +207,6 @@ export class HandbookHelper public getCategoryById(handbookId: string): Category { - return this.databaseServer.getTables().templates.handbook.Categories.find((x) => x.Id === handbookId); + return this.databaseServer.getTables().templates.handbook.Categories.find(x => x.Id === handbookId); } } diff --git a/project/src/helpers/HealthHelper.ts b/project/src/helpers/HealthHelper.ts index d5b2d3a0..ae9ae7c1 100644 --- a/project/src/helpers/HealthHelper.ts +++ b/project/src/helpers/HealthHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { ISyncHealthRequestData } from "@spt-aki/models/eft/health/ISyncHealthRequestData"; import { Effects, IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; @@ -106,7 +105,7 @@ export class HealthHelper else { profileHealth[bodyPart] = pmcData.Health.BodyParts[bodyPart].Health.Maximum - * this.healthConfig.healthMultipliers.death; + * this.healthConfig.healthMultipliers.death; } } @@ -170,7 +169,7 @@ export class HealthHelper // Blacked body part target = Math.round( pmcData.Health.BodyParts[healthModifier].Health.Maximum - * this.healthConfig.healthMultipliers.blacked, + * this.healthConfig.healthMultipliers.blacked, ); } @@ -264,7 +263,7 @@ export class HealthHelper } } - protected isEmpty(map: Record): boolean + protected isEmpty(map: Record): boolean { for (const key in map) { diff --git a/project/src/helpers/HideoutHelper.ts b/project/src/helpers/HideoutHelper.ts index bbd98544..7684ffa6 100644 --- a/project/src/helpers/HideoutHelper.ts +++ b/project/src/helpers/HideoutHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; @@ -73,8 +72,8 @@ export class HideoutHelper sessionID: string, ): IItemEventRouterResponse { - const recipe = this.databaseServer.getTables().hideout.production.find((production) => - production._id === body.recipeId + const recipe = this.databaseServer.getTables().hideout.production.find(production => + production._id === body.recipeId, ); if (!recipe) { @@ -107,7 +106,7 @@ export class HideoutHelper for (const tool of bodyAsSingle.tools) { - const toolItem = this.jsonUtil.clone(pmcData.Inventory.items.find((x) => x._id === tool.id)); + const toolItem = this.jsonUtil.clone(pmcData.Inventory.items.find(x => x._id === tool.id)); // Make sure we only return as many as we took this.itemHelper.addUpdObjectToItem(toolItem); @@ -169,7 +168,7 @@ export class HideoutHelper case BonusType.STASH_SIZE: { // Find stash item and adjust tpl to new tpl from bonus - const stashItem = pmcData.Inventory.items.find((x) => x._id === pmcData.Inventory.stash); + const stashItem = pmcData.Inventory.items.find(x => x._id === pmcData.Inventory.stash); if (!stashItem) { this.logger.warning( @@ -219,16 +218,16 @@ export class HideoutHelper */ protected getHideoutProperties( pmcData: IPmcData, - ): { btcFarmCGs: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean; } + ): { btcFarmCGs: number, isGeneratorOn: boolean, waterCollectorHasFilter: boolean } { - const bitcoinFarm = pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.BITCOIN_FARM); - const bitcoinCount = bitcoinFarm?.slots.filter((slot) => slot.item).length ?? 0; // Get slots with an item property + const bitcoinFarm = pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.BITCOIN_FARM); + const bitcoinCount = bitcoinFarm?.slots.filter(slot => slot.item).length ?? 0; // Get slots with an item property const hideoutProperties = { btcFarmCGs: bitcoinCount, - isGeneratorOn: pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.GENERATOR)?.active ?? false, + isGeneratorOn: pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.GENERATOR)?.active ?? false, waterCollectorHasFilter: this.doesWaterCollectorHaveFilter( - pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.WATER_COLLECTOR), + pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.WATER_COLLECTOR), ), }; @@ -241,7 +240,7 @@ export class HideoutHelper if (waterCollector.level === 3) { // Has filter in at least one slot - return waterCollector.slots.some((slot) => slot.item); + return waterCollector.slots.some(slot => slot.item); } // No Filter @@ -255,7 +254,7 @@ export class HideoutHelper */ protected updateProductionTimers( pmcData: IPmcData, - hideoutProperties: { btcFarmCGs: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }, + hideoutProperties: { btcFarmCGs: number, isGeneratorOn: boolean, waterCollectorHasFilter: boolean }, ): void { const recipes = this.databaseServer.getTables().hideout.production; @@ -309,7 +308,7 @@ export class HideoutHelper } // Other recipes not covered by above - const recipe = recipes.find((r) => r._id === prodId); + const recipe = recipes.find(r => r._id === prodId); if (!recipe) { this.logger.error(this.localisationService.getText("hideout-missing_recipe_for_area", prodId)); @@ -330,7 +329,7 @@ export class HideoutHelper protected updateWaterCollectorProductionTimer( pmcData: IPmcData, productionId: string, - hideoutProperties: { btcFarmCGs?: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }, + hideoutProperties: { btcFarmCGs?: number, isGeneratorOn: boolean, waterCollectorHasFilter: boolean }, ): void { const timeElapsed = this.getTimeElapsedSinceLastServerTick(pmcData, hideoutProperties.isGeneratorOn); @@ -351,7 +350,7 @@ export class HideoutHelper pmcData: IPmcData, prodId: string, recipe: IHideoutProduction, - hideoutProperties: { btcFarmCGs?: number; isGeneratorOn: boolean; waterCollectorHasFilter?: boolean; }, + hideoutProperties: { btcFarmCGs?: number, isGeneratorOn: boolean, waterCollectorHasFilter?: boolean }, ): void { // Production is complete, no need to do any calculations @@ -365,7 +364,7 @@ export class HideoutHelper // Increment progress by time passed const production = pmcData.Hideout.Production[prodId]; - production.Progress += (production.needFuelForAllProductionTime && !hideoutProperties.isGeneratorOn) + production.Progress += production.needFuelForAllProductionTime && !hideoutProperties.isGeneratorOn ? 0 : timeElapsed; // Some items NEED power to craft (e.g. DSP) @@ -396,8 +395,8 @@ export class HideoutHelper */ protected updateScavCaseProductionTimer(pmcData: IPmcData, productionId: string): void { - const timeElapsed = (this.timeUtil.getTimestamp() - pmcData.Hideout.Production[productionId].StartTimestamp) - - pmcData.Hideout.Production[productionId].Progress; + const timeElapsed = this.timeUtil.getTimestamp() - pmcData.Hideout.Production[productionId].StartTimestamp + - pmcData.Hideout.Production[productionId].Progress; pmcData.Hideout.Production[productionId].Progress += timeElapsed; } @@ -410,7 +409,7 @@ export class HideoutHelper protected updateAreasWithResources( sessionID: string, pmcData: IPmcData, - hideoutProperties: { btcFarmCGs: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }, + hideoutProperties: { btcFarmCGs: number, isGeneratorOn: boolean, waterCollectorHasFilter: boolean }, ): void { for (const area of pmcData.Hideout.Areas) @@ -448,13 +447,13 @@ export class HideoutHelper // 1 resource last 14 min 27 sec, 1/14.45/60 = 0.00115 // 10-10-2021 From wiki, 1 resource last 12 minutes 38 seconds, 1/12.63333/60 = 0.00131 let fuelUsedSinceLastTick = this.databaseServer.getTables().hideout.settings.generatorFuelFlowRate - * this.getTimeElapsedSinceLastServerTick(pmcData, isGeneratorOn); + * this.getTimeElapsedSinceLastServerTick(pmcData, isGeneratorOn); - const profileFuelConsumptionBonus = pmcData.Bonuses.find((bonus) => bonus.type === BonusType.FUEL_CONSUMPTION); + const profileFuelConsumptionBonus = pmcData.Bonuses.find(bonus => bonus.type === BonusType.FUEL_CONSUMPTION); // 0 to 1 - const fuelConsumptionBonusMultipler = - (profileFuelConsumptionBonus ? Math.abs(profileFuelConsumptionBonus.value) : 0) / 100; + const fuelConsumptionBonusMultipler + = (profileFuelConsumptionBonus ? Math.abs(profileFuelConsumptionBonus.value) : 0) / 100; // 0 to 1 const hideoutManagementConsumptionBonusMultipler = this.getHideoutManagementConsumptionBonus(pmcData); @@ -545,7 +544,7 @@ export class HideoutHelper sessionId: string, pmcData: IPmcData, area: HideoutArea, - hideoutProperties: { btcFarmCGs: number; isGeneratorOn: boolean; waterCollectorHasFilter: boolean; }, + hideoutProperties: { btcFarmCGs: number, isGeneratorOn: boolean, waterCollectorHasFilter: boolean }, ): void { // Skip water collector when not level 3 (cant collect until 3) @@ -603,8 +602,8 @@ export class HideoutHelper { const globalSkillsDb = this.databaseServer.getTables().globals.config.SkillsSettings; - const recipe = this.databaseServer.getTables().hideout.production.find((production) => - production._id === recipeId + const recipe = this.databaseServer.getTables().hideout.production.find(production => + production._id === recipeId, ); if (!recipe) { @@ -688,7 +687,7 @@ export class HideoutHelper const waterFilterItemInSlot = waterFilterArea.slots[i].item[0]; // How many units of filter are left - let resourceValue = (waterFilterItemInSlot.upd?.Resource) + let resourceValue = waterFilterItemInSlot.upd?.Resource ? waterFilterItemInSlot.upd.Resource.Value : null; if (!resourceValue) @@ -756,7 +755,7 @@ export class HideoutHelper ): number { const drainTimeSeconds = secondsSinceServerTick > totalProductionTime - ? (totalProductionTime - productionProgress) // More time passed than prod time, get total minus the current progress + ? totalProductionTime - productionProgress // More time passed than prod time, get total minus the current progress : secondsSinceServerTick; // Multiply base drain rate by time passed @@ -801,9 +800,9 @@ export class HideoutHelper */ protected getTotalProductionTimeSeconds(prodId: string): number { - const recipe = this.databaseServer.getTables().hideout.production.find((prod) => prod._id === prodId); + const recipe = this.databaseServer.getTables().hideout.production.find(prod => prod._id === prodId); - return (recipe.productionTime || 0); + return recipe.productionTime || 0; } /** @@ -835,7 +834,7 @@ export class HideoutHelper 300/17.64694/60/60 = 0.004722 */ let filterDrainRate = this.databaseServer.getTables().hideout.settings.airFilterUnitFlowRate - * this.getTimeElapsedSinceLastServerTick(pmcData, isGeneratorOn); + * this.getTimeElapsedSinceLastServerTick(pmcData, isGeneratorOn); // Hideout management resource consumption bonus: const hideoutManagementConsumptionBonus = 1.0 - this.getHideoutManagementConsumptionBonus(pmcData); @@ -846,7 +845,7 @@ export class HideoutHelper { if (airFilterArea.slots[i].item) { - let resourceValue = (airFilterArea.slots[i].item[0].upd?.Resource) + let resourceValue = airFilterArea.slots[i].item[0].upd?.Resource ? airFilterArea.slots[i].item[0].upd.Resource.Value : null; if (!resourceValue) @@ -889,8 +888,8 @@ export class HideoutHelper protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production { const btcProd = pmcData.Hideout.Production[HideoutHelper.bitcoinFarm]; - const bitcoinProdData = this.databaseServer.getTables().hideout.production.find((production) => - production._id === HideoutHelper.bitcoinProductionId + const bitcoinProdData = this.databaseServer.getTables().hideout.production.find(production => + production._id === HideoutHelper.bitcoinProductionId, ); const coinSlotCount = this.getBTCSlots(pmcData); @@ -940,8 +939,8 @@ export class HideoutHelper } */ // BSG finally fixed their settings, they now get loaded from the settings and used in the client - const adjustedCraftTime = - ((this.profileHelper.isDeveloperAccount(pmcData.sessionId)) ? 40 : bitcoinProdData.productionTime) + const adjustedCraftTime + = (this.profileHelper.isDeveloperAccount(pmcData.sessionId) ? 40 : bitcoinProdData.productionTime) / (1 + (btcFarmCGs - 1) * this.databaseServer.getTables().hideout.settings.gpuBoostRate); // The progress should be adjusted based on the GPU boost rate, but the target is still the base productionTime @@ -1025,8 +1024,8 @@ export class HideoutHelper */ protected getBTCSlots(pmcData: IPmcData): number { - const bitcoinProductions = this.databaseServer.getTables().hideout.production.find((production) => - production._id === HideoutHelper.bitcoinFarm + const bitcoinProductions = this.databaseServer.getTables().hideout.production.find(production => + production._id === HideoutHelper.bitcoinFarm, ); const productionSlots = bitcoinProductions?.productionLimitCount || 3; // Default to 3 if none found const hasManagementSkillSlots = this.profileHelper.hasEliteSkillLevel(SkillTypes.HIDEOUT_MANAGEMENT, pmcData); @@ -1062,11 +1061,11 @@ export class HideoutHelper // at level 1 you already get 0.5%, so it goes up until level 50. For some reason the wiki // says that it caps at level 51 with 25% but as per dump data that is incorrect apparently let roundedLevel = Math.floor(hideoutManagementSkill.Progress / 100); - roundedLevel = (roundedLevel === 51) ? roundedLevel - 1 : roundedLevel; + roundedLevel = roundedLevel === 51 ? roundedLevel - 1 : roundedLevel; - return (roundedLevel - * this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement - .ConsumptionReductionPerLevel) / 100; + return roundedLevel + * this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement + .ConsumptionReductionPerLevel / 100; } /** @@ -1088,9 +1087,9 @@ export class HideoutHelper // at level 1 you already get 0.5%, so it goes up until level 50. For some reason the wiki // says that it caps at level 51 with 25% but as per dump data that is incorrect apparently let roundedLevel = Math.floor(profileSkill.Progress / 100); - roundedLevel = (roundedLevel === 51) ? roundedLevel - 1 : roundedLevel; + roundedLevel = roundedLevel === 51 ? roundedLevel - 1 : roundedLevel; - return (roundedLevel * valuePerLevel) / 100; + return roundedLevel * valuePerLevel / 100; } /** @@ -1188,9 +1187,9 @@ export class HideoutHelper */ public unlockHideoutWallInProfile(pmcProfile: IPmcData): void { - const waterCollector = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WATER_COLLECTOR); - const medStation = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.MEDSTATION); - const wall = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.EMERGENCY_WALL); + const waterCollector = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WATER_COLLECTOR); + const medStation = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.MEDSTATION); + const wall = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.EMERGENCY_WALL); // No collector or med station, skip if (!(waterCollector && medStation)) @@ -1240,29 +1239,29 @@ export class HideoutHelper */ public applyPlaceOfFameDogtagBonus(pmcData: IPmcData): void { - const fameAreaProfile = pmcData.Hideout.Areas.find((area) => area.type === HideoutAreas.PLACE_OF_FAME); + const fameAreaProfile = pmcData.Hideout.Areas.find(area => area.type === HideoutAreas.PLACE_OF_FAME); // Get hideout area 16 bonus array - const fameAreaDb = this.databaseServer.getTables().hideout.areas.find((area) => - area.type === HideoutAreas.PLACE_OF_FAME + const fameAreaDb = this.databaseServer.getTables().hideout.areas.find(area => + area.type === HideoutAreas.PLACE_OF_FAME, ); // Get SkillGroupLevelingBoost object - const combatBoostBonusDb = fameAreaDb.stages[fameAreaProfile.level].bonuses.find((bonus) => - bonus.type === "SkillGroupLevelingBoost" + const combatBoostBonusDb = fameAreaDb.stages[fameAreaProfile.level].bonuses.find(bonus => + bonus.type === "SkillGroupLevelingBoost", ); // Get SkillGroupLevelingBoost object in profile - const combatBonusProfile = pmcData.Bonuses.find((bonus) => bonus.id === combatBoostBonusDb.id); + const combatBonusProfile = pmcData.Bonuses.find(bonus => bonus.id === combatBoostBonusDb.id); // Get all slotted dogtag items - const activeDogtags = pmcData.Inventory.items.filter((item) => item?.slotId?.startsWith("dogtag")); + const activeDogtags = pmcData.Inventory.items.filter(item => item?.slotId?.startsWith("dogtag")); // Calculate bonus percent (apply hideoutManagement bonus) const hideoutManagementSkill = this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.HIDEOUT_MANAGEMENT); - const hideoutManagementSkillBonusPercent = 1 + (hideoutManagementSkill.Progress / 10000); // 5100 becomes 0.51, add 1 to it, 1.51 + const hideoutManagementSkillBonusPercent = 1 + hideoutManagementSkill.Progress / 10000; // 5100 becomes 0.51, add 1 to it, 1.51 const bonus = this.getDogtagCombatSkillBonusPercent(pmcData, activeDogtags) - * hideoutManagementSkillBonusPercent; + * hideoutManagementSkillBonusPercent; // Update bonus value to above calcualted value combatBonusProfile.value = Number.parseFloat(bonus.toFixed(2)); diff --git a/project/src/helpers/HttpServerHelper.ts b/project/src/helpers/HttpServerHelper.ts index e0f6cadc..e07182e2 100644 --- a/project/src/helpers/HttpServerHelper.ts +++ b/project/src/helpers/HttpServerHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; diff --git a/project/src/helpers/InRaidHelper.ts b/project/src/helpers/InRaidHelper.ts index 8b7e39b3..353d07ac 100644 --- a/project/src/helpers/InRaidHelper.ts +++ b/project/src/helpers/InRaidHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; @@ -68,7 +67,7 @@ export class InRaidHelper */ public addUpdToMoneyFromRaid(items: Item[]): void { - for (const moneyItem of items.filter((item) => this.paymentHelper.isMoneyTpl(item._tpl))) + for (const moneyItem of items.filter(item => this.paymentHelper.isMoneyTpl(item._tpl))) { this.itemHelper.addUpdObjectToItem(moneyItem); @@ -204,12 +203,12 @@ export class InRaidHelper ): void { // Only copy active quests into scav profile // Progress will later to copied over to PMC profile - const existingActiveQuestIds = scavData.Quests?.filter((x) => x.status !== QuestStatus.AvailableForStart).map(( - x, - ) => x.qid); + const existingActiveQuestIds = scavData.Quests?.filter( + x => x.status !== QuestStatus.AvailableForStart, + ).map(x => x.qid); if (existingActiveQuestIds) { - scavData.Quests = saveProgressRequest.profile.Quests.filter((x) => existingActiveQuestIds.includes(x.qid)); + scavData.Quests = saveProgressRequest.profile.Quests.filter(x => existingActiveQuestIds.includes(x.qid)); } this.profileFixerService.checkForAndFixScavProfileIssues(scavData); @@ -244,7 +243,7 @@ export class InRaidHelper const postRaidQuestStatus = postRaidQuest.status; // Find matching pre-raid quest, skip if we can't - const preRaidQuest = preRaidQuests?.find((preRaidQuest) => preRaidQuest.qid === postRaidQuest.qid); + const preRaidQuest = preRaidQuests?.find(preRaidQuest => preRaidQuest.qid === postRaidQuest.qid); if (!preRaidQuest) { continue; @@ -299,8 +298,8 @@ export class InRaidHelper // Does failed quest have requirement to collect items from raid const questDbData = this.questHelper.getQuestFromDb(postRaidQuest.qid, pmcData); // AvailableForFinish - const matchingAffFindConditions = questDbData.conditions.AvailableForFinish.filter((condition) => - condition.conditionType === "FindItem" + const matchingAffFindConditions = questDbData.conditions.AvailableForFinish.filter(condition => + condition.conditionType === "FindItem", ); const itemsToCollect: string[] = []; if (matchingAffFindConditions) @@ -314,17 +313,17 @@ export class InRaidHelper // Remove quest items from profile as quest has failed and may still be alive // Required as restarting the quest from main menu does not remove value from CarriedQuestItems array - postRaidProfile.Stats.Eft.CarriedQuestItems = postRaidProfile.Stats.Eft.CarriedQuestItems.filter(( - carriedQuestItem, - ) => !itemsToCollect.includes(carriedQuestItem)); + postRaidProfile.Stats.Eft.CarriedQuestItems = postRaidProfile.Stats.Eft.CarriedQuestItems.filter( + carriedQuestItem => !itemsToCollect.includes(carriedQuestItem), + ); // Remove quest item from profile now quest is failed // updateProfileBaseStats() has already passed by ref EFT.Stats, all changes applied to postRaid profile also apply to server profile for (const itemTpl of itemsToCollect) { // Look for sessioncounter and remove it - const counterIndex = postRaidProfile.Stats.Eft.SessionCounters.Items.findIndex((x) => - x.Key.includes(itemTpl) && x.Key.includes("LootItem") + const counterIndex = postRaidProfile.Stats.Eft.SessionCounters.Items.findIndex(x => + x.Key.includes(itemTpl) && x.Key.includes("LootItem"), ); if (counterIndex > -1) { @@ -332,7 +331,7 @@ export class InRaidHelper } // Look for quest item and remove it - const inventoryItemIndex = postRaidProfile.Inventory.items.findIndex((x) => x._tpl === itemTpl); + const inventoryItemIndex = postRaidProfile.Inventory.items.findIndex(x => x._tpl === itemTpl); if (inventoryItemIndex > -1) { postRaidProfile.Inventory.items.splice(inventoryItemIndex, 1); @@ -456,9 +455,9 @@ export class InRaidHelper { // Has upd object + upd.SpawnedInSession property + not a quest item return "upd" in x && "SpawnedInSession" in x.upd - && !dbItems[x._tpl]._props.QuestItem - && !(this.inRaidConfig.keepFiRSecureContainerOnDeath - && this.itemHelper.itemIsInsideContainer(x, "SecuredContainer", postRaidProfile.Inventory.items)); + && !dbItems[x._tpl]._props.QuestItem + && !(this.inRaidConfig.keepFiRSecureContainerOnDeath + && this.itemHelper.itemIsInsideContainer(x, "SecuredContainer", postRaidProfile.Inventory.items)); }); for (const item of itemsToRemovePropertyFrom) @@ -503,7 +502,7 @@ export class InRaidHelper public deleteInventory(pmcData: IPmcData, sessionId: string): void { // Get inventory item ids to remove from players profile - const itemIdsToDeleteFromProfile = this.getInventoryItemsLostOnDeath(pmcData).map((item) => item._id); + const itemIdsToDeleteFromProfile = this.getInventoryItemsLostOnDeath(pmcData).map(item => item._id); for (const itemIdToDelete of itemIdsToDeleteFromProfile) { // Items inside containers are handled as part of function @@ -556,13 +555,13 @@ export class InRaidHelper */ protected getBaseItemsInRigPocketAndBackpack(pmcData: IPmcData): Item[] { - const rig = pmcData.Inventory.items.find((x) => x.slotId === "TacticalVest"); - const pockets = pmcData.Inventory.items.find((x) => x.slotId === "Pockets"); - const backpack = pmcData.Inventory.items.find((x) => x.slotId === "Backpack"); + const rig = pmcData.Inventory.items.find(x => x.slotId === "TacticalVest"); + const pockets = pmcData.Inventory.items.find(x => x.slotId === "Pockets"); + const backpack = pmcData.Inventory.items.find(x => x.slotId === "Backpack"); - const baseItemsInRig = pmcData.Inventory.items.filter((x) => x.parentId === rig?._id); - const baseItemsInPockets = pmcData.Inventory.items.filter((x) => x.parentId === pockets?._id); - const baseItemsInBackpack = pmcData.Inventory.items.filter((x) => x.parentId === backpack?._id); + const baseItemsInRig = pmcData.Inventory.items.filter(x => x.parentId === rig?._id); + const baseItemsInPockets = pmcData.Inventory.items.filter(x => x.parentId === pockets?._id); + const baseItemsInBackpack = pmcData.Inventory.items.filter(x => x.parentId === backpack?._id); return [...baseItemsInRig, ...baseItemsInPockets, ...baseItemsInBackpack]; } diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index d1752992..9dfd3a9b 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -12,8 +11,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Location, Upd } from "@spt-aki/models/eft/common/tables/IItem"; import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest"; import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData"; -import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject"; import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest"; +import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject"; import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData"; import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData"; import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData"; @@ -38,11 +37,11 @@ import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ - from: Item[]; + from: Item[] /** Inventory items at destination */ - to: Item[]; - sameInventory: boolean; - isMail: boolean; + to: Item[] + sameInventory: boolean + isMail: boolean } @injectable() @@ -306,7 +305,7 @@ export class InventoryHelper } catch (err) { - const errorText = (typeof err === "string") ? ` -> ${err}` : err.message; + const errorText = typeof err === "string" ? ` -> ${err}` : err.message; this.logger.error(`Unable to fit item into inventory: ${errorText}`); return false; @@ -354,7 +353,7 @@ export class InventoryHelper } catch (err) { - const errorText = (typeof err === "string") ? ` -> ${err}` : err.message; + const errorText = typeof err === "string" ? ` -> ${err}` : err.message; this.logger.error(this.localisationService.getText("inventory-fill_container_failed", errorText)); return; @@ -413,7 +412,7 @@ export class InventoryHelper } catch (err) { - const errorText = (typeof err === "string") ? ` -> ${err}` : err.message; + const errorText = typeof err === "string" ? ` -> ${err}` : err.message; this.logger.error(this.localisationService.getText("inventory-fill_container_failed", errorText)); this.httpResponse.appendErrorToOutput( @@ -522,10 +521,10 @@ export class InventoryHelper { let remainingCountOfItemToAdd = requestItem.count; const calc = requestItem.count - - (Math.floor(requestItem.count / itemDetails._props.StackMaxSize) - * itemDetails._props.StackMaxSize); + - Math.floor(requestItem.count / itemDetails._props.StackMaxSize) + * itemDetails._props.StackMaxSize; - maxStackCount = (calc > 0) + maxStackCount = calc > 0 ? maxStackCount + Math.floor(remainingCountOfItemToAdd / itemDetails._props.StackMaxSize) : Math.floor(remainingCountOfItemToAdd / itemDetails._props.StackMaxSize); @@ -598,7 +597,7 @@ export class InventoryHelper { // We expect that each inventory item and each insured item has unique "_id", respective "itemId". // Therefore we want to use a NON-Greedy function and escape the iteration as soon as we find requested item. - const inventoryIndex = inventoryItems.findIndex((item) => item._id === childId); + const inventoryIndex = inventoryItems.findIndex(item => item._id === childId); if (inventoryIndex > -1) { inventoryItems.splice(inventoryIndex, 1); @@ -611,7 +610,7 @@ export class InventoryHelper ); } - const insuredIndex = insuredItems.findIndex((item) => item.itemId === childId); + const insuredIndex = insuredItems.findIndex(item => item.itemId === childId); if (insuredIndex > -1) { insuredItems.splice(insuredIndex, 1); @@ -637,7 +636,7 @@ export class InventoryHelper const dialogs = Object.values(fullProfile.dialogues); for (const dialog of dialogs) { - const messageWithReward = dialog.messages.find((x) => x._id === removeRequest.fromOwner.id); + const messageWithReward = dialog.messages.find(x => x._id === removeRequest.fromOwner.id); if (messageWithReward) { // Find item + any possible children and remove them from mails items array @@ -909,14 +908,14 @@ export class InventoryHelper const tmpSize = this.getSizeByInventoryItemHash(item._tpl, item._id, inventoryItemHash); const iW = tmpSize[0]; // x const iH = tmpSize[1]; // y - const fH = - ((item.location as Location).r === 1 || (item.location as Location).r === "Vertical" - || (item.location as Location).rotation === "Vertical") + const fH + = (item.location as Location).r === 1 || (item.location as Location).r === "Vertical" + || (item.location as Location).rotation === "Vertical" ? iW : iH; - const fW = - ((item.location as Location).r === 1 || (item.location as Location).r === "Vertical" - || (item.location as Location).rotation === "Vertical") + const fW + = (item.location as Location).r === 1 || (item.location as Location).r === "Vertical" + || (item.location as Location).rotation === "Vertical" ? iH : iW; const fillTo = (item.location as Location).x + fW; @@ -973,10 +972,10 @@ export class InventoryHelper */ public getOwnerInventoryItems( request: - | IInventoryMoveRequestData - | IInventorySplitRequestData - | IInventoryMergeRequestData - | IInventoryTransferRequestData, + | IInventoryMoveRequestData + | IInventorySplitRequestData + | IInventoryMergeRequestData + | IInventoryTransferRequestData, sessionId: string, ): IOwnerInventoryItems { @@ -1079,7 +1078,7 @@ export class InventoryHelper protected getPlayerStashSize(sessionID: string): Record { const profile = this.profileHelper.getPmcProfile(sessionID); - const stashRowBonus = profile.Bonuses.find((bonus) => bonus.type === BonusType.STASH_ROWS); + const stashRowBonus = profile.Bonuses.find(bonus => bonus.type === BonusType.STASH_ROWS); // this sets automatically a stash size from items.json (its not added anywhere yet cause we still use base stash) const stashTPL = this.getStashType(sessionID); @@ -1119,7 +1118,7 @@ export class InventoryHelper protected getStashType(sessionID: string): string { const pmcData = this.profileHelper.getPmcProfile(sessionID); - const stashObj = pmcData.Inventory.items.find((item) => item._id === pmcData.Inventory.stash); + const stashObj = pmcData.Inventory.items.find(item => item._id === pmcData.Inventory.stash); if (!stashObj) { this.logger.error(this.localisationService.getText("inventory-unable_to_find_stash")); @@ -1141,7 +1140,7 @@ export class InventoryHelper const idsToMove = this.itemHelper.findAndReturnChildrenByItems(fromItems, body.item); for (const itemId of idsToMove) { - const itemToMove = fromItems.find((x) => x._id === itemId); + const itemToMove = fromItems.find(x => x._id === itemId); if (!itemToMove) { this.logger.error(`Unable to find item to move: ${itemId}`); @@ -1184,12 +1183,12 @@ export class InventoryHelper pmcData: IPmcData, inventoryItems: Item[], moveRequest: IInventoryMoveRequestData, - ): { success: boolean; errorMessage?: string; } + ): { success: boolean, errorMessage?: string } { this.handleCartridges(inventoryItems, moveRequest); // Find item we want to 'move' - const matchingInventoryItem = inventoryItems.find((x) => x._id === moveRequest.item); + const matchingInventoryItem = inventoryItems.find(x => x._id === moveRequest.item); if (!matchingInventoryItem) { const errorMesage = `Unable to move item: ${moveRequest.item}, cannot find in inventory`; @@ -1249,7 +1248,7 @@ export class InventoryHelper if (pmcData.Inventory.fastPanel[itemKey] === itemBeingMoved._id) { // Get moved items parent - const itemParent = pmcData.Inventory.items.find((x) => x._id === itemBeingMoved.parentId); + const itemParent = pmcData.Inventory.items.find(x => x._id === itemBeingMoved.parentId); // Empty out id if item is moved to a container other than pocket/rig if (itemParent && !(itemParent.slotId?.startsWith("Pockets") || itemParent.slotId === "TacticalVest")) @@ -1318,7 +1317,7 @@ export class InventoryHelper return true; } - container = pmcData.Inventory.items.find((item) => item._id === container.parentId); + container = pmcData.Inventory.items.find(item => item._id === container.parentId); if (!container) { break; @@ -1332,7 +1331,7 @@ namespace InventoryHelper { export interface InventoryItemHash { - byItemId: Record; - byParentId: Record; + byItemId: Record + byParentId: Record } } diff --git a/project/src/helpers/ItemHelper.ts b/project/src/helpers/ItemHelper.ts index 5e02874c..9e00536f 100644 --- a/project/src/helpers/ItemHelper.ts +++ b/project/src/helpers/ItemHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; @@ -67,7 +66,7 @@ export class ItemHelper } for (const itemOf1 of item1) { - const itemOf2 = item2.find((i2) => i2._tpl === itemOf1._tpl); + const itemOf2 = item2.find(i2 => i2._tpl === itemOf1._tpl); if (itemOf2 === undefined) { return false; @@ -97,8 +96,8 @@ export class ItemHelper if (compareUpdProperties) { - return Array.from(compareUpdProperties.values()).every((p) => - this.compareUtil.recursiveCompare(item1.upd?.[p], item2.upd?.[p]) + return Array.from(compareUpdProperties.values()).every(p => + this.compareUtil.recursiveCompare(item1.upd?.[p], item2.upd?.[p]), ); } @@ -194,10 +193,10 @@ export class ItemHelper } return !itemDetails[1]._props.QuestItem - && itemDetails[1]._type === "Item" - && baseTypes.every((x) => !this.isOfBaseclass(tpl, x)) - && this.getItemPrice(tpl) > 0 - && !this.itemFilterService.isItemBlacklisted(tpl); + && itemDetails[1]._type === "Item" + && baseTypes.every(x => !this.isOfBaseclass(tpl, x)) + && this.getItemPrice(tpl) > 0 + && !this.itemFilterService.isItemBlacklisted(tpl); } /** @@ -247,7 +246,7 @@ export class ItemHelper return false; } - return (this.armorItemHasRemovablePlateSlots(itemTpl) || this.itemRequiresSoftInserts(itemTpl)); + return this.armorItemHasRemovablePlateSlots(itemTpl) || this.itemRequiresSoftInserts(itemTpl); } /** @@ -260,7 +259,7 @@ export class ItemHelper const itemTemplate = this.getItem(itemTpl); const plateSlotIds = this.getRemovablePlateSlotIds(); - return itemTemplate[1]._props.Slots.some((slot) => plateSlotIds.includes(slot._name.toLowerCase())); + return itemTemplate[1]._props.Slots.some(slot => plateSlotIds.includes(slot._name.toLowerCase())); } /** @@ -291,7 +290,7 @@ export class ItemHelper // Check if item has slots that match soft insert name ids const softInsertIds = this.getSoftInsertSlotIds(); - if (itemDbDetails[1]._props.Slots.find((slot) => softInsertIds.includes(slot._name.toLowerCase()))) + if (itemDbDetails[1]._props.Slots.find(slot => softInsertIds.includes(slot._name.toLowerCase()))) { return true; } @@ -493,12 +492,12 @@ export class ItemHelper if (item.upd) { - const medkit = (item.upd.MedKit) ? item.upd.MedKit : null; - const repairable = (item.upd.Repairable) ? item.upd.Repairable : null; - const foodDrink = (item.upd.FoodDrink) ? item.upd.FoodDrink : null; - const key = (item.upd.Key) ? item.upd.Key : null; - const resource = (item.upd.Resource) ? item.upd.Resource : null; - const repairKit = (item.upd.RepairKit) ? item.upd.RepairKit : null; + const medkit = item.upd.MedKit ? item.upd.MedKit : null; + const repairable = item.upd.Repairable ? item.upd.Repairable : null; + const foodDrink = item.upd.FoodDrink ? item.upd.FoodDrink : null; + const key = item.upd.Key ? item.upd.Key : null; + const resource = item.upd.Resource ? item.upd.Resource : null; + const repairKit = item.upd.RepairKit ? item.upd.RepairKit : null; const itemDetails = this.getItem(item._tpl)[1]; @@ -564,7 +563,7 @@ export class ItemHelper } // Attempt to get the max durability from _props. If not available, use Repairable max durability value instead. - const maxDurability = (itemDetails._props.MaxDurability) + const maxDurability = itemDetails._props.MaxDurability ? itemDetails._props.MaxDurability : repairable.MaxDurability; const durability = repairable.Durability / maxDurability; @@ -628,7 +627,7 @@ export class ItemHelper } // Items parentid matches root item AND returned items doesnt contain current child - if (childItem.parentId === baseItemId && !list.find((item) => childItem._id === item._id)) + if (childItem.parentId === baseItemId && !list.find(item => childItem._id === item._id)) { list.push(...this.findAndReturnChildrenAsItems(items, childItem._id)); } @@ -649,7 +648,7 @@ export class ItemHelper for (const itemFromAssort of assort) { - if (itemFromAssort.parentId === itemIdToFind && !list.find((item) => itemFromAssort._id === item._id)) + if (itemFromAssort.parentId === itemIdToFind && !list.find(item => itemFromAssort._id === item._id)) { list.push(itemFromAssort); list = list.concat(this.findAndReturnChildrenByAssort(itemFromAssort._id, assort)); @@ -806,7 +805,7 @@ export class ItemHelper { const filterResult = itemsToSearch.filter((item) => { - return by === "tpl" ? (item._tpl === barterId) : (item._id === barterId); + return by === "tpl" ? item._tpl === barterId : item._id === barterId; }); matchingItems.push(...filterResult); @@ -845,7 +844,7 @@ export class ItemHelper if (pmcData !== null) { // Insured items should not be renamed. Only works for PMCs. - if (insuredItems?.find((insuredItem) => insuredItem.itemId === item._id)) + if (insuredItems?.find(insuredItem => insuredItem.itemId === item._id)) { continue; } @@ -1053,8 +1052,8 @@ export class ItemHelper let isRequiredSlot = false; if (parentTemplate[0] && parentTemplate[1]?._props?.Slots) { - isRequiredSlot = parentTemplate[1]._props.Slots.some((slot) => - slot._name === item.slotId && slot._required + isRequiredSlot = parentTemplate[1]._props.Slots.some(slot => + slot._name === item.slotId && slot._required, ); } @@ -1099,11 +1098,11 @@ export class ItemHelper */ public isAttachmentAttached(item: Item): boolean { - const equipmentSlots = Object.values(EquipmentSlots).map((value) => value as string); + const equipmentSlots = Object.values(EquipmentSlots).map(value => value as string); return !(["hideout", "main"].includes(item.slotId) - || equipmentSlots.includes(item.slotId) - || !Number.isNaN(Number(item.slotId))); + || equipmentSlots.includes(item.slotId) + || !Number.isNaN(Number(item.slotId))); } /** @@ -1124,7 +1123,7 @@ export class ItemHelper public getEquipmentParent(itemId: string, itemsMap: Map): Item | null { let currentItem = itemsMap.get(itemId); - const equipmentSlots = Object.values(EquipmentSlots).map((value) => value as string); + const equipmentSlots = Object.values(EquipmentSlots).map(value => value as string); while (currentItem && !equipmentSlots.includes(currentItem.slotId)) { @@ -1145,7 +1144,7 @@ export class ItemHelper */ public getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize { - const rootTemplate = this.getItem(items.filter((x) => x._id === rootItemId)[0]._tpl)[1]; + const rootTemplate = this.getItem(items.filter(x => x._id === rootItemId)[0]._tpl)[1]; const width = rootTemplate._props.Width; const height = rootTemplate._props.Height; @@ -1220,7 +1219,7 @@ export class ItemHelper const cartridgeMaxStackSize = cartridgeDetails[1]._props.StackMaxSize; // Exit if ammo already exists in box - if (ammoBox.find((item) => item._tpl === cartridgeTpl)) + if (ammoBox.find(item => item._tpl === cartridgeTpl)) { return; } @@ -1234,7 +1233,7 @@ export class ItemHelper while (currentStoredCartridgeCount < ammoBoxMaxCartridgeCount) { const remainingSpace = ammoBoxMaxCartridgeCount - currentStoredCartridgeCount; - const cartridgeCountToAdd = (remainingSpace < maxPerStack) ? remainingSpace : maxPerStack; + const cartridgeCountToAdd = remainingSpace < maxPerStack ? remainingSpace : maxPerStack; // Add cartridge item into items array const cartridgeItemToAdd = this.createCartridges( @@ -1288,7 +1287,7 @@ export class ItemHelper public itemIsInsideContainer(item: Item, desiredContainerSlotId: string, items: Item[]): boolean { // Get items parent - const parent = items.find((x) => x._id === item.parentId); + const parent = items.find(x => x._id === item.parentId); if (!parent) { // No parent, end of line, not inside container @@ -1364,7 +1363,7 @@ export class ItemHelper const cartridgeMaxStackSize = cartridgeDetails[1]._props.StackMaxSize; // Get max number of cartridges in magazine, choose random value between min/max - const magazineCartridgeMaxCount = (this.isOfBaseclass(magTemplate._id, BaseClasses.SPRING_DRIVEN_CYLINDER)) + const magazineCartridgeMaxCount = this.isOfBaseclass(magTemplate._id, BaseClasses.SPRING_DRIVEN_CYLINDER) ? magTemplate._props.Slots.length // Edge case for rotating grenade launcher magazine : magTemplate._props.Cartridges[0]?._max_count; @@ -1393,7 +1392,7 @@ export class ItemHelper while (currentStoredCartridgeCount < desiredStackCount) { // Get stack size of cartridges - let cartridgeCountToAdd = (desiredStackCount <= cartridgeMaxStackSize) + let cartridgeCountToAdd = desiredStackCount <= cartridgeMaxStackSize ? desiredStackCount : cartridgeMaxStackSize; @@ -1437,7 +1436,7 @@ export class ItemHelper const calibers = [ ...new Set( ammoTpls.filter((x: string) => this.getItem(x)[0]).map((x: string) => - this.getItem(x)[1]._props.Caliber + this.getItem(x)[1]._props.Caliber, ), ), ]; @@ -1554,9 +1553,9 @@ export class ItemHelper public getItemTplsOfBaseType(desiredBaseType: string): string[] { - return Object.values(this.databaseServer.getTables().templates.items).filter((x) => - x._parent === desiredBaseType - ).map((x) => x._id); + return Object.values(this.databaseServer.getTables().templates.items).filter(x => + x._parent === desiredBaseType, + ).map(x => x._id); } /** @@ -1770,7 +1769,7 @@ export class ItemHelper for (const item of items) { // Check if the item's parent exists. - const parentExists = items.some((parentItem) => parentItem._id === item.parentId); + const parentExists = items.some(parentItem => parentItem._id === item.parentId); // If the parent does not exist and the item is not already a 'hideout' item, adopt the orphaned item by // setting the parent ID to the PMCs inventory equipment ID, the slot ID to 'hideout', and remove the location. @@ -1829,7 +1828,7 @@ namespace ItemHelper { export interface ItemSize { - width: number; - height: number; + width: number + height: number } } diff --git a/project/src/helpers/NotificationSendHelper.ts b/project/src/helpers/NotificationSendHelper.ts index 6fc23b2e..0600d8ad 100644 --- a/project/src/helpers/NotificationSendHelper.ts +++ b/project/src/helpers/NotificationSendHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfile"; import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; @@ -85,7 +84,7 @@ export class NotificationSendHelper protected getDialog(sessionId: string, messageType: MessageType, senderDetails: IUserDialogInfo): Dialogue { // Use trader id if sender is trader, otherwise use nickname - const key = (senderDetails.Info.MemberCategory === MemberCategory.TRADER) + const key = senderDetails.Info.MemberCategory === MemberCategory.TRADER ? senderDetails._id : senderDetails.Info.Nickname; const dialogueData = this.saveServer.getProfile(sessionId).dialogues; @@ -102,7 +101,7 @@ export class NotificationSendHelper pinned: false, new: 0, attachmentsNew: 0, - Users: (senderDetails.Info.MemberCategory === MemberCategory.TRADER) ? undefined : [senderDetails], + Users: senderDetails.Info.MemberCategory === MemberCategory.TRADER ? undefined : [senderDetails], }; dialogueData[key] = dialogue; diff --git a/project/src/helpers/NotifierHelper.ts b/project/src/helpers/NotifierHelper.ts index a32e24f8..287a3982 100644 --- a/project/src/helpers/NotifierHelper.ts +++ b/project/src/helpers/NotifierHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; diff --git a/project/src/helpers/PaymentHelper.ts b/project/src/helpers/PaymentHelper.ts index 909dceb9..48f88ec2 100644 --- a/project/src/helpers/PaymentHelper.ts +++ b/project/src/helpers/PaymentHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { Money } from "@spt-aki/models/enums/Money"; import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig"; @@ -22,8 +21,8 @@ export class PaymentHelper */ public isMoneyTpl(tpl: string): boolean { - return [Money.DOLLARS, Money.EUROS, Money.ROUBLES, ...this.inventoryConfig.customMoneyTpls].some((element) => - element === tpl + return [Money.DOLLARS, Money.EUROS, Money.ROUBLES, ...this.inventoryConfig.customMoneyTpls].some(element => + element === tpl, ); } diff --git a/project/src/helpers/PresetHelper.ts b/project/src/helpers/PresetHelper.ts index d7149fc1..19eef6aa 100644 --- a/project/src/helpers/PresetHelper.ts +++ b/project/src/helpers/PresetHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -45,15 +44,19 @@ export class PresetHelper { if (!this.defaultWeaponPresets) { - this.defaultWeaponPresets = Object.values(this.databaseServer.getTables().globals.ItemPresets).filter(( - preset, - ) => preset._encyclopedia !== undefined - && this.itemHelper.isOfBaseclass(preset._encyclopedia, BaseClasses.WEAPON) - ).reduce((acc, cur) => - { - acc[cur._id] = cur; - return acc; - }, {}); + this.defaultWeaponPresets = Object.values( + this.databaseServer.getTables().globals.ItemPresets, + ) + .filter( + preset => + preset._encyclopedia !== undefined + && this.itemHelper.isOfBaseclass(preset._encyclopedia, BaseClasses.WEAPON), + ) + .reduce((acc, cur) => + { + acc[cur._id] = cur; + return acc; + }, {}); } return this.defaultWeaponPresets; @@ -67,9 +70,7 @@ export class PresetHelper { if (!this.defaultEquipmentPresets) { - this.defaultEquipmentPresets = Object.values(this.databaseServer.getTables().globals.ItemPresets).filter(( - preset, - ) => preset._encyclopedia !== undefined && this.itemHelper.armorItemCanHoldMods(preset._encyclopedia)) + this.defaultEquipmentPresets = Object.values(this.databaseServer.getTables().globals.ItemPresets).filter(preset => preset._encyclopedia !== undefined && this.itemHelper.armorItemCanHoldMods(preset._encyclopedia)) .reduce((acc, cur) => { acc[cur._id] = cur; @@ -183,7 +184,7 @@ export class PresetHelper const defaultPreset = this.getDefaultPreset(tpl); // Bundle up tpls we want price for - const tpls = defaultPreset ? defaultPreset._items.map((item) => item._tpl) : [tpl]; + const tpls = defaultPreset ? defaultPreset._items.map(item => item._tpl) : [tpl]; // Get price of tpls return this.itemHelper.getItemAndChildrenPrice(tpls); diff --git a/project/src/helpers/ProbabilityHelper.ts b/project/src/helpers/ProbabilityHelper.ts index f2815447..abca707b 100644 --- a/project/src/helpers/ProbabilityHelper.ts +++ b/project/src/helpers/ProbabilityHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -20,6 +19,6 @@ export class ProbabilityHelper */ public rollChance(chance: number, scale = 1): boolean { - return (this.randomUtil.getInt(1, 100 * scale) / (1 * scale)) <= chance; + return this.randomUtil.getInt(1, 100 * scale) / (1 * scale) <= chance; } } diff --git a/project/src/helpers/ProfileHelper.ts b/project/src/helpers/ProfileHelper.ts index 2ecdb3e8..102519d6 100644 --- a/project/src/helpers/ProfileHelper.ts +++ b/project/src/helpers/ProfileHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase"; @@ -53,7 +52,7 @@ export class ProfileHelper for (const questId in questConditionId) { const conditionId = questConditionId[questId]; - const profileQuest = pmcData.Quests.find((x) => x.qid === questId); + const profileQuest = pmcData.Quests.find(x => x.qid === questId); // Find index of condition in array const index = profileQuest.completedConditions.indexOf(conditionId); @@ -173,7 +172,7 @@ export class ProfileHelper protected profileHasInfoProperty(profile: IAkiProfile): boolean { - return !!(profile?.characters?.pmc?.Info); + return !!profile?.characters?.pmc?.Info; } protected stringsMatch(stringA: string, stringB: string): boolean @@ -340,7 +339,7 @@ export class ProfileHelper public removeSecureContainer(profile: IPmcData): IPmcData { const items = profile.Inventory.items; - const secureContainer = items.find((x) => x.slotId === "SecuredContainer"); + const secureContainer = items.find(x => x.slotId === "SecuredContainer"); if (secureContainer) { // Find and remove container + children @@ -350,7 +349,7 @@ export class ProfileHelper ); // Remove child items + secure container - profile.Inventory.items = items.filter((x) => !childItemsInSecureContainer.includes(x._id)); + profile.Inventory.items = items.filter(x => !childItemsInSecureContainer.includes(x._id)); } return profile; @@ -394,7 +393,7 @@ export class ProfileHelper return false; } - return !!profile.aki.receivedGifts.find((x) => x.giftId === giftId); + return !!profile.aki.receivedGifts.find(x => x.giftId === giftId); } /** @@ -404,7 +403,7 @@ export class ProfileHelper */ public incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void { - const stat = counters.find((x) => x.Key.includes(keyToIncrement)); + const stat = counters.find(x => x.Key.includes(keyToIncrement)); if (stat) { stat.Value++; @@ -425,7 +424,7 @@ export class ProfileHelper return false; } - const profileSkill = profileSkills.find((x) => x.Id === skillType); + const profileSkill = profileSkills.find(x => x.Id === skillType); if (!profileSkill) { this.logger.warning(`Unable to check for elite skill ${skillType}, not found in profile`); @@ -467,7 +466,7 @@ export class ProfileHelper return; } - const profileSkill = profileSkills.find((profileSkill) => profileSkill.Id === skill); + const profileSkill = profileSkills.find(profileSkill => profileSkill.Id === skill); if (!profileSkill) { this.logger.error(this.localisationService.getText("quest-no_skill_found", skill)); @@ -500,7 +499,7 @@ export class ProfileHelper */ public getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common { - const skillToReturn = pmcData.Skills.Common.find((commonSkill) => commonSkill.Id === skill); + const skillToReturn = pmcData.Skills.Common.find(commonSkill => commonSkill.Id === skill); if (!skillToReturn) { this.logger.warning(`Profile ${pmcData.sessionId} does not have a skill named: ${skill}`); @@ -528,7 +527,7 @@ export class ProfileHelper public addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void { const profile = this.getPmcProfile(sessionId); - const existingBonus = profile.Bonuses.find((bonus) => bonus.type === BonusType.STASH_ROWS); + const existingBonus = profile.Bonuses.find(bonus => bonus.type === BonusType.STASH_ROWS); if (!existingBonus) { profile.Bonuses.push({ diff --git a/project/src/helpers/QuestConditionHelper.ts b/project/src/helpers/QuestConditionHelper.ts index 0e0b2548..83892dea 100644 --- a/project/src/helpers/QuestConditionHelper.ts +++ b/project/src/helpers/QuestConditionHelper.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { IQuestCondition } from "@spt-aki/models/eft/common/tables/IQuest"; @injectable() diff --git a/project/src/helpers/QuestHelper.ts b/project/src/helpers/QuestHelper.ts index 2291f8c7..05febcea 100644 --- a/project/src/helpers/QuestHelper.ts +++ b/project/src/helpers/QuestHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; @@ -70,7 +69,7 @@ export class QuestHelper */ public getQuestStatus(pmcData: IPmcData, questId: string): QuestStatus { - const quest = pmcData.Quests?.find((q) => q.qid === questId); + const quest = pmcData.Quests?.find(q => q.qid === questId); return quest ? quest.status : QuestStatus.Locked; } @@ -151,7 +150,7 @@ export class QuestHelper } // This calculates how much progress we have in the skill's starting level - let startingLevelProgress = (profileSkill.Progress % 100) * ((currentLevel + 1) / 10); + let startingLevelProgress = profileSkill.Progress % 100 * ((currentLevel + 1) / 10); // The code below assumes a 1/10th progress skill amount let remainingProgress = progressAmount / 10; @@ -162,10 +161,10 @@ export class QuestHelper while (remainingProgress > 0 && currentLevel < 9) { // Calculate how much progress to add, limiting it to the current level max progress - const currentLevelRemainingProgress = ((currentLevel + 1) * 10) - startingLevelProgress; + const currentLevelRemainingProgress = (currentLevel + 1) * 10 - startingLevelProgress; this.logger.debug(`currentLevelRemainingProgress: ${currentLevelRemainingProgress}`); const progressToAdd = Math.min(remainingProgress, currentLevelRemainingProgress); - const adjustedProgressToAdd = (10 / (currentLevel + 1)) * progressToAdd; + const adjustedProgressToAdd = 10 / (currentLevel + 1) * progressToAdd; this.logger.debug(`Progress To Add: ${progressToAdd} Adjusted for level: ${adjustedProgressToAdd}`); // Add the progress amount adjusted by level @@ -289,9 +288,9 @@ export class QuestHelper if (rewardItem._id === questReward.target) { // Is base reward item if ( - (rewardItem.parentId !== undefined) && (rewardItem.parentId === "hideout") // Has parentId of hideout - && (rewardItem.upd !== undefined) && (rewardItem.upd.StackObjectsCount !== undefined) // Has upd with stackobject count - && (rewardItem.upd.StackObjectsCount > 1) // More than 1 item in stack + rewardItem.parentId !== undefined && rewardItem.parentId === "hideout" // Has parentId of hideout + && rewardItem.upd !== undefined && rewardItem.upd.StackObjectsCount !== undefined // Has upd with stackobject count + && rewardItem.upd.StackObjectsCount > 1 // More than 1 item in stack ) { rewardItem.upd.StackObjectsCount = 1; @@ -354,7 +353,7 @@ export class QuestHelper questReward.items = presetAndMods; // Find root item and set its stack count - const rootItem = questReward.items.find((item) => item._id === newRootId); + const rootItem = questReward.items.find(item => item._id === newRootId); // Remap target id to the new presets root id questReward.target = rootItem._id; @@ -386,7 +385,7 @@ export class QuestHelper { // Iterate over all rewards with the desired status, flatten out items that have a type of Item const questRewards = quest.rewards[QuestStatus[status]].flatMap((reward: IQuestReward) => - reward.type === "Item" ? this.processReward(reward) : [] + reward.type === "Item" ? this.processReward(reward) : [], ); return questRewards; @@ -405,7 +404,7 @@ export class QuestHelper ): IQuestStatus { const currentTimestamp = this.timeUtil.getTimestamp(); - const existingQuest = pmcData.Quests.find((q) => q.qid === acceptedQuest.qid); + const existingQuest = pmcData.Quests.find(q => q.qid === acceptedQuest.qid); if (existingQuest) { // Quest exists, update its status @@ -437,7 +436,7 @@ export class QuestHelper this.logger.error(`Quest: ${acceptedQuest.qid} of type: ${acceptedQuest.type} not found`); } - const waitTime = questDbData?.conditions.AvailableForStart.find((x) => x.availableAfter > 0); + const waitTime = questDbData?.conditions.AvailableForStart.find(x => x.availableAfter > 0); if (waitTime && acceptedQuest.type !== "repeatable") { // Quest should be put into 'pending' state @@ -464,7 +463,7 @@ export class QuestHelper { // Get quest acceptance data from profile const profile: IPmcData = this.profileHelper.getPmcProfile(sessionID); - const startedQuestInProfile = profile.Quests.find((profileQuest) => profileQuest.qid === startedQuestId); + const startedQuestInProfile = profile.Quests.find(profileQuest => profileQuest.qid === startedQuestId); // Get quests that const eligibleQuests = this.getQuestsFromDb().filter((quest) => @@ -474,8 +473,8 @@ export class QuestHelper const acceptedQuestCondition = quest.conditions.AvailableForStart.find((x) => { return x.conditionType === "Quest" - && x.target?.includes(startedQuestId) - && x.status?.includes(QuestStatus.Started); + && x.target?.includes(startedQuestId) + && x.status?.includes(QuestStatus.Started); }); // Not found, skip quest @@ -514,7 +513,7 @@ export class QuestHelper // Include if quest found in profile and is started or ready to hand in return startedQuestInProfile - && ([QuestStatus.Started, QuestStatus.AvailableForFinish].includes(startedQuestInProfile.status)); + && [QuestStatus.Started, QuestStatus.AvailableForFinish].includes(startedQuestInProfile.status); }); return this.getQuestsWithOnlyLevelRequirementStartCondition(eligibleQuests); @@ -552,15 +551,15 @@ export class QuestHelper public failedUnlocked(failedQuestId: string, sessionId: string): IQuest[] { const profile = this.profileHelper.getPmcProfile(sessionId); - const profileQuest = profile.Quests.find((x) => x.qid === failedQuestId); + const profileQuest = profile.Quests.find(x => x.qid === failedQuestId); const quests = this.getQuestsFromDb().filter((q) => { const acceptedQuestCondition = q.conditions.AvailableForStart.find((c) => { return c.conditionType === "Quest" - && c.target.includes(failedQuestId) - && c.status[0] === QuestStatus.Fail; + && c.target.includes(failedQuestId) + && c.status[0] === QuestStatus.Fail; }); if (!acceptedQuestCondition) @@ -568,7 +567,7 @@ export class QuestHelper return false; } - return profileQuest && (profileQuest.status === QuestStatus.Fail); + return profileQuest && profileQuest.status === QuestStatus.Fail; }); if (quests.length === 0) @@ -622,7 +621,7 @@ export class QuestHelper output: IItemEventRouterResponse, ): void { - const inventoryItemIndex = pmcData.Inventory.items.findIndex((item) => item._id === itemId); + const inventoryItemIndex = pmcData.Inventory.items.findIndex(item => item._id === itemId); if (inventoryItemIndex < 0) { this.logger.error(this.localisationService.getText("quest-item_not_found_in_inventory", itemId)); @@ -693,8 +692,8 @@ export class QuestHelper public getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest { const updatedQuest = this.jsonUtil.clone(quest); - updatedQuest.conditions.AvailableForStart = updatedQuest.conditions.AvailableForStart.filter((q) => - q.conditionType === "Level" + updatedQuest.conditions.AvailableForStart = updatedQuest.conditions.AvailableForStart.filter(q => + q.conditionType === "Level", ); return updatedQuest; @@ -735,9 +734,9 @@ export class QuestHelper const quest = this.getQuestFromDb(failRequest.qid, pmcData); // Merge all daily/weekly/scav daily quests into one array and look for the matching quest by id - const matchingRepeatableQuest = pmcData.RepeatableQuests.flatMap((repeatableType) => - repeatableType.activeQuests - ).find((activeQuest) => activeQuest._id === failRequest.qid); + const matchingRepeatableQuest = pmcData.RepeatableQuests.flatMap(repeatableType => + repeatableType.activeQuests, + ).find(activeQuest => activeQuest._id === failRequest.qid); // Quest found and no repeatable found if (quest && !matchingRepeatableQuest) @@ -784,7 +783,7 @@ export class QuestHelper // Check daily/weekly objects for (const repeatableType of pmcData.RepeatableQuests) { - quest = repeatableType.activeQuests.find((x) => x._id === questId); + quest = repeatableType.activeQuests.find(x => x._id === questId); if (quest) { break; @@ -836,7 +835,7 @@ export class QuestHelper public updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void { // Find quest in profile, update status to desired status - const questToUpdate = pmcData.Quests.find((quest) => quest.qid === questId); + const questToUpdate = pmcData.Quests.find(quest => quest.qid === questId); if (questToUpdate) { questToUpdate.status = newQuestState; @@ -852,7 +851,7 @@ export class QuestHelper */ public resetQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void { - const questToUpdate = pmcData.Quests.find((quest) => quest.qid === questId); + const questToUpdate = pmcData.Quests.find(quest => quest.qid === questId); if (questToUpdate) { const currentTimestamp = this.timeUtil.getTimestamp(); @@ -995,10 +994,10 @@ export class QuestHelper { // Get hideout crafts and find those that match by areatype/required level/end product tpl - hope for just one match const hideoutProductions = this.databaseServer.getTables().hideout.production; - const matchingProductions = hideoutProductions.filter((x) => + const matchingProductions = hideoutProductions.filter(x => x.areaType === Number.parseInt(craftUnlockReward.traderId) - && x.requirements.some((x) => x.requiredLevel === craftUnlockReward.loyaltyLevel) - && x.endProduct === craftUnlockReward.items[0]._tpl + && x.requirements.some(x => x.requiredLevel === craftUnlockReward.loyaltyLevel) + && x.endProduct === craftUnlockReward.items[0]._tpl, ); // More/less than 1 match, above filtering wasn't strict enough @@ -1028,7 +1027,7 @@ export class QuestHelper protected getQuestMoneyRewardBonus(pmcData: IPmcData): number { // Check player has intel center - const moneyRewardBonuses = pmcData.Bonuses.filter((x) => x.type === "QuestMoneyReward"); + const moneyRewardBonuses = pmcData.Bonuses.filter(x => x.type === "QuestMoneyReward"); if (!moneyRewardBonuses) { return 0; @@ -1041,7 +1040,7 @@ export class QuestHelper const hideoutManagementSkill = this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.HIDEOUT_MANAGEMENT); if (hideoutManagementSkill) { - moneyRewardBonus *= 1 + (hideoutManagementSkill.Progress / 10000); // 5100 becomes 0.51, add 1 to it, 1.51, multiply the moneyreward bonus by it (e.g. 15 x 51) + moneyRewardBonus *= 1 + hideoutManagementSkill.Progress / 10000; // 5100 becomes 0.51, add 1 to it, 1.51, multiply the moneyreward bonus by it (e.g. 15 x 51) } return moneyRewardBonus; @@ -1062,15 +1061,15 @@ export class QuestHelper const result: Record = {}; for (const questId of questIds) { - const questInDb = allQuests.find((x) => x._id === questId); + const questInDb = allQuests.find(x => x._id === questId); if (!questInDb) { this.logger.debug(`Unable to find quest: ${questId} in db, cannot get 'FindItem' condition, skipping`); continue; } - const condition = questInDb.conditions.AvailableForFinish.find((c) => - c.conditionType === "FindItem" && c?.target?.includes(itemTpl) + const condition = questInDb.conditions.AvailableForFinish.find(c => + c.conditionType === "FindItem" && c?.target?.includes(itemTpl), ); if (condition) { @@ -1096,7 +1095,7 @@ export class QuestHelper { // Quest from db matches quests in profile, skip const questData = quests[questIdKey]; - if (pmcProfile.Quests.find((x) => x.qid === questData._id)) + if (pmcProfile.Quests.find(x => x.qid === questData._id)) { continue; } @@ -1116,10 +1115,10 @@ export class QuestHelper availableAfter: 0, }; - if (pmcProfile.Quests.some((x) => x.qid === questIdKey)) + if (pmcProfile.Quests.some(x => x.qid === questIdKey)) { // Update existing - const existingQuest = pmcProfile.Quests.find((x) => x.qid === questIdKey); + const existingQuest = pmcProfile.Quests.find(x => x.qid === questIdKey); existingQuest.status = questRecordToAdd.status; existingQuest.statusTimers = questRecordToAdd.statusTimers; } @@ -1133,7 +1132,7 @@ export class QuestHelper public findAndRemoveQuestFromArrayIfExists(questId: string, quests: IQuestStatus[]): void { - const pmcQuestToReplaceStatus = quests.find((quest) => quest.qid === questId); + const pmcQuestToReplaceStatus = quests.find(quest => quest.qid === questId); if (pmcQuestToReplaceStatus) { quests.splice(quests.indexOf(pmcQuestToReplaceStatus), 1); @@ -1156,7 +1155,7 @@ export class QuestHelper return false; } - return quest.conditions.Fail.some((condition) => condition.target?.includes(completedQuestId)); + return quest.conditions.Fail.some(condition => condition.target?.includes(completedQuestId)); }); } } diff --git a/project/src/helpers/RagfairHelper.ts b/project/src/helpers/RagfairHelper.ts index b35f0e4b..1e443942 100644 --- a/project/src/helpers/RagfairHelper.ts +++ b/project/src/helpers/RagfairHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; @@ -157,7 +156,7 @@ export class RagfairHelper for (let item of items) { item = this.itemHelper.fixItemStackCount(item); - const isChild = items.find((it) => it._id === item.parentId); + const isChild = items.find(it => it._id === item.parentId); if (!isChild) { diff --git a/project/src/helpers/RagfairOfferHelper.ts b/project/src/helpers/RagfairOfferHelper.ts index 1c18ae2a..1b6f7784 100644 --- a/project/src/helpers/RagfairOfferHelper.ts +++ b/project/src/helpers/RagfairOfferHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -186,7 +185,7 @@ export class RagfairOfferHelper const lockedOffers = this.getLoyaltyLockedOffers(possibleOffers, pmcData); // Exclude locked offers + above loyalty locked offers if at least 1 was found - const availableOffers = possibleOffers.filter((x) => !(x.locked || lockedOffers.includes(x._id))); + const availableOffers = possibleOffers.filter(x => !(x.locked || lockedOffers.includes(x._id))); if (availableOffers.length > 0) { possibleOffers = availableOffers; @@ -221,8 +220,8 @@ export class RagfairOfferHelper */ public traderOfferItemQuestLocked(offer: IRagfairOffer, traderAssorts: Record): boolean { - return offer.items?.some((i) => - traderAssorts[offer.user.id].barter_scheme[i._id]?.some((bs1) => bs1?.some((bs2) => bs2.sptQuestLocked)) + return offer.items?.some(i => + traderAssorts[offer.user.id].barter_scheme[i._id]?.some(bs1 => bs1?.some(bs2 => bs2.sptQuestLocked)), ); } @@ -249,7 +248,7 @@ export class RagfairOfferHelper protected traderBuyRestrictionReached(offer: IRagfairOffer): boolean { const traderAssorts = this.traderHelper.getTraderAssortsByTraderId(offer.user.id).items; - const assortData = traderAssorts.find((x) => x._id === offer.items[0]._id); + const assortData = traderAssorts.find(x => x._id === offer.items[0]._id); // No trader assort data if (!assortData) @@ -361,8 +360,8 @@ export class RagfairOfferHelper return; } - profile.characters.pmc.RagfairInfo.rating += - (ragfairConfig.ratingIncreaseCount / ragfairConfig.ratingSumForIncrease) * amountToIncrementBy; + profile.characters.pmc.RagfairInfo.rating + += ragfairConfig.ratingIncreaseCount / ragfairConfig.ratingSumForIncrease * amountToIncrementBy; } /** @@ -390,7 +389,7 @@ export class RagfairOfferHelper protected deleteOfferById(sessionID: string, offerId: string): void { const profileRagfairInfo = this.saveServer.getProfile(sessionID).characters.pmc.RagfairInfo; - const index = profileRagfairInfo.offers.findIndex((o) => o._id === offerId); + const index = profileRagfairInfo.offers.findIndex(o => o._id === offerId); profileRagfairInfo.offers.splice(index, 1); // Also delete from ragfair @@ -417,7 +416,7 @@ export class RagfairOfferHelper else { offer.items[0].upd.StackObjectsCount -= boughtAmount; - const rootItems = offer.items.filter((i) => i.parentId === "hideout"); + const rootItems = offer.items.filter(i => i.parentId === "hideout"); rootItems.splice(0, 1); let removeCount = boughtAmount; @@ -447,9 +446,9 @@ export class RagfairOfferHelper for (const id of idsToRemove) { - const newIds = offer.items.filter((i) => - !idsToRemove.includes(i._id) && idsToRemove.includes(i.parentId) - ).map((i) => i._id); + const newIds = offer.items.filter(i => + !idsToRemove.includes(i._id) && idsToRemove.includes(i.parentId), + ).map(i => i._id); if (newIds.length > 0) { foundNewItems = true; @@ -460,7 +459,7 @@ export class RagfairOfferHelper if (idsToRemove.length > 0) { - offer.items = offer.items.filter((i) => !idsToRemove.includes(i._id)); + offer.items = offer.items.filter(i => !idsToRemove.includes(i._id)); } } @@ -685,7 +684,7 @@ export class RagfairOfferHelper if (this.itemHelper.armorItemCanHoldMods(offerRootItem._tpl)) { const offerRootTemplate = this.itemHelper.getItem(offerRootItem._tpl)[1]; - const requiredPlateCount = offerRootTemplate._props.Slots?.filter((item) => item._required)?.length; + const requiredPlateCount = offerRootTemplate._props.Slots?.filter(item => item._required)?.length; return offer.items.length > requiredPlateCount; } @@ -725,7 +724,7 @@ export class RagfairOfferHelper // Performing a required search and offer doesn't have requirement for item if ( searchRequest.neededSearchId - && !offer.requirements.some((requirement) => requirement._tpl === searchRequest.neededSearchId) + && !offer.requirements.some(requirement => requirement._tpl === searchRequest.neededSearchId) ) { return false; @@ -783,7 +782,7 @@ export class RagfairOfferHelper public isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean { - if (offer.requirements.some((requirement) => requirement._tpl === searchRequest.neededSearchId)) + if (offer.requirements.some(requirement => requirement._tpl === searchRequest.neededSearchId)) { return true; } @@ -800,8 +799,8 @@ export class RagfairOfferHelper { // thanks typescript, undefined assertion is not returnable since it // tries to return a multitype object - return (item.upd.MedKit || item.upd.Repairable || item.upd.Resource || item.upd.FoodDrink || item.upd.Key - || item.upd.RepairKit) + return item.upd.MedKit || item.upd.Repairable || item.upd.Resource || item.upd.FoodDrink || item.upd.Key + || item.upd.RepairKit ? true : false; } diff --git a/project/src/helpers/RagfairSellHelper.ts b/project/src/helpers/RagfairSellHelper.ts index 45c01616..f7c595cc 100644 --- a/project/src/helpers/RagfairSellHelper.ts +++ b/project/src/helpers/RagfairSellHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { SellResult } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig"; @@ -44,8 +43,8 @@ export class RagfairSellHelper const baseSellChancePercent = sellConfig.base * qualityMultiplier; // Modfier gets applied twice to either penalize or incentivize over/under pricing (Probably a cleaner way to do this) - const sellModifier = (averageOfferPriceRub / playerListedPriceRub) * sellConfig.sellMultiplier; - let sellChance = Math.round(((baseSellChancePercent * sellModifier) * sellModifier ** 3) + 10); // Power of 3 + const sellModifier = averageOfferPriceRub / playerListedPriceRub * sellConfig.sellMultiplier; + let sellChance = Math.round(baseSellChancePercent * sellModifier * sellModifier ** 3 + 10); // Power of 3 // Adjust sell chance if below config value if (sellChance < sellConfig.minSellChancePercent) @@ -74,9 +73,9 @@ export class RagfairSellHelper // Get a time in future to stop simulating sell chances at const endTime = startTime - + this.timeUtil.getHoursAsSeconds( - this.databaseServer.getTables().globals.config.RagFair.offerDurationTimeInHour, - ); + + this.timeUtil.getHoursAsSeconds( + this.databaseServer.getTables().globals.config.RagFair.offerDurationTimeInHour, + ); let sellTime = startTime; let remainingCount = itemSellCount; diff --git a/project/src/helpers/RagfairServerHelper.ts b/project/src/helpers/RagfairServerHelper.ts index 3e3003a3..97600248 100644 --- a/project/src/helpers/RagfairServerHelper.ts +++ b/project/src/helpers/RagfairServerHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; @@ -218,7 +217,7 @@ export class RagfairServerHelper this.randomUtil.getInt(config.stackablePercent.min, config.stackablePercent.max), ); - return Math.round((maxStackCount / 100) * stackPercent); + return Math.round(maxStackCount / 100 * stackPercent); } /** @@ -280,9 +279,9 @@ export class RagfairServerHelper // generated offer // recurivse if name is longer than max characters allowed (15 characters) - const type = (this.randomUtil.getInt(0, 1) === 0) ? "usec" : "bear"; + const type = this.randomUtil.getInt(0, 1) === 0 ? "usec" : "bear"; const name = this.randomUtil.getStringArrayValue(this.databaseServer.getTables().bots.types[type].firstName); - return (name.length > 15) ? this.getNickname(userID) : name; + return name.length > 15 ? this.getNickname(userID) : name; } /** diff --git a/project/src/helpers/RagfairSortHelper.ts b/project/src/helpers/RagfairSortHelper.ts index edb06fa4..951bf49c 100644 --- a/project/src/helpers/RagfairSortHelper.ts +++ b/project/src/helpers/RagfairSortHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -75,7 +74,7 @@ export class RagfairSortHelper const nameA = locale[`${tplA} Name`] || tplA; const nameB = locale[`${tplB} Name`] || tplB; - return (nameA < nameB) ? -1 : (nameA > nameB) ? 1 : 0; + return nameA < nameB ? -1 : nameA > nameB ? 1 : 0; } /** diff --git a/project/src/helpers/RepairHelper.ts b/project/src/helpers/RepairHelper.ts index 83f07444..55f3c9e5 100644 --- a/project/src/helpers/RepairHelper.ts +++ b/project/src/helpers/RepairHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; @@ -133,7 +132,7 @@ export class RepairHelper : armorMaterialSettings.MaxRepairDegradation; const duraLossPercent = this.randomUtil.getFloat(minMultiplier, maxMultiplier); - const duraLossMultipliedByTraderMultiplier = (duraLossPercent * armorMax) * traderQualityMultipler; + const duraLossMultipliedByTraderMultiplier = duraLossPercent * armorMax * traderQualityMultipler; return Number(duraLossMultipliedByTraderMultiplier.toFixed(2)); } @@ -163,7 +162,7 @@ export class RepairHelper } const duraLossPercent = this.randomUtil.getFloat(minRepairDeg, maxRepairDeg); - const duraLossMultipliedByTraderMultiplier = (duraLossPercent * weaponMax) * traderQualityMultipler; + const duraLossMultipliedByTraderMultiplier = duraLossPercent * weaponMax * traderQualityMultipler; return Number(duraLossMultipliedByTraderMultiplier.toFixed(2)); } diff --git a/project/src/helpers/RepeatableQuestHelper.ts b/project/src/helpers/RepeatableQuestHelper.ts index 24182c84..f951f47a 100644 --- a/project/src/helpers/RepeatableQuestHelper.ts +++ b/project/src/helpers/RepeatableQuestHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; @@ -32,8 +31,8 @@ export class RepeatableQuestHelper repeatableConfig: IRepeatableQuestConfig, ): IEliminationConfig { - return repeatableConfig.questConfig.Elimination.find((x) => - pmcLevel >= x.levelRange.min && pmcLevel <= x.levelRange.max + return repeatableConfig.questConfig.Elimination.find(x => + pmcLevel >= x.levelRange.min && pmcLevel <= x.levelRange.max, ); } diff --git a/project/src/helpers/SecureContainerHelper.ts b/project/src/helpers/SecureContainerHelper.ts index f0768830..3c62c2dd 100644 --- a/project/src/helpers/SecureContainerHelper.ts +++ b/project/src/helpers/SecureContainerHelper.ts @@ -1,14 +1,13 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface OwnerInventoryItems { - from: Item[]; - to: Item[]; - sameInventory: boolean; - isMail: boolean; + from: Item[] + to: Item[] + sameInventory: boolean + isMail: boolean } @injectable() @@ -24,7 +23,7 @@ export class SecureContainerHelper */ public getSecureContainerItems(items: Item[]): string[] { - const secureContainer = items.find((x) => x.slotId === "SecuredContainer"); + const secureContainer = items.find(x => x.slotId === "SecuredContainer"); // No container found, drop out if (!secureContainer) @@ -35,6 +34,6 @@ export class SecureContainerHelper const itemsInSecureContainer = this.itemHelper.findAndReturnChildrenByItems(items, secureContainer._id); // Return all items returned and exclude the secure container item itself - return itemsInSecureContainer.filter((x) => x !== secureContainer._id); + return itemsInSecureContainer.filter(x => x !== secureContainer._id); } } diff --git a/project/src/helpers/TradeHelper.ts b/project/src/helpers/TradeHelper.ts index 19ad09ce..769d7fb3 100644 --- a/project/src/helpers/TradeHelper.ts +++ b/project/src/helpers/TradeHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; @@ -46,7 +45,7 @@ export class TradeHelper @inject("RagfairServer") protected ragfairServer: RagfairServer, @inject("TraderAssortHelper") protected traderAssortHelper: TraderAssortHelper, @inject("TraderPurchasePersisterService") protected traderPurchasePersisterService: - TraderPurchasePersisterService, + TraderPurchasePersisterService, @inject("ConfigServer") protected configServer: ConfigServer, ) { @@ -80,7 +79,7 @@ export class TradeHelper const allOffers = this.ragfairServer.getOffers(); // We store ragfair offerid in buyRequestData.item_id - const offerWithItem = allOffers.find((x) => x._id === buyRequestData.item_id); + const offerWithItem = allOffers.find(x => x._id === buyRequestData.item_id); const itemPurchased = offerWithItem.items[0]; // Ensure purchase does not exceed trader item limit @@ -106,7 +105,7 @@ export class TradeHelper // Get raw offer from ragfair, clone to prevent altering offer itself const allOffers = this.ragfairServer.getOffers(); - const offerWithItemCloned = this.jsonUtil.clone(allOffers.find((x) => x._id === buyRequestData.item_id)); + const offerWithItemCloned = this.jsonUtil.clone(allOffers.find(x => x._id === buyRequestData.item_id)); offerItems = offerWithItemCloned.items; } else if (buyRequestData.tid === Traders.FENCE) @@ -115,7 +114,7 @@ export class TradeHelper { // Update assort/flea item values const traderAssorts = this.traderHelper.getTraderAssortsByTraderId(buyRequestData.tid).items; - const itemPurchased = traderAssorts.find((assort) => assort._id === buyRequestData.item_id); + const itemPurchased = traderAssorts.find(assort => assort._id === buyRequestData.item_id); // Decrement trader item count itemPurchased.upd.StackObjectsCount -= buyCount; @@ -124,7 +123,7 @@ export class TradeHelper }; const fenceItems = this.fenceService.getRawFenceAssorts().items; - const rootItemIndex = fenceItems.findIndex((item) => item._id === buyRequestData.item_id); + const rootItemIndex = fenceItems.findIndex(item => item._id === buyRequestData.item_id); if (rootItemIndex === -1) { this.logger.debug(`Tried to buy item ${buyRequestData.item_id} from fence that no longer exists`); @@ -143,7 +142,7 @@ export class TradeHelper { // Update assort/flea item values const traderAssorts = this.traderHelper.getTraderAssortsByTraderId(buyRequestData.tid).items; - const itemPurchased = traderAssorts.find((x) => x._id === buyRequestData.item_id); + const itemPurchased = traderAssorts.find(x => x._id === buyRequestData.item_id); // Ensure purchase does not exceed trader item limit const assortHasBuyRestrictions = this.itemHelper.hasBuyRestrictions(itemPurchased); @@ -261,7 +260,7 @@ export class TradeHelper const itemIdToFind = itemToBeRemoved.id.replace(/\s+/g, ""); // Strip out whitespace // Find item in player inventory, or show error to player if not found - const matchingItemInInventory = profileWithItemsToSell.Inventory.items.find((x) => x._id === itemIdToFind); + const matchingItemInInventory = profileWithItemsToSell.Inventory.items.find(x => x._id === itemIdToFind); if (!matchingItemInInventory) { const errorMessage = `Unable to sell item ${itemToBeRemoved.id}, cannot be found in player inventory`; diff --git a/project/src/helpers/TraderAssortHelper.ts b/project/src/helpers/TraderAssortHelper.ts index 2872c81f..a070c5bd 100644 --- a/project/src/helpers/TraderAssortHelper.ts +++ b/project/src/helpers/TraderAssortHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairAssortGenerator } from "@spt-aki/generators/RagfairAssortGenerator"; import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; import { AssortHelper } from "@spt-aki/helpers/AssortHelper"; @@ -43,7 +42,7 @@ export class TraderAssortHelper @inject("TraderAssortService") protected traderAssortService: TraderAssortService, @inject("LocalisationService") protected localisationService: LocalisationService, @inject("TraderPurchasePersisterService") protected traderPurchasePersisterService: - TraderPurchasePersisterService, + TraderPurchasePersisterService, @inject("TraderHelper") protected traderHelper: TraderHelper, @inject("FenceService") protected fenceService: FenceService, @inject("ConfigServer") protected configServer: ConfigServer, @@ -96,7 +95,7 @@ export class TraderAssortHelper for (const assortId in assortPurchasesfromTrader) { // Find assort we want to update current buy count of - const assortToAdjust = traderClone.assort.items.find((x) => x._id === assortId); + const assortToAdjust = traderClone.assort.items.find(x => x._id === assortId); if (!assortToAdjust) { this.logger.debug( @@ -148,7 +147,7 @@ export class TraderAssortHelper protected resetBuyRestrictionCurrentValue(assortItems: Item[]): void { // iterate over root items - for (const assort of assortItems.filter((item) => item.slotId === "hideout")) + for (const assort of assortItems.filter(item => item.slotId === "hideout")) { // no value to adjust if (!assort.upd.BuyRestrictionCurrent) diff --git a/project/src/helpers/TraderHelper.ts b/project/src/helpers/TraderHelper.ts index 64d2f17d..5d08e0c4 100644 --- a/project/src/helpers/TraderHelper.ts +++ b/project/src/helpers/TraderHelper.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; @@ -109,7 +108,7 @@ export class TraderHelper } // Find specific assort in traders data - const purchasedAssort = traderAssorts.items.find((item) => item._id === assortId); + const purchasedAssort = traderAssorts.items.find(item => item._id === assortId); if (!purchasedAssort) { this.logger.debug(`No assort ${assortId} on trader: ${traderId} found`); @@ -130,8 +129,8 @@ export class TraderHelper { const account = this.saveServer.getProfile(sessionID); const pmcData = this.profileHelper.getPmcProfile(sessionID); - const rawProfileTemplate: ProfileTraderTemplate = - this.databaseServer.getTables().templates.profiles[account.info.edition][pmcData.Info.Side.toLowerCase()] + const rawProfileTemplate: ProfileTraderTemplate + = this.databaseServer.getTables().templates.profiles[account.info.edition][pmcData.Info.Side.toLowerCase()] .trader; pmcData.TradersInfo[traderID] = { @@ -238,9 +237,9 @@ export class TraderHelper const loyalty = loyaltyLevels[level]; if ( - (loyalty.minLevel <= pmcData.Info.Level - && loyalty.minSalesSum <= pmcData.TradersInfo[traderID].salesSum - && loyalty.minStanding <= pmcData.TradersInfo[traderID].standing) && targetLevel < 4 + loyalty.minLevel <= pmcData.Info.Level + && loyalty.minSalesSum <= pmcData.TradersInfo[traderID].salesSum + && loyalty.minStanding <= pmcData.TradersInfo[traderID].standing && targetLevel < 4 ) { // level reached @@ -271,7 +270,7 @@ export class TraderHelper */ public getTraderUpdateSeconds(traderId: string): number { - const traderDetails = this.traderConfig.updateTime.find((x) => x.traderId === traderId); + const traderDetails = this.traderConfig.updateTime.find(x => x.traderId === traderId); if (!traderDetails || traderDetails.seconds.min === undefined || traderDetails.seconds.max === undefined) { this.logger.warning( @@ -319,7 +318,7 @@ export class TraderHelper */ public addTraderPurchasesToPlayerProfile( sessionID: string, - newPurchaseDetails: { items: { itemId: string; count: number; }[]; traderId: string; }, + newPurchaseDetails: { items: { itemId: string, count: number }[], traderId: string }, itemPurchased: Item, ): void { @@ -353,7 +352,7 @@ export class TraderHelper if ( profile.traderPurchases[traderId][purchasedItem.itemId].count + purchasedItem.count - > itemPurchased.upd.BuyRestrictionMax + > itemPurchased.upd.BuyRestrictionMax ) { throw new Error("Unable to purchase item, Purchase limit reached"); @@ -398,7 +397,7 @@ export class TraderHelper } // Get all item assorts that have parentid of hideout (base item and not a mod of other item) - for (const item of traderAssorts.items.filter((x) => x.parentId === "hideout")) + for (const item of traderAssorts.items.filter(x => x.parentId === "hideout")) { // Get barter scheme (contains cost of item) const barterScheme = traderAssorts.barter_scheme[item._id][0][0]; @@ -479,7 +478,7 @@ export class TraderHelper */ public getTraderById(traderId: string): Traders { - const keys = Object.keys(Traders).filter((x) => Traders[x] === traderId); + const keys = Object.keys(Traders).filter(x => Traders[x] === traderId); if (keys.length === 0) { @@ -524,7 +523,7 @@ export class TraderHelper */ public traderEnumHasKey(key: string): boolean { - return Object.keys(Traders).some((x) => x === key); + return Object.keys(Traders).some(x => x === key); } /** @@ -534,6 +533,6 @@ export class TraderHelper */ public traderEnumHasValue(traderId: string): boolean { - return Object.values(Traders).some((x) => x === traderId); + return Object.values(Traders).some(x => x === traderId); } } diff --git a/project/src/helpers/UtilityHelper.ts b/project/src/helpers/UtilityHelper.ts index 6e10d619..629d704d 100644 --- a/project/src/helpers/UtilityHelper.ts +++ b/project/src/helpers/UtilityHelper.ts @@ -5,6 +5,6 @@ export class UtilityHelper { public arrayIntersect(a: T[], b: T[]): T[] { - return a.filter((x) => b.includes(x)); + return a.filter(x => b.includes(x)); } } diff --git a/project/src/helpers/WeightedRandomHelper.ts b/project/src/helpers/WeightedRandomHelper.ts index f145da59..12cf1cb2 100644 --- a/project/src/helpers/WeightedRandomHelper.ts +++ b/project/src/helpers/WeightedRandomHelper.ts @@ -9,7 +9,7 @@ export class WeightedRandomHelper * @param {tplId: weighting[]} itemArray * @returns tplId */ - public getWeightedInventoryItem(itemArray: { [tplId: string]: unknown; } | ArrayLike): string + public getWeightedInventoryItem(itemArray: { [tplId: string]: unknown } | ArrayLike): string { const itemKeys = Object.keys(itemArray); const weights = Object.values(itemArray); @@ -23,7 +23,7 @@ export class WeightedRandomHelper * @param itemArray Items and weights to use * @returns Chosen item from array */ - public getWeightedValue(itemArray: { [key: string]: unknown; } | ArrayLike): T + public getWeightedValue(itemArray: { [key: string]: unknown } | ArrayLike): T { const itemKeys = Object.keys(itemArray); const weights = Object.values(itemArray); @@ -47,7 +47,7 @@ export class WeightedRandomHelper * @param {number[]} weights * @returns {{item: any, index: number}} */ - public weightedRandom(items: any[], weights: any[]): { item: any; index: number; } + public weightedRandom(items: any[], weights: any[]): { item: any, index: number } { if (!items || items.length === 0) { diff --git a/project/src/loaders/BundleLoader.ts b/project/src/loaders/BundleLoader.ts index 657fd970..ad640fc2 100644 --- a/project/src/loaders/BundleLoader.ts +++ b/project/src/loaders/BundleLoader.ts @@ -1,6 +1,5 @@ import path from "node:path"; import { inject, injectable } from "tsyringe"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -57,8 +56,8 @@ export class BundleLoader public addBundles(modpath: string): void { - const bundleManifestArr = - this.jsonUtil.deserialize(this.vfs.readFile(`${modpath}bundles.json`)).manifest; + const bundleManifestArr + = this.jsonUtil.deserialize(this.vfs.readFile(`${modpath}bundles.json`)).manifest; for (const bundleManifest of bundleManifestArr) { @@ -84,11 +83,11 @@ export class BundleLoader export interface BundleManifest { - manifest: BundleManifestEntry[]; + manifest: BundleManifestEntry[] } export interface BundleManifestEntry { - key: string; - dependencyKeys: string[]; + key: string + dependencyKeys: string[] } diff --git a/project/src/loaders/ModLoadOrder.ts b/project/src/loaders/ModLoadOrder.ts index c874ac01..90c393c7 100644 --- a/project/src/loaders/ModLoadOrder.ts +++ b/project/src/loaders/ModLoadOrder.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPackageJsonData } from "@spt-aki/models/spt/mod/IPackageJsonData"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; diff --git a/project/src/loaders/ModTypeCheck.ts b/project/src/loaders/ModTypeCheck.ts index 56b0cd29..8caae3df 100644 --- a/project/src/loaders/ModTypeCheck.ts +++ b/project/src/loaders/ModTypeCheck.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; import { IPostAkiLoadModAsync } from "@spt-aki/models/external/IPostAkiLoadModAsync"; import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; @@ -71,10 +70,10 @@ export class ModTypeCheck public isPostV3Compatible(mod: any): boolean { return this.isPreAkiLoad(mod) - || this.isPostAkiLoad(mod) - || this.isPostDBAkiLoad(mod) - || this.isPreAkiLoadAsync(mod) - || this.isPostAkiLoadAsync(mod) - || this.isPostDBAkiLoadAsync(mod); + || this.isPostAkiLoad(mod) + || this.isPostDBAkiLoad(mod) + || this.isPreAkiLoadAsync(mod) + || this.isPostAkiLoadAsync(mod) + || this.isPostDBAkiLoadAsync(mod); } } diff --git a/project/src/loaders/PostAkiModLoader.ts b/project/src/loaders/PostAkiModLoader.ts index 25425c55..1695d864 100644 --- a/project/src/loaders/PostAkiModLoader.ts +++ b/project/src/loaders/PostAkiModLoader.ts @@ -1,5 +1,4 @@ import { DependencyContainer, inject, injectable } from "tsyringe"; - import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader"; import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; diff --git a/project/src/loaders/PostDBModLoader.ts b/project/src/loaders/PostDBModLoader.ts index 15a0c157..d9ac6758 100644 --- a/project/src/loaders/PostDBModLoader.ts +++ b/project/src/loaders/PostDBModLoader.ts @@ -1,5 +1,4 @@ import { DependencyContainer, inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; diff --git a/project/src/loaders/PreAkiModLoader.ts b/project/src/loaders/PreAkiModLoader.ts index 6d6f56d8..57713357 100644 --- a/project/src/loaders/PreAkiModLoader.ts +++ b/project/src/loaders/PreAkiModLoader.ts @@ -1,9 +1,8 @@ import { execSync } from "node:child_process"; import os from "node:os"; import path from "node:path"; -import semver from "semver"; +import { maxSatisfying, valid, validRange, satisfies } from "semver"; import { DependencyContainer, inject, injectable } from "tsyringe"; - import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder"; import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck"; import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile"; @@ -94,10 +93,10 @@ export class PreAkiModLoader implements IModLoader for (const modName in modsGroupedByName) { const modDatas = modsGroupedByName[modName]; - const modVersions = modDatas.map((x) => x.version); - const highestVersion = semver.maxSatisfying(modVersions, "*"); + const modVersions = modDatas.map(x => x.version); + const highestVersion = maxSatisfying(modVersions, "*"); - const chosenVersion = modDatas.find((x) => x.name === modName && x.version === highestVersion); + const chosenVersion = modDatas.find(x => x.name === modName && x.version === highestVersion); if (!chosenVersion) { continue; @@ -268,7 +267,7 @@ export class PreAkiModLoader implements IModLoader for (const mod of modPackageData.values()) { const name = `${mod.author}-${mod.name}`; - grouppedMods.set(name, [...(grouppedMods.get(name) ?? []), mod]); + grouppedMods.set(name, [...grouppedMods.get(name) ?? [], mod]); // if there's more than one entry for a given mod it means there's at least 2 mods with the same author and name trying to load. if (grouppedMods.get(name).length > 1 && !this.skippedMods.has(name)) @@ -341,7 +340,7 @@ export class PreAkiModLoader implements IModLoader } // Error and prevent loading if akiVersion property is not a valid semver string - if (!(semver.valid(mod.akiVersion) || semver.validRange(mod.akiVersion))) + if (!(valid(mod.akiVersion) || validRange(mod.akiVersion))) { this.logger.error(this.localisationService.getText("modloader-invalid_akiversion_field", modName)); @@ -349,7 +348,7 @@ export class PreAkiModLoader implements IModLoader } // Warning and allow loading if semver is not satisfied - if (!semver.satisfies(akiVersion, mod.akiVersion)) + if (!satisfies(akiVersion, mod.akiVersion)) { this.logger.warning(this.localisationService.getText("modloader-outdated_akiversion_field", modName)); @@ -584,7 +583,7 @@ export class PreAkiModLoader implements IModLoader return false; } - if (!semver.satisfies(loadedMods.get(modDependency).version, requiredVersion)) + if (!satisfies(loadedMods.get(modDependency).version, requiredVersion)) { this.logger.error( this.localisationService.getText("modloader-outdated_dependency", { @@ -642,7 +641,7 @@ export class PreAkiModLoader implements IModLoader const modIsCalledSrc = modName.toLowerCase() === "src"; const modIsCalledDb = modName.toLowerCase() === "db"; const hasBepinExFolderStructure = this.vfs.exists(`${modPath}/plugins`); - const containsDll = this.vfs.getFiles(`${modPath}`).find((x) => x.includes(".dll")); + const containsDll = this.vfs.getFiles(`${modPath}`).find(x => x.includes(".dll")); if (modIsCalledSrc || modIsCalledDb || modIsCalledUser) { @@ -683,7 +682,7 @@ export class PreAkiModLoader implements IModLoader } } - if (!semver.valid(config.version)) + if (!valid(config.version)) { this.logger.error(this.localisationService.getText("modloader-invalid_version_property", modName)); issue = true; diff --git a/project/src/models/common/MinMax.ts b/project/src/models/common/MinMax.ts index 2b5efbad..41a26ac6 100644 --- a/project/src/models/common/MinMax.ts +++ b/project/src/models/common/MinMax.ts @@ -1,5 +1,5 @@ export interface MinMax { - max: number; - min: number; + max: number + min: number } diff --git a/project/src/models/eft/bot/IGenerateBotsRequestData.ts b/project/src/models/eft/bot/IGenerateBotsRequestData.ts index 86097fcc..f2181dcc 100644 --- a/project/src/models/eft/bot/IGenerateBotsRequestData.ts +++ b/project/src/models/eft/bot/IGenerateBotsRequestData.ts @@ -1,12 +1,12 @@ export interface IGenerateBotsRequestData { - conditions: Condition[]; + conditions: Condition[] } export interface Condition { /** e.g. assault/pmcBot/bossKilla */ - Role: string; - Limit: number; - Difficulty: string; + Role: string + Limit: number + Difficulty: string } diff --git a/project/src/models/eft/bot/IRandomisedBotLevelResult.ts b/project/src/models/eft/bot/IRandomisedBotLevelResult.ts index b0571202..ccbcd60e 100644 --- a/project/src/models/eft/bot/IRandomisedBotLevelResult.ts +++ b/project/src/models/eft/bot/IRandomisedBotLevelResult.ts @@ -1,5 +1,5 @@ export interface IRandomisedBotLevelResult { - level: number; - exp: number; + level: number + exp: number } diff --git a/project/src/models/eft/builds/ISetMagazineRequest.ts b/project/src/models/eft/builds/ISetMagazineRequest.ts index ca16474d..74257227 100644 --- a/project/src/models/eft/builds/ISetMagazineRequest.ts +++ b/project/src/models/eft/builds/ISetMagazineRequest.ts @@ -2,10 +2,10 @@ import { IMagazineTemplateAmmoItem } from "../profile/IAkiProfile"; export interface ISetMagazineRequest { - Id: string; - Name: string; - Caliber: string; - Items: IMagazineTemplateAmmoItem[]; - TopCount: number; - BottomCount: number; + Id: string + Name: string + Caliber: string + Items: IMagazineTemplateAmmoItem[] + TopCount: number + BottomCount: number } diff --git a/project/src/models/eft/common/IGlobals.ts b/project/src/models/eft/common/IGlobals.ts index a1b2a7d3..52439d08 100644 --- a/project/src/models/eft/common/IGlobals.ts +++ b/project/src/models/eft/common/IGlobals.ts @@ -4,1856 +4,1856 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IGlobals { - time: number; - config: IConfig; - bot_presets: IBotPreset[]; - AudioSettings: IAudioSettings; - EnvironmentSettings: IEnvironmentSettings; - BotWeaponScatterings: IBotWeaponScattering[]; - ItemPresets: Record; + time: number + config: IConfig + bot_presets: IBotPreset[] + AudioSettings: IAudioSettings + EnvironmentSettings: IEnvironmentSettings + BotWeaponScatterings: IBotWeaponScattering[] + ItemPresets: Record } export interface IConfig { - content: IContent; - AimPunchMagnitude: number; - WeaponSkillProgressRate: number; - SkillAtrophy: boolean; - exp: IExp; - t_base_looting: number; - t_base_lockpicking: number; - armor: IArmor; - SessionsToShowHotKeys: number; - MaxBotsAliveOnMap: number; - MaxBotsAliveOnMapPvE: number; - SavagePlayCooldown: number; - SavagePlayCooldownNdaFree: number; - MarksmanAccuracy: number; - SavagePlayCooldownDevelop: number; - TODSkyDate: string; - Mastering: IMastering[]; - GlobalItemPriceModifier: number; - TradingUnlimitedItems: boolean; - MaxLoyaltyLevelForAll: boolean; - GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; - GraphicSettings: IGraphicSettings; - TimeBeforeDeploy: number; - TimeBeforeDeployLocal: number; - TradingSetting: number; - TradingSettings: ITradingSettings; - ItemsCommonSettings: IItemsCommonSettings; - LoadTimeSpeedProgress: number; - BaseLoadTime: number; - BaseUnloadTime: number; - BaseCheckTime: number; - BluntDamageReduceFromSoftArmorMod: number; - BodyPartColliderSettings: IBodyPartColliderSettings; - Customization: ICustomization; - UncheckOnShot: boolean; - BotsEnabled: boolean; - BufferZone: IBufferZone; - ArmorMaterials: IArmorMaterials; - LegsOverdamage: number; - HandsOverdamage: number; - StomachOverdamage: number; - Health: IHealth; - rating: IRating; - tournament: ITournament; - QuestSettings: IQuestSettings; - RagFair: IRagFair; - handbook: IHandbook; - FractureCausedByFalling: IProbability; - FractureCausedByBulletHit: IProbability; - WAVE_COEF_LOW: number; - WAVE_COEF_MID: number; - WAVE_COEF_HIGH: number; - WAVE_COEF_HORDE: number; - Stamina: IStamina; - StaminaRestoration: IStaminaRestoration; - StaminaDrain: IStaminaDrain; - RequirementReferences: IRequirementReferences; - RestrictionsInRaid: IRestrictionsInRaid[]; - SkillMinEffectiveness: number; - SkillFatiguePerPoint: number; - SkillFreshEffectiveness: number; - SkillFreshPoints: number; - SkillPointsBeforeFatigue: number; - SkillFatigueReset: number; - DiscardLimitsEnabled: boolean; - EventSettings: IEventSettings; - FavoriteItemsSettings: IFavoriteItemsSettings; - VaultingSettings: IVaultingSettings; - BTRSettings: IBTRSettings; - EventType: string[]; - WalkSpeed: Ixyz; - SprintSpeed: Ixyz; - SquadSettings: ISquadSettings; - SkillEnduranceWeightThreshold: number; - TeamSearchingTimeout: number; - Insurance: IInsurance; - SkillExpPerLevel: number; - GameSearchingTimeout: number; - WallContusionAbsorption: Ixyz; - WeaponFastDrawSettings: IWeaponFastDrawSettings; - SkillsSettings: ISkillsSettings; - AzimuthPanelShowsPlayerOrientation: boolean; - Aiming: IAiming; - Malfunction: IMalfunction; - Overheat: IOverheat; - FenceSettings: IFenceSettings; - TestValue: number; - Inertia: IInertia; - Ballistic: IBallistic; - RepairSettings: IRepairSettings; + content: IContent + AimPunchMagnitude: number + WeaponSkillProgressRate: number + SkillAtrophy: boolean + exp: IExp + t_base_looting: number + t_base_lockpicking: number + armor: IArmor + SessionsToShowHotKeys: number + MaxBotsAliveOnMap: number + MaxBotsAliveOnMapPvE: number + SavagePlayCooldown: number + SavagePlayCooldownNdaFree: number + MarksmanAccuracy: number + SavagePlayCooldownDevelop: number + TODSkyDate: string + Mastering: IMastering[] + GlobalItemPriceModifier: number + TradingUnlimitedItems: boolean + MaxLoyaltyLevelForAll: boolean + GlobalLootChanceModifier: number + GlobalLootChanceModifierPvE: number + GraphicSettings: IGraphicSettings + TimeBeforeDeploy: number + TimeBeforeDeployLocal: number + TradingSetting: number + TradingSettings: ITradingSettings + ItemsCommonSettings: IItemsCommonSettings + LoadTimeSpeedProgress: number + BaseLoadTime: number + BaseUnloadTime: number + BaseCheckTime: number + BluntDamageReduceFromSoftArmorMod: number + BodyPartColliderSettings: IBodyPartColliderSettings + Customization: ICustomization + UncheckOnShot: boolean + BotsEnabled: boolean + BufferZone: IBufferZone + ArmorMaterials: IArmorMaterials + LegsOverdamage: number + HandsOverdamage: number + StomachOverdamage: number + Health: IHealth + rating: IRating + tournament: ITournament + QuestSettings: IQuestSettings + RagFair: IRagFair + handbook: IHandbook + FractureCausedByFalling: IProbability + FractureCausedByBulletHit: IProbability + WAVE_COEF_LOW: number + WAVE_COEF_MID: number + WAVE_COEF_HIGH: number + WAVE_COEF_HORDE: number + Stamina: IStamina + StaminaRestoration: IStaminaRestoration + StaminaDrain: IStaminaDrain + RequirementReferences: IRequirementReferences + RestrictionsInRaid: IRestrictionsInRaid[] + SkillMinEffectiveness: number + SkillFatiguePerPoint: number + SkillFreshEffectiveness: number + SkillFreshPoints: number + SkillPointsBeforeFatigue: number + SkillFatigueReset: number + DiscardLimitsEnabled: boolean + EventSettings: IEventSettings + FavoriteItemsSettings: IFavoriteItemsSettings + VaultingSettings: IVaultingSettings + BTRSettings: IBTRSettings + EventType: string[] + WalkSpeed: Ixyz + SprintSpeed: Ixyz + SquadSettings: ISquadSettings + SkillEnduranceWeightThreshold: number + TeamSearchingTimeout: number + Insurance: IInsurance + SkillExpPerLevel: number + GameSearchingTimeout: number + WallContusionAbsorption: Ixyz + WeaponFastDrawSettings: IWeaponFastDrawSettings + SkillsSettings: ISkillsSettings + AzimuthPanelShowsPlayerOrientation: boolean + Aiming: IAiming + Malfunction: IMalfunction + Overheat: IOverheat + FenceSettings: IFenceSettings + TestValue: number + Inertia: IInertia + Ballistic: IBallistic + RepairSettings: IRepairSettings } export interface IBodyPartColliderSettings { - BackHead: IBodyPartColliderPart; - Ears: IBodyPartColliderPart; - Eyes: IBodyPartColliderPart; - HeadCommon: IBodyPartColliderPart; - Jaw: IBodyPartColliderPart; - LeftCalf: IBodyPartColliderPart; - LeftForearm: IBodyPartColliderPart; - LeftSideChestDown: IBodyPartColliderPart; - LeftSideChestUp: IBodyPartColliderPart; - LeftThigh: IBodyPartColliderPart; - LeftUpperArm: IBodyPartColliderPart; - NeckBack: IBodyPartColliderPart; - NeckFront: IBodyPartColliderPart; - ParietalHead: IBodyPartColliderPart; - Pelvis: IBodyPartColliderPart; - PelvisBack: IBodyPartColliderPart; - RibcageLow: IBodyPartColliderPart; - RibcageUp: IBodyPartColliderPart; - RightCalf: IBodyPartColliderPart; - RightForearm: IBodyPartColliderPart; - RightSideChestDown: IBodyPartColliderPart; - RightSideChestUp: IBodyPartColliderPart; - RightThigh: IBodyPartColliderPart; - RightUpperArm: IBodyPartColliderPart; - SpineDown: IBodyPartColliderPart; - SpineTop: IBodyPartColliderPart; + BackHead: IBodyPartColliderPart + Ears: IBodyPartColliderPart + Eyes: IBodyPartColliderPart + HeadCommon: IBodyPartColliderPart + Jaw: IBodyPartColliderPart + LeftCalf: IBodyPartColliderPart + LeftForearm: IBodyPartColliderPart + LeftSideChestDown: IBodyPartColliderPart + LeftSideChestUp: IBodyPartColliderPart + LeftThigh: IBodyPartColliderPart + LeftUpperArm: IBodyPartColliderPart + NeckBack: IBodyPartColliderPart + NeckFront: IBodyPartColliderPart + ParietalHead: IBodyPartColliderPart + Pelvis: IBodyPartColliderPart + PelvisBack: IBodyPartColliderPart + RibcageLow: IBodyPartColliderPart + RibcageUp: IBodyPartColliderPart + RightCalf: IBodyPartColliderPart + RightForearm: IBodyPartColliderPart + RightSideChestDown: IBodyPartColliderPart + RightSideChestUp: IBodyPartColliderPart + RightThigh: IBodyPartColliderPart + RightUpperArm: IBodyPartColliderPart + SpineDown: IBodyPartColliderPart + SpineTop: IBodyPartColliderPart } export interface IBodyPartColliderPart { - PenetrationChance: number; - PenetrationDamageMod: number; - PenetrationLevel: number; + PenetrationChance: number + PenetrationDamageMod: number + PenetrationLevel: number } export interface IWeaponFastDrawSettings { - HandShakeCurveFrequency: number; - HandShakeCurveIntensity: number; - HandShakeMaxDuration: number; - HandShakeTremorIntensity: number; - WeaponFastSwitchMaxSpeedMult: number; - WeaponFastSwitchMinSpeedMult: number; - WeaponPistolFastSwitchMaxSpeedMult: number; - WeaponPistolFastSwitchMinSpeedMult: number; + HandShakeCurveFrequency: number + HandShakeCurveIntensity: number + HandShakeMaxDuration: number + HandShakeTremorIntensity: number + WeaponFastSwitchMaxSpeedMult: number + WeaponFastSwitchMinSpeedMult: number + WeaponPistolFastSwitchMaxSpeedMult: number + WeaponPistolFastSwitchMinSpeedMult: number } export interface IEventSettings { - EventActive: boolean; - EventTime: number; - EventWeather: IEventWeather; - ExitTimeMultiplier: number; - StaminaMultiplier: number; - SummonFailedWeather: IEventWeather; - SummonSuccessWeather: IEventWeather; - WeatherChangeTime: number; + EventActive: boolean + EventTime: number + EventWeather: IEventWeather + ExitTimeMultiplier: number + StaminaMultiplier: number + SummonFailedWeather: IEventWeather + SummonSuccessWeather: IEventWeather + WeatherChangeTime: number } export interface IEventWeather { - Cloudness: number; - Hour: number; - Minute: number; - Rain: number; - RainRandomness: number; - ScaterringFogDensity: number; - TopWindDirection: Ixyz; - Wind: number; - WindDirection: number; + Cloudness: number + Hour: number + Minute: number + Rain: number + RainRandomness: number + ScaterringFogDensity: number + TopWindDirection: Ixyz + Wind: number + WindDirection: number } export interface IGraphicSettings { - ExperimentalFogInCity: boolean; + ExperimentalFogInCity: boolean } export interface IBufferZone { - CustomerAccessTime: number; - CustomerCriticalTimeStart: number; - CustomerKickNotifTime: number; + CustomerAccessTime: number + CustomerCriticalTimeStart: number + CustomerKickNotifTime: number } export interface IItemsCommonSettings { - ItemRemoveAfterInterruptionTime: number; + ItemRemoveAfterInterruptionTime: number } export interface ITradingSettings { - BuyoutRestrictions: IBuyoutRestrictions; + BuyoutRestrictions: IBuyoutRestrictions } export interface IBuyoutRestrictions { - MinDurability: number; - MinFoodDrinkResource: number; - MinMedsResource: number; + MinDurability: number + MinFoodDrinkResource: number + MinMedsResource: number } export interface IContent { - ip: string; - port: number; - root: string; + ip: string + port: number + root: string } export interface IExp { - heal: IHeal; - match_end: IMatchEnd; - kill: IKill; - level: ILevel; - loot_attempts: ILootAttempt[]; - expForLevelOneDogtag: number; - expForLockedDoorOpen: number; - expForLockedDoorBreach: number; - triggerMult: number; + heal: IHeal + match_end: IMatchEnd + kill: IKill + level: ILevel + loot_attempts: ILootAttempt[] + expForLevelOneDogtag: number + expForLockedDoorOpen: number + expForLockedDoorBreach: number + triggerMult: number } export interface IHeal { - expForHeal: number; - expForHydration: number; - expForEnergy: number; + expForHeal: number + expForHydration: number + expForEnergy: number } export interface IMatchEnd { - README: string; - survived_exp_requirement: number; - survived_seconds_requirement: number; - survived_exp_reward: number; - mia_exp_reward: number; - runner_exp_reward: number; - leftMult: number; - miaMult: number; - survivedMult: number; - runnerMult: number; - killedMult: number; + README: string + survived_exp_requirement: number + survived_seconds_requirement: number + survived_exp_reward: number + mia_exp_reward: number + runner_exp_reward: number + leftMult: number + miaMult: number + survivedMult: number + runnerMult: number + killedMult: number } export interface IKill { - combo: ICombo[]; - victimLevelExp: number; - headShotMult: number; - expOnDamageAllHealth: number; - longShotDistance: number; - bloodLossToLitre: number; - botExpOnDamageAllHealth: number; - botHeadShotMult: number; - victimBotLevelExp: number; - pmcExpOnDamageAllHealth: number; - pmcHeadShotMult: number; + combo: ICombo[] + victimLevelExp: number + headShotMult: number + expOnDamageAllHealth: number + longShotDistance: number + bloodLossToLitre: number + botExpOnDamageAllHealth: number + botHeadShotMult: number + victimBotLevelExp: number + pmcExpOnDamageAllHealth: number + pmcHeadShotMult: number } export interface ICombo { - percent: number; + percent: number } export interface ILevel { - exp_table: IExpTable[]; - trade_level: number; - savage_level: number; - clan_level: number; - mastering1: number; - mastering2: number; + exp_table: IExpTable[] + trade_level: number + savage_level: number + clan_level: number + mastering1: number + mastering2: number } export interface IExpTable { - exp: number; + exp: number } export interface ILootAttempt { - k_exp: number; + k_exp: number } export interface IArmor { - class: IClass[]; + class: IClass[] } export interface IClass { - resistance: number; + resistance: number } export interface IMastering { - Name: string; - Templates: string[]; - Level2: number; - Level3: number; + Name: string + Templates: string[] + Level2: number + Level3: number } export interface ICustomization { - SavageHead: ISavageHead; - SavageBody: ISavageBody; - SavageFeet: ISavageFeet; - CustomizationVoice: ICustomizationVoice[]; - BodyParts: IBodyParts; + SavageHead: ISavageHead + SavageBody: ISavageBody + SavageFeet: ISavageFeet + CustomizationVoice: ICustomizationVoice[] + BodyParts: IBodyParts } export interface ISavageHead { - wild_head_1: IWildHead; - wild_head_2: IWildHead; - wild_head_3: IWildHead; - Wild_Dealmaker_head: IWildHead; - Wild_Killa_head: IWildHead; - bear_head: IWildHead; - bear_head_1: IWildHead; - usec_head_1: IWildHead; - Head_BOSS_Glukhar: IWildHead; - Wild_Head_nonMesh: IWildHead; - Head_BOSS_Sanitar: IWildHead; - wild_head_drozd: IWildHead; - wild_head_misha: IWildHead; - head_cultist_01: IWildHead; - head_cultist_02: IWildHead; - head_cultist_03: IWildHead; - DefaultUsecHead: IWildHead; - usec_head_3: IWildHead; - usec_head_4: IWildHead; - usec_head_5: IWildHead; + wild_head_1: IWildHead + wild_head_2: IWildHead + wild_head_3: IWildHead + Wild_Dealmaker_head: IWildHead + Wild_Killa_head: IWildHead + bear_head: IWildHead + bear_head_1: IWildHead + usec_head_1: IWildHead + Head_BOSS_Glukhar: IWildHead + Wild_Head_nonMesh: IWildHead + Head_BOSS_Sanitar: IWildHead + wild_head_drozd: IWildHead + wild_head_misha: IWildHead + head_cultist_01: IWildHead + head_cultist_02: IWildHead + head_cultist_03: IWildHead + DefaultUsecHead: IWildHead + usec_head_3: IWildHead + usec_head_4: IWildHead + usec_head_5: IWildHead } export interface IWildHead { - head: string; - isNotRandom: boolean; - NotRandom: boolean; + head: string + isNotRandom: boolean + NotRandom: boolean } export interface ISavageBody { - wild_body: IWildBody; - wild_body_1: IWildBody; - wild_body_2: IWildBody; - wild_body_3: IWildBody; - Wild_Dealmaker_body: IWildBody; - wild_security_body_1: IWildBody; - wild_security_body_2: IWildBody; - wild_Killa_body: IWildBody; - wild_pmcBot_body: IWildBody; - wild_Shturman_body: IWildBody; - wild_Gluhar_body: IWildBody; - Tshirt_security_TshirtTatu_01: IWildBody; - Tshirt_security_TshirtTatu_02: IWildBody; - Top_security_Husky: IWildBody; - Top_security_Gorka4: IWildBody; - scav_kit_upper_meteor: IWildBody; - wild_body_russia1: IWildBody; - Top_BOSS_Sanitar: IWildBody; - wild_body_motocross: IWildBody; - top_cultist_01: IWildBody; - top_cultist_02: IWildBody; - wild_body_rainparka: IWildBody; - wild_body_underarmour: IWildBody; - top_boss_tagilla: IWildBody; - DefaultUsecBody: IWildBody; - usec_upper_acu: IWildBody; - usec_upper_commando: IWildBody; - usec_upper_aggressor: IWildBody; - usec_upper_hoody: IWildBody; - usec_upper_pcuironsight: IWildBody; - usec_top_beltstaff: IWildBody; - usec_upper_flexion: IWildBody; - usec_upper_tier3: IWildBody; - usec_upper_pcsmulticam: IWildBody; - usec_upper_tier_2: IWildBody; - usec_upper_infiltrator: IWildBody; - user_upper_NightPatrol: IWildBody; - wild_body_bomber: IWildBody; - wild_top_yellowcoat: IWildBody; + wild_body: IWildBody + wild_body_1: IWildBody + wild_body_2: IWildBody + wild_body_3: IWildBody + Wild_Dealmaker_body: IWildBody + wild_security_body_1: IWildBody + wild_security_body_2: IWildBody + wild_Killa_body: IWildBody + wild_pmcBot_body: IWildBody + wild_Shturman_body: IWildBody + wild_Gluhar_body: IWildBody + Tshirt_security_TshirtTatu_01: IWildBody + Tshirt_security_TshirtTatu_02: IWildBody + Top_security_Husky: IWildBody + Top_security_Gorka4: IWildBody + scav_kit_upper_meteor: IWildBody + wild_body_russia1: IWildBody + Top_BOSS_Sanitar: IWildBody + wild_body_motocross: IWildBody + top_cultist_01: IWildBody + top_cultist_02: IWildBody + wild_body_rainparka: IWildBody + wild_body_underarmour: IWildBody + top_boss_tagilla: IWildBody + DefaultUsecBody: IWildBody + usec_upper_acu: IWildBody + usec_upper_commando: IWildBody + usec_upper_aggressor: IWildBody + usec_upper_hoody: IWildBody + usec_upper_pcuironsight: IWildBody + usec_top_beltstaff: IWildBody + usec_upper_flexion: IWildBody + usec_upper_tier3: IWildBody + usec_upper_pcsmulticam: IWildBody + usec_upper_tier_2: IWildBody + usec_upper_infiltrator: IWildBody + user_upper_NightPatrol: IWildBody + wild_body_bomber: IWildBody + wild_top_yellowcoat: IWildBody } export interface IWildBody { - body: string; - hands: string; - isNotRandom: boolean; + body: string + hands: string + isNotRandom: boolean } export interface ISavageFeet { - wild_feet: IWildFeet; - wild_feet_1: IWildFeet; - wild_feet_2: IWildFeet; - Wild_Dealmaker_feet: IWildFeet; - wild_security_feet_1: IWildFeet; - Wild_Killa_feet: IWildFeet; - wild_pmcBot_feet: IWildFeet; - Pants_BOSS_Glukhar: IWildFeet; - Pants_BOSS_Shturman: IWildFeet; - Pants_security_Gorka4: IWildFeet; - Pants_security_Flora: IWildFeet; - scav_kit_lower_sklon: IWildFeet; - Pants_BOSS_Sanitar: IWildFeet; - wild_feet_sweatpants: IWildFeet; - wild_feet_wasatch: IWildFeet; - wild_feet_slimPants: IWildFeet; - pants_cultist_01: IWildFeet; - pants_cultist_02: IWildFeet; - wild_feet_scavelite_taclite: IWildFeet; - pants_boss_tagilla: IWildFeet; - wild_feet_bomber: IWildFeet; - wild_pants_yellowcoat: IWildFeet; + wild_feet: IWildFeet + wild_feet_1: IWildFeet + wild_feet_2: IWildFeet + Wild_Dealmaker_feet: IWildFeet + wild_security_feet_1: IWildFeet + Wild_Killa_feet: IWildFeet + wild_pmcBot_feet: IWildFeet + Pants_BOSS_Glukhar: IWildFeet + Pants_BOSS_Shturman: IWildFeet + Pants_security_Gorka4: IWildFeet + Pants_security_Flora: IWildFeet + scav_kit_lower_sklon: IWildFeet + Pants_BOSS_Sanitar: IWildFeet + wild_feet_sweatpants: IWildFeet + wild_feet_wasatch: IWildFeet + wild_feet_slimPants: IWildFeet + pants_cultist_01: IWildFeet + pants_cultist_02: IWildFeet + wild_feet_scavelite_taclite: IWildFeet + pants_boss_tagilla: IWildFeet + wild_feet_bomber: IWildFeet + wild_pants_yellowcoat: IWildFeet } export interface IWildFeet { - feet: string; - isNotRandom: boolean; - NotRandom: boolean; + feet: string + isNotRandom: boolean + NotRandom: boolean } export interface ICustomizationVoice { - voice: string; - side: string[]; - isNotRandom: boolean; + voice: string + side: string[] + isNotRandom: boolean } export interface IBodyParts { - Head: string; - Body: string; - Feet: string; - Hands: string; + Head: string + Body: string + Feet: string + Hands: string } export interface IArmorMaterials { - UHMWPE: IArmorType; - Aramid: IArmorType; - Combined: IArmorType; - Titan: IArmorType; - Aluminium: IArmorType; - ArmoredSteel: IArmorType; - Ceramic: IArmorType; - Glass: IArmorType; + UHMWPE: IArmorType + Aramid: IArmorType + Combined: IArmorType + Titan: IArmorType + Aluminium: IArmorType + ArmoredSteel: IArmorType + Ceramic: IArmorType + Glass: IArmorType } export interface IArmorType { - Destructibility: number; - MinRepairDegradation: number; - MaxRepairDegradation: number; - ExplosionDestructibility: number; - MinRepairKitDegradation: number; - MaxRepairKitDegradation: number; + Destructibility: number + MinRepairDegradation: number + MaxRepairDegradation: number + ExplosionDestructibility: number + MinRepairKitDegradation: number + MaxRepairKitDegradation: number } export interface IHealth { - Falling: IFalling; - Effects: IEffects; - HealPrice: IHealPrice; - ProfileHealthSettings: IProfileHealthSettings; + Falling: IFalling + Effects: IEffects + HealPrice: IHealPrice + ProfileHealthSettings: IProfileHealthSettings } export interface IFalling { - DamagePerMeter: number; - SafeHeight: number; + DamagePerMeter: number + SafeHeight: number } export interface IEffects { - Existence: IExistence; - Dehydration: IDehydration; - BreakPart: IBreakPart; - Contusion: IContusion; - Disorientation: IDisorientation; - Exhaustion: IExhaustion; - LowEdgeHealth: ILowEdgeHealth; - RadExposure: IRadExposure; - Stun: IStun; - Intoxication: Intoxication; - Regeneration: IRegeneration; - Wound: IWound; - Berserk: IBerserk; - Flash: IFlash; - MedEffect: IMedEffect; - Pain: IPain; - PainKiller: IPainKiller; - SandingScreen: ISandingScreen; - MildMusclePain: IMusclePainEffect; - SevereMusclePain: IMusclePainEffect; - Stimulator: IStimulator; - Tremor: ITremor; - ChronicStaminaFatigue: IChronicStaminaFatigue; - Fracture: IFracture; - HeavyBleeding: IHeavyBleeding; - LightBleeding: ILightBleeding; - BodyTemperature: IBodyTemperature; + Existence: IExistence + Dehydration: IDehydration + BreakPart: IBreakPart + Contusion: IContusion + Disorientation: IDisorientation + Exhaustion: IExhaustion + LowEdgeHealth: ILowEdgeHealth + RadExposure: IRadExposure + Stun: IStun + Intoxication: Intoxication + Regeneration: IRegeneration + Wound: IWound + Berserk: IBerserk + Flash: IFlash + MedEffect: IMedEffect + Pain: IPain + PainKiller: IPainKiller + SandingScreen: ISandingScreen + MildMusclePain: IMusclePainEffect + SevereMusclePain: IMusclePainEffect + Stimulator: IStimulator + Tremor: ITremor + ChronicStaminaFatigue: IChronicStaminaFatigue + Fracture: IFracture + HeavyBleeding: IHeavyBleeding + LightBleeding: ILightBleeding + BodyTemperature: IBodyTemperature } export interface IExistence { - EnergyLoopTime: number; - HydrationLoopTime: number; - EnergyDamage: number; - HydrationDamage: number; - DestroyedStomachEnergyTimeFactor: number; - DestroyedStomachHydrationTimeFactor: number; + EnergyLoopTime: number + HydrationLoopTime: number + EnergyDamage: number + HydrationDamage: number + DestroyedStomachEnergyTimeFactor: number + DestroyedStomachHydrationTimeFactor: number } export interface IDehydration { - DefaultDelay: number; - DefaultResidueTime: number; - BleedingHealth: number; - BleedingLoopTime: number; - BleedingLifeTime: number; - DamageOnStrongDehydration: number; - StrongDehydrationLoopTime: number; + DefaultDelay: number + DefaultResidueTime: number + BleedingHealth: number + BleedingLoopTime: number + BleedingLifeTime: number + DamageOnStrongDehydration: number + StrongDehydrationLoopTime: number } export interface IBreakPart { - DefaultDelay: number; - DefaultResidueTime: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - BulletHitProbability: IProbability; - FallingProbability: IProbability; + DefaultDelay: number + DefaultResidueTime: number + HealExperience: number + OfflineDurationMin: number + OfflineDurationMax: number + RemovePrice: number + RemovedAfterDeath: boolean + BulletHitProbability: IProbability + FallingProbability: IProbability } export interface IContusion { - Dummy: number; + Dummy: number } export interface IDisorientation { - Dummy: number; + Dummy: number } export interface IExhaustion { - DefaultDelay: number; - DefaultResidueTime: number; - Damage: number; - DamageLoopTime: number; + DefaultDelay: number + DefaultResidueTime: number + Damage: number + DamageLoopTime: number } export interface ILowEdgeHealth { - DefaultDelay: number; - DefaultResidueTime: number; - StartCommonHealth: number; + DefaultDelay: number + DefaultResidueTime: number + StartCommonHealth: number } export interface IRadExposure { - Damage: number; - DamageLoopTime: number; + Damage: number + DamageLoopTime: number } export interface IStun { - Dummy: number; + Dummy: number } export interface Intoxication { - DefaultDelay: number; - DefaultResidueTime: number; - DamageHealth: number; - HealthLoopTime: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovedAfterDeath: boolean; - HealExperience: number; - RemovePrice: number; + DefaultDelay: number + DefaultResidueTime: number + DamageHealth: number + HealthLoopTime: number + OfflineDurationMin: number + OfflineDurationMax: number + RemovedAfterDeath: boolean + HealExperience: number + RemovePrice: number } export interface IRegeneration { - LoopTime: number; - MinimumHealthPercentage: number; - Energy: number; - Hydration: number; - BodyHealth: IBodyHealth; - Influences: IInfluences; + LoopTime: number + MinimumHealthPercentage: number + Energy: number + Hydration: number + BodyHealth: IBodyHealth + Influences: IInfluences } export interface IBodyHealth { - Head: IBodyHealthValue; - Chest: IBodyHealthValue; - Stomach: IBodyHealthValue; - LeftArm: IBodyHealthValue; - RightArm: IBodyHealthValue; - LeftLeg: IBodyHealthValue; - RightLeg: IBodyHealthValue; + Head: IBodyHealthValue + Chest: IBodyHealthValue + Stomach: IBodyHealthValue + LeftArm: IBodyHealthValue + RightArm: IBodyHealthValue + LeftLeg: IBodyHealthValue + RightLeg: IBodyHealthValue } export interface IBodyHealthValue { - Value: number; + Value: number } export interface IInfluences { - LightBleeding: IInfluence; - HeavyBleeding: IInfluence; - Fracture: IInfluence; - RadExposure: IInfluence; - Intoxication: IInfluence; + LightBleeding: IInfluence + HeavyBleeding: IInfluence + Fracture: IInfluence + RadExposure: IInfluence + Intoxication: IInfluence } export interface IInfluence { - HealthSlowDownPercentage: number; - EnergySlowDownPercentage: number; - HydrationSlowDownPercentage: number; + HealthSlowDownPercentage: number + EnergySlowDownPercentage: number + HydrationSlowDownPercentage: number } export interface IWound { - WorkingTime: number; - ThresholdMin: number; - ThresholdMax: number; + WorkingTime: number + ThresholdMin: number + ThresholdMax: number } export interface IBerserk { - DefaultDelay: number; - WorkingTime: number; - DefaultResidueTime: number; + DefaultDelay: number + WorkingTime: number + DefaultResidueTime: number } export interface IFlash { - Dummy: number; + Dummy: number } export interface IMedEffect { - LoopTime: number; - StartDelay: number; - DrinkStartDelay: number; - FoodStartDelay: number; - DrugsStartDelay: number; - MedKitStartDelay: number; - MedicalStartDelay: number; - StimulatorStartDelay: number; + LoopTime: number + StartDelay: number + DrinkStartDelay: number + FoodStartDelay: number + DrugsStartDelay: number + MedKitStartDelay: number + MedicalStartDelay: number + StimulatorStartDelay: number } export interface IPain { - TremorDelay: number; - HealExperience: number; + TremorDelay: number + HealExperience: number } export interface IPainKiller { - Dummy: number; + Dummy: number } export interface ISandingScreen { - Dummy: number; + Dummy: number } export interface IMusclePainEffect { - GymEffectivity: number; - OfflineDurationMax: number; - OfflineDurationMin: number; - TraumaChance: number; + GymEffectivity: number + OfflineDurationMax: number + OfflineDurationMin: number + TraumaChance: number } export interface IStimulator { - BuffLoopTime: number; - Buffs: IBuffs; + BuffLoopTime: number + Buffs: IBuffs } export interface IBuffs { - BuffsSJ1TGLabs: IBuff[]; - BuffsSJ6TGLabs: IBuff[]; - BuffsPropital: IBuff[]; - BuffsZagustin: IBuff[]; - BuffseTGchange: IBuff[]; - BuffsAdrenaline: IBuff[]; - BuffsGoldenStarBalm: IBuff[]; - Buffs_drink_aquamari: IBuff[]; - Buffs_drink_maxenergy: IBuff[]; - Buffs_drink_milk: IBuff[]; - Buffs_drink_tarcola: IBuff[]; - Buffs_drink_hotrod: IBuff[]; - Buffs_drink_juice_army: IBuff[]; - Buffs_drink_water: IBuff[]; - Buffs_food_borodinskiye: IBuff[]; - Buffs_food_condensed_milk: IBuff[]; - Buffs_food_emelya: IBuff[]; - Buffs_food_mayonez: IBuff[]; - Buffs_food_mre: IBuff[]; - Buffs_food_sugar: IBuff[]; - Buffs_drink_vodka: IBuff[]; - Buffs_drink_jack: IBuff[]; - Buffs_drink_moonshine: IBuff[]; - Buffs_drink_purewater: IBuff[]; - Buffs_3bTG: IBuff[]; - Buffs_AHF1M: IBuff[]; - Buffs_L1: IBuff[]; - Buffs_MULE: IBuff[]; - Buffs_Meldonin: IBuff[]; - Buffs_Obdolbos: IBuff[]; - Buffs_P22: IBuff[]; - Buffs_KultistsToxin: IBuff[]; - Buffs_BodyTemperature: IBuff[]; - Buffs_Antidote: IBuff[]; - Buffs_melee_bleed: IBuff[]; - Buffs_melee_blunt: IBuff[]; - Buffs_hultafors: IBuff[]; - Buffs_drink_vodka_BAD: IBuff[]; - Buffs_food_alyonka: IBuff[]; - Buffs_food_slippers: IBuff[]; - Buffs_knife: IBuff[]; - Buffs_EndOfWinterBonfire: IBuff[]; + BuffsSJ1TGLabs: IBuff[] + BuffsSJ6TGLabs: IBuff[] + BuffsPropital: IBuff[] + BuffsZagustin: IBuff[] + BuffseTGchange: IBuff[] + BuffsAdrenaline: IBuff[] + BuffsGoldenStarBalm: IBuff[] + Buffs_drink_aquamari: IBuff[] + Buffs_drink_maxenergy: IBuff[] + Buffs_drink_milk: IBuff[] + Buffs_drink_tarcola: IBuff[] + Buffs_drink_hotrod: IBuff[] + Buffs_drink_juice_army: IBuff[] + Buffs_drink_water: IBuff[] + Buffs_food_borodinskiye: IBuff[] + Buffs_food_condensed_milk: IBuff[] + Buffs_food_emelya: IBuff[] + Buffs_food_mayonez: IBuff[] + Buffs_food_mre: IBuff[] + Buffs_food_sugar: IBuff[] + Buffs_drink_vodka: IBuff[] + Buffs_drink_jack: IBuff[] + Buffs_drink_moonshine: IBuff[] + Buffs_drink_purewater: IBuff[] + Buffs_3bTG: IBuff[] + Buffs_AHF1M: IBuff[] + Buffs_L1: IBuff[] + Buffs_MULE: IBuff[] + Buffs_Meldonin: IBuff[] + Buffs_Obdolbos: IBuff[] + Buffs_P22: IBuff[] + Buffs_KultistsToxin: IBuff[] + Buffs_BodyTemperature: IBuff[] + Buffs_Antidote: IBuff[] + Buffs_melee_bleed: IBuff[] + Buffs_melee_blunt: IBuff[] + Buffs_hultafors: IBuff[] + Buffs_drink_vodka_BAD: IBuff[] + Buffs_food_alyonka: IBuff[] + Buffs_food_slippers: IBuff[] + Buffs_knife: IBuff[] + Buffs_EndOfWinterBonfire: IBuff[] } export interface IBuff { - BuffType: string; - Chance: number; - Delay: number; - Duration: number; - Value: number; - AbsoluteValue: boolean; - SkillName: string; + BuffType: string + Chance: number + Delay: number + Duration: number + Value: number + AbsoluteValue: boolean + SkillName: string } export interface ITremor { - DefaultDelay: number; - DefaultResidueTime: number; + DefaultDelay: number + DefaultResidueTime: number } export interface IChronicStaminaFatigue { - EnergyRate: number; - WorkingTime: number; - TicksEvery: number; - EnergyRatePerStack: number; + EnergyRate: number + WorkingTime: number + TicksEvery: number + EnergyRatePerStack: number } export interface IFracture { - DefaultDelay: number; - DefaultResidueTime: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - BulletHitProbability: IProbability; - FallingProbability: IProbability; + DefaultDelay: number + DefaultResidueTime: number + HealExperience: number + OfflineDurationMin: number + OfflineDurationMax: number + RemovePrice: number + RemovedAfterDeath: boolean + BulletHitProbability: IProbability + FallingProbability: IProbability } export interface IHeavyBleeding { - DefaultDelay: number; - DefaultResidueTime: number; - DamageEnergy: number; - DamageHealth: number; - EnergyLoopTime: number; - HealthLoopTime: number; - DamageHealthDehydrated: number; - HealthLoopTimeDehydrated: number; - LifeTimeDehydrated: number; - EliteVitalityDuration: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - Probability: IProbability; + DefaultDelay: number + DefaultResidueTime: number + DamageEnergy: number + DamageHealth: number + EnergyLoopTime: number + HealthLoopTime: number + DamageHealthDehydrated: number + HealthLoopTimeDehydrated: number + LifeTimeDehydrated: number + EliteVitalityDuration: number + HealExperience: number + OfflineDurationMin: number + OfflineDurationMax: number + RemovePrice: number + RemovedAfterDeath: boolean + Probability: IProbability } export interface IProbability { - FunctionType: string; - K: number; - B: number; - Threshold: number; + FunctionType: string + K: number + B: number + Threshold: number } export interface ILightBleeding { - DefaultDelay: number; - DefaultResidueTime: number; - DamageEnergy: number; - DamageHealth: number; - EnergyLoopTime: number; - HealthLoopTime: number; - DamageHealthDehydrated: number; - HealthLoopTimeDehydrated: number; - LifeTimeDehydrated: number; - EliteVitalityDuration: number; - HealExperience: number; - OfflineDurationMin: number; - OfflineDurationMax: number; - RemovePrice: number; - RemovedAfterDeath: boolean; - Probability: IProbability; + DefaultDelay: number + DefaultResidueTime: number + DamageEnergy: number + DamageHealth: number + EnergyLoopTime: number + HealthLoopTime: number + DamageHealthDehydrated: number + HealthLoopTimeDehydrated: number + LifeTimeDehydrated: number + EliteVitalityDuration: number + HealExperience: number + OfflineDurationMin: number + OfflineDurationMax: number + RemovePrice: number + RemovedAfterDeath: boolean + Probability: IProbability } export interface IBodyTemperature { - DefaultBuildUpTime: number; - DefaultResidueTime: number; - LoopTime: number; + DefaultBuildUpTime: number + DefaultResidueTime: number + LoopTime: number } export interface IHealPrice { - HealthPointPrice: number; - HydrationPointPrice: number; - EnergyPointPrice: number; - TrialLevels: number; - TrialRaids: number; + HealthPointPrice: number + HydrationPointPrice: number + EnergyPointPrice: number + TrialLevels: number + TrialRaids: number } export interface IProfileHealthSettings { - BodyPartsSettings: IBodyPartsSettings; - HealthFactorsSettings: IHealthFactorsSettings; - DefaultStimulatorBuff: string; + BodyPartsSettings: IBodyPartsSettings + HealthFactorsSettings: IHealthFactorsSettings + DefaultStimulatorBuff: string } export interface IBodyPartsSettings { - Head: IBodyPartsSetting; - Chest: IBodyPartsSetting; - Stomach: IBodyPartsSetting; - LeftArm: IBodyPartsSetting; - RightArm: IBodyPartsSetting; - LeftLeg: IBodyPartsSetting; - RightLeg: IBodyPartsSetting; + Head: IBodyPartsSetting + Chest: IBodyPartsSetting + Stomach: IBodyPartsSetting + LeftArm: IBodyPartsSetting + RightArm: IBodyPartsSetting + LeftLeg: IBodyPartsSetting + RightLeg: IBodyPartsSetting } export interface IBodyPartsSetting { - Minimum: number; - Maximum: number; - Default: number; - EnvironmentDamageMultiplier: number; - OverDamageReceivedMultiplier: number; + Minimum: number + Maximum: number + Default: number + EnvironmentDamageMultiplier: number + OverDamageReceivedMultiplier: number } export interface IHealthFactorsSettings { - Energy: IHealthFactorSetting; - Hydration: IHealthFactorSetting; - Temperature: IHealthFactorSetting; - Poisoning: IHealthFactorSetting; - Radiation: IHealthFactorSetting; + Energy: IHealthFactorSetting + Hydration: IHealthFactorSetting + Temperature: IHealthFactorSetting + Poisoning: IHealthFactorSetting + Radiation: IHealthFactorSetting } export interface IHealthFactorSetting { - Minimum: number; - Maximum: number; - Default: number; + Minimum: number + Maximum: number + Default: number } export interface IRating { - levelRequired: number; - limit: number; - categories: ICategories; + levelRequired: number + limit: number + categories: ICategories } export interface ICategories { - experience: boolean; - kd: boolean; - surviveRatio: boolean; - avgEarnings: boolean; - pmcKills: boolean; - raidCount: boolean; - longestShot: boolean; - timeOnline: boolean; - inventoryFullCost: boolean; - ragFairStanding: boolean; + experience: boolean + kd: boolean + surviveRatio: boolean + avgEarnings: boolean + pmcKills: boolean + raidCount: boolean + longestShot: boolean + timeOnline: boolean + inventoryFullCost: boolean + ragFairStanding: boolean } export interface ITournament { - categories: ITournamentCategories; - limit: number; - levelRequired: number; + categories: ITournamentCategories + limit: number + levelRequired: number } export interface ITournamentCategories { - dogtags: boolean; + dogtags: boolean } export interface IRagFair { - enabled: boolean; - priceStabilizerEnabled: boolean; - includePveTraderSales: boolean; - priceStabilizerStartIntervalInHours: number; - minUserLevel: number; - communityTax: number; - communityItemTax: number; - communityRequirementTax: number; - offerPriorityCost: number; - offerDurationTimeInHour: number; - offerDurationTimeInHourAfterRemove: number; - priorityTimeModifier: number; - maxRenewOfferTimeInHour: number; - renewPricePerHour: number; - maxActiveOfferCount: IMaxActiveOfferCount[]; - balancerRemovePriceCoefficient: number; - balancerMinPriceCount: number; - balancerAveragePriceCoefficient: number; - delaySinceOfferAdd: number; - uniqueBuyerTimeoutInDays: number; - ratingSumForIncrease: number; - ratingIncreaseCount: number; - ratingSumForDecrease: number; - ratingDecreaseCount: number; - maxSumForIncreaseRatingPerOneSale: number; - maxSumForDecreaseRatingPerOneSale: number; - maxSumForRarity: IMaxSumForRarity; - ChangePriceCoef: number; - balancerUserItemSaleCooldownEnabled: boolean; - balancerUserItemSaleCooldown: number; - youSellOfferMaxStorageTimeInHour: number; - yourOfferDidNotSellMaxStorageTimeInHour: number; - isOnlyFoundInRaidAllowed: boolean; - sellInOnePiece: number; + enabled: boolean + priceStabilizerEnabled: boolean + includePveTraderSales: boolean + priceStabilizerStartIntervalInHours: number + minUserLevel: number + communityTax: number + communityItemTax: number + communityRequirementTax: number + offerPriorityCost: number + offerDurationTimeInHour: number + offerDurationTimeInHourAfterRemove: number + priorityTimeModifier: number + maxRenewOfferTimeInHour: number + renewPricePerHour: number + maxActiveOfferCount: IMaxActiveOfferCount[] + balancerRemovePriceCoefficient: number + balancerMinPriceCount: number + balancerAveragePriceCoefficient: number + delaySinceOfferAdd: number + uniqueBuyerTimeoutInDays: number + ratingSumForIncrease: number + ratingIncreaseCount: number + ratingSumForDecrease: number + ratingDecreaseCount: number + maxSumForIncreaseRatingPerOneSale: number + maxSumForDecreaseRatingPerOneSale: number + maxSumForRarity: IMaxSumForRarity + ChangePriceCoef: number + balancerUserItemSaleCooldownEnabled: boolean + balancerUserItemSaleCooldown: number + youSellOfferMaxStorageTimeInHour: number + yourOfferDidNotSellMaxStorageTimeInHour: number + isOnlyFoundInRaidAllowed: boolean + sellInOnePiece: number } export interface IMaxActiveOfferCount { - from: number; - to: number; - count: number; - countForSpecialEditions: number; + from: number + to: number + count: number + countForSpecialEditions: number } export interface IMaxSumForRarity { - Common: IRarityMaxSum; - Rare: IRarityMaxSum; - Superrare: IRarityMaxSum; - Not_exist: IRarityMaxSum; + Common: IRarityMaxSum + Rare: IRarityMaxSum + Superrare: IRarityMaxSum + Not_exist: IRarityMaxSum } export interface IRarityMaxSum { - value: number; + value: number } export interface IHandbook { - defaultCategory: string; + defaultCategory: string } export interface IStamina { - Capacity: number; - SprintDrainRate: number; - BaseRestorationRate: number; - JumpConsumption: number; - GrenadeHighThrow: number; - GrenadeLowThrow: number; - AimDrainRate: number; - AimRangeFinderDrainRate: number; - OxygenCapacity: number; - OxygenRestoration: number; - WalkOverweightLimits: Ixyz; - BaseOverweightLimits: Ixyz; - SprintOverweightLimits: Ixyz; - WalkSpeedOverweightLimits: Ixyz; - CrouchConsumption: Ixyz; - WalkConsumption: Ixyz; - StandupConsumption: Ixyz; - TransitionSpeed: Ixyz; - SprintAccelerationLowerLimit: number; - SprintSpeedLowerLimit: number; - SprintSensitivityLowerLimit: number; - AimConsumptionByPose: Ixyz; - RestorationMultiplierByPose: Ixyz; - OverweightConsumptionByPose: Ixyz; - AimingSpeedMultiplier: number; - WalkVisualEffectMultiplier: number; - WeaponFastSwitchConsumption: number; - HandsCapacity: number; - HandsRestoration: number; - ProneConsumption: number; - BaseHoldBreathConsumption: number; - SoundRadius: Ixyz; - ExhaustedMeleeSpeed: number; - FatigueRestorationRate: number; - FatigueAmountToCreateEffect: number; - ExhaustedMeleeDamageMultiplier: number; - FallDamageMultiplier: number; - SafeHeightOverweight: number; - SitToStandConsumption: number; - StaminaExhaustionCausesJiggle: boolean; - StaminaExhaustionStartsBreathSound: boolean; - StaminaExhaustionRocksCamera: boolean; - HoldBreathStaminaMultiplier: Ixyz; - PoseLevelIncreaseSpeed: Ixyz; - PoseLevelDecreaseSpeed: Ixyz; - PoseLevelConsumptionPerNotch: Ixyz; + Capacity: number + SprintDrainRate: number + BaseRestorationRate: number + JumpConsumption: number + GrenadeHighThrow: number + GrenadeLowThrow: number + AimDrainRate: number + AimRangeFinderDrainRate: number + OxygenCapacity: number + OxygenRestoration: number + WalkOverweightLimits: Ixyz + BaseOverweightLimits: Ixyz + SprintOverweightLimits: Ixyz + WalkSpeedOverweightLimits: Ixyz + CrouchConsumption: Ixyz + WalkConsumption: Ixyz + StandupConsumption: Ixyz + TransitionSpeed: Ixyz + SprintAccelerationLowerLimit: number + SprintSpeedLowerLimit: number + SprintSensitivityLowerLimit: number + AimConsumptionByPose: Ixyz + RestorationMultiplierByPose: Ixyz + OverweightConsumptionByPose: Ixyz + AimingSpeedMultiplier: number + WalkVisualEffectMultiplier: number + WeaponFastSwitchConsumption: number + HandsCapacity: number + HandsRestoration: number + ProneConsumption: number + BaseHoldBreathConsumption: number + SoundRadius: Ixyz + ExhaustedMeleeSpeed: number + FatigueRestorationRate: number + FatigueAmountToCreateEffect: number + ExhaustedMeleeDamageMultiplier: number + FallDamageMultiplier: number + SafeHeightOverweight: number + SitToStandConsumption: number + StaminaExhaustionCausesJiggle: boolean + StaminaExhaustionStartsBreathSound: boolean + StaminaExhaustionRocksCamera: boolean + HoldBreathStaminaMultiplier: Ixyz + PoseLevelIncreaseSpeed: Ixyz + PoseLevelDecreaseSpeed: Ixyz + PoseLevelConsumptionPerNotch: Ixyz } export interface IStaminaRestoration { - LowerLeftPoint: number; - LowerRightPoint: number; - LeftPlatoPoint: number; - RightPlatoPoint: number; - RightLimit: number; - ZeroValue: number; + LowerLeftPoint: number + LowerRightPoint: number + LeftPlatoPoint: number + RightPlatoPoint: number + RightLimit: number + ZeroValue: number } export interface IStaminaDrain { - LowerLeftPoint: number; - LowerRightPoint: number; - LeftPlatoPoint: number; - RightPlatoPoint: number; - RightLimit: number; - ZeroValue: number; + LowerLeftPoint: number + LowerRightPoint: number + LeftPlatoPoint: number + RightPlatoPoint: number + RightLimit: number + ZeroValue: number } export interface IRequirementReferences { - Alpinist: IAlpinist[]; + Alpinist: IAlpinist[] } export interface IAlpinist { - Requirement: string; - Id: string; - Count: number; - RequiredSlot: string; - RequirementTip: string; + Requirement: string + Id: string + Count: number + RequiredSlot: string + RequirementTip: string } export interface IRestrictionsInRaid { - TemplateId: string; - Value: number; + TemplateId: string + Value: number } export interface IFavoriteItemsSettings { - WeaponStandMaxItemsCount: number; - PlaceOfFameMaxItemsCount: number; + WeaponStandMaxItemsCount: number + PlaceOfFameMaxItemsCount: number } export interface IVaultingSettings { - IsActive: boolean; - VaultingInputTime: number; - GridSettings: IVaultingGridSettings; - MovesSettings: IVaultingMovesSettings; + IsActive: boolean + VaultingInputTime: number + GridSettings: IVaultingGridSettings + MovesSettings: IVaultingMovesSettings } export interface IVaultingGridSettings { - GridSizeX: number; - GridSizeY: number; - GridSizeZ: number; - SteppingLengthX: number; - SteppingLengthY: number; - SteppingLengthZ: number; - GridOffsetX: number; - GridOffsetY: number; - GridOffsetZ: number; - OffsetFactor: number; + GridSizeX: number + GridSizeY: number + GridSizeZ: number + SteppingLengthX: number + SteppingLengthY: number + SteppingLengthZ: number + GridOffsetX: number + GridOffsetY: number + GridOffsetZ: number + OffsetFactor: number } export interface IVaultingMovesSettings { - VaultSettings: IVaultingSubMoveSettings; - ClimbSettings: IVaultingSubMoveSettings; + VaultSettings: IVaultingSubMoveSettings + ClimbSettings: IVaultingSubMoveSettings } export interface IVaultingSubMoveSettings { - IsActive: boolean; - MaxWithoutHandHeight: number; - SpeedRange: Ixyz; - MoveRestrictions: IMoveRestrictions; - AutoMoveRestrictions: IMoveRestrictions; + IsActive: boolean + MaxWithoutHandHeight: number + SpeedRange: Ixyz + MoveRestrictions: IMoveRestrictions + AutoMoveRestrictions: IMoveRestrictions } export interface IMoveRestrictions { - IsActive: boolean; - MinDistantToInteract: number; - MinHeight: number; - MaxHeight: number; - MinLength: number; - MaxLength: number; + IsActive: boolean + MinDistantToInteract: number + MinHeight: number + MaxHeight: number + MinLength: number + MaxLength: number } export interface IBTRSettings { - LocationsWithBTR: string[]; - BasePriceTaxi: number; - AddPriceTaxi: number; - CleanUpPrice: number; - DeliveryPrice: number; - ModDeliveryCost: number; - BearPriceMod: number; - UsecPriceMod: number; - ScavPriceMod: number; - CoefficientDiscountCharisma: number; - DeliveryMinPrice: number; - TaxiMinPrice: number; - BotCoverMinPrice: number; - MapsConfigs: Record; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - SnapToSurfaceWheelsSpeed: number; - CheckSurfaceForWheelsTimer: number; - HeightWheelOffset: number; + LocationsWithBTR: string[] + BasePriceTaxi: number + AddPriceTaxi: number + CleanUpPrice: number + DeliveryPrice: number + ModDeliveryCost: number + BearPriceMod: number + UsecPriceMod: number + ScavPriceMod: number + CoefficientDiscountCharisma: number + DeliveryMinPrice: number + TaxiMinPrice: number + BotCoverMinPrice: number + MapsConfigs: Record + DiameterWheel: number + HeightWheel: number + HeightWheelMaxPosLimit: number + HeightWheelMinPosLimit: number + SnapToSurfaceWheelsSpeed: number + CheckSurfaceForWheelsTimer: number + HeightWheelOffset: number } export interface IBtrMapConfig { - BtrSkin: string; - CheckSurfaceForWheelsTimer: number; - DiameterWheel: number; - HeightWheel: number; - HeightWheelMaxPosLimit: number; - HeightWheelMinPosLimit: number; - HeightWheelOffset: number; - SnapToSurfaceWheelsSpeed: number; - SuspensionDamperStiffness: number; - SuspensionRestLength: number; - SuspensionSpringStiffness: number; - SuspensionTravel: number; - SuspensionWheelRadius: number; - mapID: string; - pathsConfigurations: IPathConfig[]; + BtrSkin: string + CheckSurfaceForWheelsTimer: number + DiameterWheel: number + HeightWheel: number + HeightWheelMaxPosLimit: number + HeightWheelMinPosLimit: number + HeightWheelOffset: number + SnapToSurfaceWheelsSpeed: number + SuspensionDamperStiffness: number + SuspensionRestLength: number + SuspensionSpringStiffness: number + SuspensionTravel: number + SuspensionWheelRadius: number + mapID: string + pathsConfigurations: IPathConfig[] } export interface IPathConfig { - active: boolean; - id: string; - enterPoint: string; - exitPoint: string; - pathPoints: string[]; - once: boolean; - circle: boolean; - circleCount: number; + active: boolean + id: string + enterPoint: string + exitPoint: string + pathPoints: string[] + once: boolean + circle: boolean + circleCount: number } export interface ISquadSettings { - CountOfRequestsToOnePlayer: number; - SecondsForExpiredRequest: number; - SendRequestDelaySeconds: number; + CountOfRequestsToOnePlayer: number + SecondsForExpiredRequest: number + SendRequestDelaySeconds: number } export interface IInsurance { - MaxStorageTimeInHour: number; - CoefOfSendingMessageTime: number; - CoefOfHavingMarkOfUnknown: number; + MaxStorageTimeInHour: number + CoefOfSendingMessageTime: number + CoefOfHavingMarkOfUnknown: number } export interface ISkillsSettings { - SkillProgressRate: number; - WeaponSkillProgressRate: number; - WeaponSkillRecoilBonusPerLevel: number; - HideoutManagement: IHideoutManagement; - Crafting: ICrafting; - Metabolism: IMetabolism; - Immunity: Immunity; - Endurance: IEndurance; - Strength: IStrength; - Vitality: IVitality; - Health: IHealthSkillProgress; - StressResistance: IStressResistance; - Throwing: IThrowing; - RecoilControl: IRecoilControl; - Pistol: IWeaponSkills; - Revolver: IWeaponSkills; - SMG: any[]; - Assault: IWeaponSkills; - Shotgun: IWeaponSkills; - Sniper: IWeaponSkills; - LMG: any[]; - HMG: any[]; - Launcher: any[]; - AttachedLauncher: any[]; - Melee: IMeleeSkill; - DMR: IWeaponSkills; - BearAssaultoperations: any[]; - BearAuthority: any[]; - BearAksystems: any[]; - BearHeavycaliber: any[]; - BearRawpower: any[]; - UsecArsystems: any[]; - UsecDeepweaponmodding_Settings: any[]; - UsecLongrangeoptics_Settings: any[]; - UsecNegotiations: any[]; - UsecTactics: any[]; - BotReload: any[]; - CovertMovement: ICovertMovement; - FieldMedicine: any[]; - Search: ISearch; - Sniping: any[]; - ProneMovement: any[]; - FirstAid: any[]; - LightVests: IArmorSkills; - HeavyVests: IArmorSkills; - WeaponModding: any[]; - AdvancedModding: any[]; - NightOps: any[]; - SilentOps: any[]; - Lockpicking: any[]; - WeaponTreatment: IWeaponTreatment; - MagDrills: IMagDrills; - Freetrading: any[]; - Auctions: any[]; - Cleanoperations: any[]; - Barter: any[]; - Shadowconnections: any[]; - Taskperformance: any[]; - Perception: IPerception; - Intellect: Intellect; - Attention: IAttention; - Charisma: ICharisma; - Memory: IMemory; - Surgery: ISurgery; - AimDrills: IAimDrills; - BotSound: any[]; - TroubleShooting: ITroubleShooting; + SkillProgressRate: number + WeaponSkillProgressRate: number + WeaponSkillRecoilBonusPerLevel: number + HideoutManagement: IHideoutManagement + Crafting: ICrafting + Metabolism: IMetabolism + Immunity: Immunity + Endurance: IEndurance + Strength: IStrength + Vitality: IVitality + Health: IHealthSkillProgress + StressResistance: IStressResistance + Throwing: IThrowing + RecoilControl: IRecoilControl + Pistol: IWeaponSkills + Revolver: IWeaponSkills + SMG: any[] + Assault: IWeaponSkills + Shotgun: IWeaponSkills + Sniper: IWeaponSkills + LMG: any[] + HMG: any[] + Launcher: any[] + AttachedLauncher: any[] + Melee: IMeleeSkill + DMR: IWeaponSkills + BearAssaultoperations: any[] + BearAuthority: any[] + BearAksystems: any[] + BearHeavycaliber: any[] + BearRawpower: any[] + UsecArsystems: any[] + UsecDeepweaponmodding_Settings: any[] + UsecLongrangeoptics_Settings: any[] + UsecNegotiations: any[] + UsecTactics: any[] + BotReload: any[] + CovertMovement: ICovertMovement + FieldMedicine: any[] + Search: ISearch + Sniping: any[] + ProneMovement: any[] + FirstAid: any[] + LightVests: IArmorSkills + HeavyVests: IArmorSkills + WeaponModding: any[] + AdvancedModding: any[] + NightOps: any[] + SilentOps: any[] + Lockpicking: any[] + WeaponTreatment: IWeaponTreatment + MagDrills: IMagDrills + Freetrading: any[] + Auctions: any[] + Cleanoperations: any[] + Barter: any[] + Shadowconnections: any[] + Taskperformance: any[] + Perception: IPerception + Intellect: Intellect + Attention: IAttention + Charisma: ICharisma + Memory: IMemory + Surgery: ISurgery + AimDrills: IAimDrills + BotSound: any[] + TroubleShooting: ITroubleShooting } export interface IMeleeSkill { - BuffSettings: IBuffSettings; + BuffSettings: IBuffSettings } export interface IArmorSkills { - BuffMaxCount: number; - BuffSettings: IBuffSettings; - Counters: IArmorCounters; - MoveSpeedPenaltyReductionHVestsReducePerLevel: number; - RicochetChanceHVestsCurrentDurabilityThreshold: number; - RicochetChanceHVestsEliteLevel: number; - RicochetChanceHVestsMaxDurabilityThreshold: number; - MeleeDamageLVestsReducePerLevel: number; - MoveSpeedPenaltyReductionLVestsReducePerLevel: number; - WearAmountRepairLVestsReducePerLevel: number; - WearChanceRepairLVestsReduceEliteLevel: number; + BuffMaxCount: number + BuffSettings: IBuffSettings + Counters: IArmorCounters + MoveSpeedPenaltyReductionHVestsReducePerLevel: number + RicochetChanceHVestsCurrentDurabilityThreshold: number + RicochetChanceHVestsEliteLevel: number + RicochetChanceHVestsMaxDurabilityThreshold: number + MeleeDamageLVestsReducePerLevel: number + MoveSpeedPenaltyReductionLVestsReducePerLevel: number + WearAmountRepairLVestsReducePerLevel: number + WearChanceRepairLVestsReduceEliteLevel: number } export interface IArmorCounters { - armorDurability: ISkillCounter; + armorDurability: ISkillCounter } export interface IHideoutManagement { - SkillPointsPerAreaUpgrade: number; - SkillPointsPerCraft: number; - ConsumptionReductionPerLevel: number; - SkillBoostPercent: number; - SkillPointsRate: ISkillPointsRate; - EliteSlots: IEliteSlots; + SkillPointsPerAreaUpgrade: number + SkillPointsPerCraft: number + ConsumptionReductionPerLevel: number + SkillBoostPercent: number + SkillPointsRate: ISkillPointsRate + EliteSlots: IEliteSlots } export interface ISkillPointsRate { - Generator: ISkillPointRate; - AirFilteringUnit: ISkillPointRate; - WaterCollector: ISkillPointRate; - SolarPower: ISkillPointRate; + Generator: ISkillPointRate + AirFilteringUnit: ISkillPointRate + WaterCollector: ISkillPointRate + SolarPower: ISkillPointRate } export interface ISkillPointRate { - ResourceSpent: number; - PointsGained: number; + ResourceSpent: number + PointsGained: number } export interface IEliteSlots { - Generator: IEliteSlot; - AirFilteringUnit: IEliteSlot; - WaterCollector: IEliteSlot; - BitcoinFarm: IEliteSlot; + Generator: IEliteSlot + AirFilteringUnit: IEliteSlot + WaterCollector: IEliteSlot + BitcoinFarm: IEliteSlot } export interface IEliteSlot { - Slots: number; - Container: number; + Slots: number + Container: number } export interface ICrafting { - PointsPerCraftingCycle: number; - CraftingCycleHours: number; - PointsPerUniqueCraftCycle: number; - UniqueCraftsPerCycle: number; - CraftTimeReductionPerLevel: number; - ProductionTimeReductionPerLevel: number; - EliteExtraProductions: number; - CraftingPointsToInteligence: number; + PointsPerCraftingCycle: number + CraftingCycleHours: number + PointsPerUniqueCraftCycle: number + UniqueCraftsPerCycle: number + CraftTimeReductionPerLevel: number + ProductionTimeReductionPerLevel: number + EliteExtraProductions: number + CraftingPointsToInteligence: number } export interface IMetabolism { - HydrationRecoveryRate: number; - EnergyRecoveryRate: number; - IncreasePositiveEffectDurationRate: number; - DecreaseNegativeEffectDurationRate: number; - DecreasePoisonDurationRate: number; + HydrationRecoveryRate: number + EnergyRecoveryRate: number + IncreasePositiveEffectDurationRate: number + DecreaseNegativeEffectDurationRate: number + DecreasePoisonDurationRate: number } export interface Immunity { - ImmunityMiscEffects: number; - ImmunityPoisonBuff: number; - ImmunityPainKiller: number; - HealthNegativeEffect: number; - StimulatorNegativeBuff: number; + ImmunityMiscEffects: number + ImmunityPoisonBuff: number + ImmunityPainKiller: number + HealthNegativeEffect: number + StimulatorNegativeBuff: number } export interface IEndurance { - MovementAction: number; - SprintAction: number; - GainPerFatigueStack: number; - DependentSkillRatios: IDependentSkillRatio[]; - QTELevelMultipliers: Record>; + MovementAction: number + SprintAction: number + GainPerFatigueStack: number + DependentSkillRatios: IDependentSkillRatio[] + QTELevelMultipliers: Record> } export interface IStrength { - DependentSkillRatios: IDependentSkillRatio[]; - SprintActionMin: number; - SprintActionMax: number; - MovementActionMin: number; - MovementActionMax: number; - PushUpMin: number; - PushUpMax: number; - QTELevelMultipliers: IQTELevelMultiplier[]; - FistfightAction: number; - ThrowAction: number; + DependentSkillRatios: IDependentSkillRatio[] + SprintActionMin: number + SprintActionMax: number + MovementActionMin: number + MovementActionMax: number + PushUpMin: number + PushUpMax: number + QTELevelMultipliers: IQTELevelMultiplier[] + FistfightAction: number + ThrowAction: number } export interface IDependentSkillRatio { - Ratio: number; - SkillId: string; + Ratio: number + SkillId: string } export interface IQTELevelMultiplier { - Level: number; - Multiplier: number; + Level: number + Multiplier: number } export interface IVitality { - DamageTakenAction: number; - HealthNegativeEffect: number; + DamageTakenAction: number + HealthNegativeEffect: number } export interface IHealthSkillProgress { - SkillProgress: number; + SkillProgress: number } export interface IStressResistance { - HealthNegativeEffect: number; - LowHPDuration: number; + HealthNegativeEffect: number + LowHPDuration: number } export interface IThrowing { - ThrowAction: number; + ThrowAction: number } export interface IRecoilControl { - RecoilAction: number; - RecoilBonusPerLevel: number; + RecoilAction: number + RecoilBonusPerLevel: number } export interface IWeaponSkills { - WeaponReloadAction: number; - WeaponShotAction: number; - WeaponFixAction: number; - WeaponChamberAction: number; + WeaponReloadAction: number + WeaponShotAction: number + WeaponFixAction: number + WeaponChamberAction: number } export interface ICovertMovement { - MovementAction: number; + MovementAction: number } export interface ISearch { - SearchAction: number; - FindAction: number; + SearchAction: number + FindAction: number } export interface IWeaponTreatment { - BuffMaxCount: number; - BuffSettings: IBuffSettings; - Counters: IWeaponTreatmentCounters; - DurLossReducePerLevel: number; - SkillPointsPerRepair: number; - Filter: any[]; - WearAmountRepairGunsReducePerLevel: number; - WearChanceRepairGunsReduceEliteLevel: number; + BuffMaxCount: number + BuffSettings: IBuffSettings + Counters: IWeaponTreatmentCounters + DurLossReducePerLevel: number + SkillPointsPerRepair: number + Filter: any[] + WearAmountRepairGunsReducePerLevel: number + WearChanceRepairGunsReduceEliteLevel: number } export interface IWeaponTreatmentCounters { - firearmsDurability: ISkillCounter; + firearmsDurability: ISkillCounter } export interface IBuffSettings { - CommonBuffChanceLevelBonus: number; - CommonBuffMinChanceValue: number; - CurrentDurabilityLossToRemoveBuff?: number; - MaxDurabilityLossToRemoveBuff?: number; - RareBuffChanceCoff: number; - ReceivedDurabilityMaxPercent: number; + CommonBuffChanceLevelBonus: number + CommonBuffMinChanceValue: number + CurrentDurabilityLossToRemoveBuff?: number + MaxDurabilityLossToRemoveBuff?: number + RareBuffChanceCoff: number + ReceivedDurabilityMaxPercent: number } export interface IMagDrills { - RaidLoadedAmmoAction: number; - RaidUnloadedAmmoAction: number; - MagazineCheckAction: number; + RaidLoadedAmmoAction: number + RaidUnloadedAmmoAction: number + MagazineCheckAction: number } export interface IPerception { - DependentSkillRatios: ISkillRatio[]; - OnlineAction: number; - UniqueLoot: number; + DependentSkillRatios: ISkillRatio[] + OnlineAction: number + UniqueLoot: number } export interface ISkillRatio { - Ratio: number; - SkillId: string; + Ratio: number + SkillId: string } export interface Intellect { - Counters: IIntellectCounters; - ExamineAction: number; - SkillProgress: number; - RepairAction: number; - WearAmountReducePerLevel: number; - WearChanceReduceEliteLevel: number; - RepairPointsCostReduction: number; + Counters: IIntellectCounters + ExamineAction: number + SkillProgress: number + RepairAction: number + WearAmountReducePerLevel: number + WearChanceReduceEliteLevel: number + RepairPointsCostReduction: number } export interface IIntellectCounters { - armorDurability: ISkillCounter; - firearmsDurability: ISkillCounter; - meleeWeaponDurability: ISkillCounter; + armorDurability: ISkillCounter + firearmsDurability: ISkillCounter + meleeWeaponDurability: ISkillCounter } export interface ISkillCounter { - divisor: number; - points: number; + divisor: number + points: number } export interface IAttention { - DependentSkillRatios: ISkillRatio[]; - ExamineWithInstruction: number; - FindActionFalse: number; - FindActionTrue: number; + DependentSkillRatios: ISkillRatio[] + ExamineWithInstruction: number + FindActionFalse: number + FindActionTrue: number } export interface ICharisma { - BonusSettings: IBonusSettings; - Counters: ICharismaSkillCounters; - SkillProgressInt: number; - SkillProgressAtn: number; - SkillProgressPer: number; + BonusSettings: IBonusSettings + Counters: ICharismaSkillCounters + SkillProgressInt: number + SkillProgressAtn: number + SkillProgressPer: number } export interface ICharismaSkillCounters { - insuranceCost: ISkillCounter; - repairCost: ISkillCounter; - repeatableQuestCompleteCount: ISkillCounter; - restoredHealthCost: ISkillCounter; - scavCaseCost: ISkillCounter; + insuranceCost: ISkillCounter + repairCost: ISkillCounter + repeatableQuestCompleteCount: ISkillCounter + restoredHealthCost: ISkillCounter + scavCaseCost: ISkillCounter } export interface IBonusSettings { - EliteBonusSettings: IEliteBonusSettings; - LevelBonusSettings: ILevelBonusSettings; + EliteBonusSettings: IEliteBonusSettings + LevelBonusSettings: ILevelBonusSettings } export interface IEliteBonusSettings { - FenceStandingLossDiscount: number; - RepeatableQuestExtraCount: number; - ScavCaseDiscount: number; + FenceStandingLossDiscount: number + RepeatableQuestExtraCount: number + ScavCaseDiscount: number } export interface ILevelBonusSettings { - HealthRestoreDiscount: number; - HealthRestoreTraderDiscount: number; - InsuranceDiscount: number; - InsuranceTraderDiscount: number; - PaidExitDiscount: number; - RepeatableQuestChangeDiscount: number; + HealthRestoreDiscount: number + HealthRestoreTraderDiscount: number + InsuranceDiscount: number + InsuranceTraderDiscount: number + PaidExitDiscount: number + RepeatableQuestChangeDiscount: number } export interface IMemory { - AnySkillUp: number; - SkillProgress: number; + AnySkillUp: number + SkillProgress: number } export interface ISurgery { - SurgeryAction: number; - SkillProgress: number; + SurgeryAction: number + SkillProgress: number } export interface IAimDrills { - WeaponShotAction: number; + WeaponShotAction: number } export interface ITroubleShooting { - MalfRepairSpeedBonusPerLevel: number; - SkillPointsPerMalfFix: number; - EliteDurabilityChanceReduceMult: number; - EliteAmmoChanceReduceMult: number; - EliteMagChanceReduceMult: number; + MalfRepairSpeedBonusPerLevel: number + SkillPointsPerMalfFix: number + EliteDurabilityChanceReduceMult: number + EliteAmmoChanceReduceMult: number + EliteMagChanceReduceMult: number } export interface IAiming { - ProceduralIntensityByPose: Ixyz; - AimProceduralIntensity: number; - HeavyWeight: number; - LightWeight: number; - MaxTimeHeavy: number; - MinTimeHeavy: number; - MaxTimeLight: number; - MinTimeLight: number; - RecoilScaling: number; - RecoilDamping: number; - CameraSnapGlobalMult: number; - RecoilXIntensityByPose: Ixyz; - RecoilYIntensityByPose: Ixyz; - RecoilZIntensityByPose: Ixyz; - RecoilCrank: boolean; - RecoilHandDamping: number; - RecoilConvergenceMult: number; - RecoilVertBonus: number; - RecoilBackBonus: number; + ProceduralIntensityByPose: Ixyz + AimProceduralIntensity: number + HeavyWeight: number + LightWeight: number + MaxTimeHeavy: number + MinTimeHeavy: number + MaxTimeLight: number + MinTimeLight: number + RecoilScaling: number + RecoilDamping: number + CameraSnapGlobalMult: number + RecoilXIntensityByPose: Ixyz + RecoilYIntensityByPose: Ixyz + RecoilZIntensityByPose: Ixyz + RecoilCrank: boolean + RecoilHandDamping: number + RecoilConvergenceMult: number + RecoilVertBonus: number + RecoilBackBonus: number } export interface IMalfunction { - AmmoMalfChanceMult: number; - MagazineMalfChanceMult: number; - MalfRepairHardSlideMult: number; - MalfRepairOneHandBrokenMult: number; - MalfRepairTwoHandsBrokenMult: number; - AllowMalfForBots: boolean; - ShowGlowAttemptsCount: number; - OutToIdleSpeedMultForPistol: number; - IdleToOutSpeedMultOnMalf: number; - TimeToQuickdrawPistol: number; - DurRangeToIgnoreMalfs: Ixyz; - DurFeedWt: number; - DurMisfireWt: number; - DurJamWt: number; - DurSoftSlideWt: number; - DurHardSlideMinWt: number; - DurHardSlideMaxWt: number; - AmmoMisfireWt: number; - AmmoFeedWt: number; - AmmoJamWt: number; - OverheatFeedWt: number; - OverheatJamWt: number; - OverheatSoftSlideWt: number; - OverheatHardSlideMinWt: number; - OverheatHardSlideMaxWt: number; + AmmoMalfChanceMult: number + MagazineMalfChanceMult: number + MalfRepairHardSlideMult: number + MalfRepairOneHandBrokenMult: number + MalfRepairTwoHandsBrokenMult: number + AllowMalfForBots: boolean + ShowGlowAttemptsCount: number + OutToIdleSpeedMultForPistol: number + IdleToOutSpeedMultOnMalf: number + TimeToQuickdrawPistol: number + DurRangeToIgnoreMalfs: Ixyz + DurFeedWt: number + DurMisfireWt: number + DurJamWt: number + DurSoftSlideWt: number + DurHardSlideMinWt: number + DurHardSlideMaxWt: number + AmmoMisfireWt: number + AmmoFeedWt: number + AmmoJamWt: number + OverheatFeedWt: number + OverheatJamWt: number + OverheatSoftSlideWt: number + OverheatHardSlideMinWt: number + OverheatHardSlideMaxWt: number } export interface IOverheat { - MinOverheat: number; - MaxOverheat: number; - OverheatProblemsStart: number; - ModHeatFactor: number; - ModCoolFactor: number; - MinWearOnOverheat: number; - MaxWearOnOverheat: number; - MinWearOnMaxOverheat: number; - MaxWearOnMaxOverheat: number; - OverheatWearLimit: number; - MaxCOIIncreaseMult: number; - MinMalfChance: number; - MaxMalfChance: number; - DurReduceMinMult: number; - DurReduceMaxMult: number; - BarrelMoveRndDuration: number; - BarrelMoveMaxMult: number; - FireratePitchMult: number; - FirerateReduceMinMult: number; - FirerateReduceMaxMult: number; - FirerateOverheatBorder: number; - EnableSlideOnMaxOverheat: boolean; - StartSlideOverheat: number; - FixSlideOverheat: number; - AutoshotMinOverheat: number; - AutoshotChance: number; - AutoshotPossibilityDuration: number; - MaxOverheatCoolCoef: number; + MinOverheat: number + MaxOverheat: number + OverheatProblemsStart: number + ModHeatFactor: number + ModCoolFactor: number + MinWearOnOverheat: number + MaxWearOnOverheat: number + MinWearOnMaxOverheat: number + MaxWearOnMaxOverheat: number + OverheatWearLimit: number + MaxCOIIncreaseMult: number + MinMalfChance: number + MaxMalfChance: number + DurReduceMinMult: number + DurReduceMaxMult: number + BarrelMoveRndDuration: number + BarrelMoveMaxMult: number + FireratePitchMult: number + FirerateReduceMinMult: number + FirerateReduceMaxMult: number + FirerateOverheatBorder: number + EnableSlideOnMaxOverheat: boolean + StartSlideOverheat: number + FixSlideOverheat: number + AutoshotMinOverheat: number + AutoshotChance: number + AutoshotPossibilityDuration: number + MaxOverheatCoolCoef: number } export interface IFenceSettings { - FenceId: string; - Levels: Record; - paidExitStandingNumerator: number; + FenceId: string + Levels: Record + paidExitStandingNumerator: number } export interface IFenceLevel { - ReachOnMarkOnUnknowns: boolean; - SavageCooldownModifier: number; - ScavCaseTimeModifier: number; - PaidExitCostModifier: number; - BotFollowChance: number; - ScavEquipmentSpawnChanceModifier: number; - PriceModifier: number; - HostileBosses: boolean; - HostileScavs: boolean; - ScavAttackSupport: boolean; - ExfiltrationPriceModifier: number; - AvailableExits: number; - BotApplySilenceChance: number; - BotGetInCoverChance: number; - BotHelpChance: number; - BotSpreadoutChance: number; - BotStopChance: number; - PriceModTaxi: number; - PriceModDelivery: number; - PriceModCleanUp: number; - DeliveryGridSize: Ixyz; - CanInteractWithBtr: boolean; + ReachOnMarkOnUnknowns: boolean + SavageCooldownModifier: number + ScavCaseTimeModifier: number + PaidExitCostModifier: number + BotFollowChance: number + ScavEquipmentSpawnChanceModifier: number + PriceModifier: number + HostileBosses: boolean + HostileScavs: boolean + ScavAttackSupport: boolean + ExfiltrationPriceModifier: number + AvailableExits: number + BotApplySilenceChance: number + BotGetInCoverChance: number + BotHelpChance: number + BotSpreadoutChance: number + BotStopChance: number + PriceModTaxi: number + PriceModDelivery: number + PriceModCleanUp: number + DeliveryGridSize: Ixyz + CanInteractWithBtr: boolean } export interface IInertia { - InertiaLimits: Ixyz; - InertiaLimitsStep: number; - ExitMovementStateSpeedThreshold: Ixyz; - WalkInertia: Ixyz; - FallThreshold: number; - SpeedLimitAfterFallMin: Ixyz; - SpeedLimitAfterFallMax: Ixyz; - SpeedLimitDurationMin: Ixyz; - SpeedLimitDurationMax: Ixyz; - SpeedInertiaAfterJump: Ixyz; - BaseJumpPenaltyDuration: number; - DurationPower: number; - BaseJumpPenalty: number; - PenaltyPower: number; - InertiaTiltCurveMin: Ixyz; - InertiaTiltCurveMax: Ixyz; - InertiaBackwardCoef: Ixyz; - TiltInertiaMaxSpeed: Ixyz; - TiltStartSideBackSpeed: Ixyz; - TiltMaxSideBackSpeed: Ixyz; - TiltAcceleration: Ixyz; - AverageRotationFrameSpan: number; - SprintSpeedInertiaCurveMin: Ixyz; - SprintSpeedInertiaCurveMax: Ixyz; - SprintBrakeInertia: Ixyz; - SprintTransitionMotionPreservation: Ixyz; - WeaponFlipSpeed: Ixyz; - PreSprintAccelerationLimits: Ixyz; - SprintAccelerationLimits: Ixyz; - SideTime: Ixyz; - DiagonalTime: Ixyz; - MaxTimeWithoutInput: Ixyz; - MinDirectionBlendTime: number; - MoveTimeRange: Ixyz; - ProneDirectionAccelerationRange: Ixyz; - ProneSpeedAccelerationRange: Ixyz; - MinMovementAccelerationRangeRight: Ixyz; - MaxMovementAccelerationRangeRight: Ixyz; + InertiaLimits: Ixyz + InertiaLimitsStep: number + ExitMovementStateSpeedThreshold: Ixyz + WalkInertia: Ixyz + FallThreshold: number + SpeedLimitAfterFallMin: Ixyz + SpeedLimitAfterFallMax: Ixyz + SpeedLimitDurationMin: Ixyz + SpeedLimitDurationMax: Ixyz + SpeedInertiaAfterJump: Ixyz + BaseJumpPenaltyDuration: number + DurationPower: number + BaseJumpPenalty: number + PenaltyPower: number + InertiaTiltCurveMin: Ixyz + InertiaTiltCurveMax: Ixyz + InertiaBackwardCoef: Ixyz + TiltInertiaMaxSpeed: Ixyz + TiltStartSideBackSpeed: Ixyz + TiltMaxSideBackSpeed: Ixyz + TiltAcceleration: Ixyz + AverageRotationFrameSpan: number + SprintSpeedInertiaCurveMin: Ixyz + SprintSpeedInertiaCurveMax: Ixyz + SprintBrakeInertia: Ixyz + SprintTransitionMotionPreservation: Ixyz + WeaponFlipSpeed: Ixyz + PreSprintAccelerationLimits: Ixyz + SprintAccelerationLimits: Ixyz + SideTime: Ixyz + DiagonalTime: Ixyz + MaxTimeWithoutInput: Ixyz + MinDirectionBlendTime: number + MoveTimeRange: Ixyz + ProneDirectionAccelerationRange: Ixyz + ProneSpeedAccelerationRange: Ixyz + MinMovementAccelerationRangeRight: Ixyz + MaxMovementAccelerationRangeRight: Ixyz } export interface IBallistic { - GlobalDamageDegradationCoefficient: number; + GlobalDamageDegradationCoefficient: number } export interface IRepairSettings { - ItemEnhancementSettings: IItemEnhancementSettings; - MinimumLevelToApplyBuff: number; - RepairStrategies: IRepairStrategies; - armorClassDivisor: number; - durabilityPointCostArmor: number; - durabilityPointCostGuns: number; + ItemEnhancementSettings: IItemEnhancementSettings + MinimumLevelToApplyBuff: number + RepairStrategies: IRepairStrategies + armorClassDivisor: number + durabilityPointCostArmor: number + durabilityPointCostGuns: number } export interface IItemEnhancementSettings { - DamageReduction: IPriceModifier; - MalfunctionProtections: IPriceModifier; - WeaponSpread: IPriceModifier; + DamageReduction: IPriceModifier + MalfunctionProtections: IPriceModifier + WeaponSpread: IPriceModifier } export interface IPriceModifier { - PriceModifier: number; + PriceModifier: number } export interface IRepairStrategies { - Armor: IRepairStrategy; - Firearms: IRepairStrategy; + Armor: IRepairStrategy + Firearms: IRepairStrategy } export interface IRepairStrategy { - BuffTypes: string[]; - Filter: string[]; + BuffTypes: string[] + Filter: string[] } export interface IBotPreset { - UseThis: boolean; - Role: string; - BotDifficulty: string; - VisibleAngle: number; - VisibleDistance: number; - ScatteringPerMeter: number; - HearingSense: number; - SCATTERING_DIST_MODIF: number; - MAX_AIMING_UPGRADE_BY_TIME: number; - FIRST_CONTACT_ADD_SEC: number; - COEF_IF_MOVE: number; + UseThis: boolean + Role: string + BotDifficulty: string + VisibleAngle: number + VisibleDistance: number + ScatteringPerMeter: number + HearingSense: number + SCATTERING_DIST_MODIF: number + MAX_AIMING_UPGRADE_BY_TIME: number + FIRST_CONTACT_ADD_SEC: number + COEF_IF_MOVE: number } export interface IAudioSettings { - AudioGroupPresets: IAudioGroupPreset[]; + AudioGroupPresets: IAudioGroupPreset[] } export interface IAudioGroupPreset { - AngleToAllowBinaural: number; - DisabledBinauralByDistance: boolean; - DistanceToAllowBinaural: number; - GroupType: number; - HeightToAllowBinaural: number; - Name: string; - OcclusionEnabled: boolean; - OcclusionIntensity: number; - OverallVolume: number; + AngleToAllowBinaural: number + DisabledBinauralByDistance: boolean + DistanceToAllowBinaural: number + GroupType: number + HeightToAllowBinaural: number + Name: string + OcclusionEnabled: boolean + OcclusionIntensity: number + OverallVolume: number } export interface IEnvironmentSettings { - SnowStepsVolumeMultiplier: number; - SurfaceMultipliers: ISurfaceMultiplier[]; + SnowStepsVolumeMultiplier: number + SurfaceMultipliers: ISurfaceMultiplier[] } export interface ISurfaceMultiplier { - SurfaceType: string; - VolumeMult: number; + SurfaceType: string + VolumeMult: number } export interface IBotWeaponScattering { - Name: string; - PriorityScatter1meter: number; - PriorityScatter10meter: number; - PriorityScatter100meter: number; + Name: string + PriorityScatter1meter: number + PriorityScatter10meter: number + PriorityScatter100meter: number } export interface IPreset { - _id: string; - _type: string; - _changeWeaponName: boolean; - _name: string; - _parent: string; - _items: Item[]; + _id: string + _type: string + _changeWeaponName: boolean + _name: string + _parent: string + _items: Item[] /** Default presets have this property */ - _encyclopedia?: string; + _encyclopedia?: string } diff --git a/project/src/models/eft/common/ILocation.ts b/project/src/models/eft/common/ILocation.ts index 05038369..dd56b004 100644 --- a/project/src/models/eft/common/ILocation.ts +++ b/project/src/models/eft/common/ILocation.ts @@ -6,109 +6,109 @@ import { Item } from "./tables/IItem"; export interface ILocation { /** Map meta-data */ - base: ILocationBase; + base: ILocationBase /** Loose loot postions and item weights */ - looseLoot: ILooseLoot; + looseLoot: ILooseLoot /** Static loot item weights */ - staticLoot: Record; + staticLoot: Record /** Static container postions and item weights */ - staticContainers: IStaticContainerDetails; - staticAmmo: Record; + staticContainers: IStaticContainerDetails + staticAmmo: Record /** All possible static containers on map + their assign groupings */ - statics: IStaticContainer; + statics: IStaticContainer /** All possible map extracts */ - allExtracts: Exit[]; + allExtracts: Exit[] } export interface IStaticContainer { - containersGroups: Record; - containers: Record; + containersGroups: Record + containers: Record } export interface IContainerMinMax { - minContainers: number; - maxContainers: number; - current?: number; - chosenCount?: number; + minContainers: number + maxContainers: number + current?: number + chosenCount?: number } export interface IContainerData { - groupId: string; + groupId: string } export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; + itemcountDistribution: ItemCountDistribution[] + itemDistribution: ItemDistribution[] } export interface ItemCountDistribution { - count: number; - relativeProbability: number; + count: number + relativeProbability: number } export interface ItemDistribution { - tpl: string; - relativeProbability: number; + tpl: string + relativeProbability: number } export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; + Id: string + IsContainer: boolean + useGravity: boolean + randomRotation: boolean + Position: Ixyz + Rotation: Ixyz + IsGroupPosition: boolean + IsAlwaysSpawn: boolean + GroupPositions: any[] + Root: string + Items: any[] } export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; + Items: Item[] } export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; + staticWeapons: IStaticWeaponProps[] + staticContainers: IStaticContainerData[] + staticForced: IStaticForcedProps[] } export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; + probability: number + template: IStaticContainerProps } export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; + tpl: string + relativeProbability: number } export interface IStaticForcedProps { - containerId: string; - itemTpl: string; + containerId: string + itemTpl: string } export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; + Items: StaticItem[] } export interface StaticItem { - _id: string; - _tpl: string; + _id: string + _tpl: string } diff --git a/project/src/models/eft/common/ILocationBase.ts b/project/src/models/eft/common/ILocationBase.ts index d83525c5..43137edc 100644 --- a/project/src/models/eft/common/ILocationBase.ts +++ b/project/src/models/eft/common/ILocationBase.ts @@ -4,268 +4,268 @@ import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; /* eslint-disable @typescript-eslint/naming-convention */ export interface ILocationBase { - AccessKeys: string[]; - AirdropParameters: AirdropParameter[]; - Area: number; - AveragePlayTime: number; - AveragePlayerLevel: number; - Banners: Banner[]; - BossLocationSpawn: BossLocationSpawn[]; - BotAssault: number; - BotEasy: number; - BotHard: number; - BotImpossible: number; - BotLocationModifier: BotLocationModifier; - BotMarksman: number; - BotMax: number; - BotMaxPlayer: number; - BotMaxTimePlayer: number; - BotMaxPvE: number; - BotNormal: number; - BotSpawnCountStep: number; - BotSpawnPeriodCheck: number; - BotSpawnTimeOffMax: number; - BotSpawnTimeOffMin: number; - BotSpawnTimeOnMax: number; - BotSpawnTimeOnMin: number; - BotStart: number; - BotStop: number; - Description: string; - DisabledForScav: boolean; - DisabledScavExits: string; - Enabled: boolean; - EnableCoop: boolean; - GlobalLootChanceModifier: number; - GlobalLootChanceModifierPvE: number; - GlobalContainerChanceModifier: number; - IconX: number; - IconY: number; - Id: string; - Insurance: boolean; - IsSecret: boolean; - Locked: boolean; - Loot: any[]; - MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[]; - MaxBotPerZone: number; - MaxDistToFreePoint: number; - MaxPlayers: number; - MinDistToExitPoint: number; - MinDistToFreePoint: number; - MinMaxBots: MinMaxBot[]; - MinPlayers: number; - MaxCoopGroup: number; - Name: string; - NonWaveGroupScenario: INonWaveGroupScenario; - NewSpawn: boolean; - OcculsionCullingEnabled: boolean; - OldSpawn: boolean; - OpenZones: string; - Preview: Preview; - PlayersRequestCount: number; - RequiredPlayerLevel?: number; - RequiredPlayerLevelMin?: number; - RequiredPlayerLevelMax?: number; - MinPlayerLvlAccessKeys: number; - PmcMaxPlayersInGroup: number; - ScavMaxPlayersInGroup: number; - Rules: string; - SafeLocation: boolean; - Scene: Scene; - SpawnPointParams: SpawnPointParam[]; - UnixDateTime: number; - _Id: string; - doors: any[]; - EscapeTimeLimit: number; - EscapeTimeLimitCoop: number; - exit_access_time: number; - exit_count: number; - exit_time: number; - exits: Exit[]; - filter_ex: string[]; - limits: ILimit[]; - matching_min_seconds: number; - GenerateLocalLootCache: boolean; - maxItemCountInLocation: MaxItemCountInLocation[]; - sav_summon_seconds: number; - tmp_location_field_remove_me: number; - users_gather_seconds: number; - users_spawn_seconds_n: number; - users_spawn_seconds_n2: number; - users_summon_seconds: number; - waves: Wave[]; + AccessKeys: string[] + AirdropParameters: AirdropParameter[] + Area: number + AveragePlayTime: number + AveragePlayerLevel: number + Banners: Banner[] + BossLocationSpawn: BossLocationSpawn[] + BotAssault: number + BotEasy: number + BotHard: number + BotImpossible: number + BotLocationModifier: BotLocationModifier + BotMarksman: number + BotMax: number + BotMaxPlayer: number + BotMaxTimePlayer: number + BotMaxPvE: number + BotNormal: number + BotSpawnCountStep: number + BotSpawnPeriodCheck: number + BotSpawnTimeOffMax: number + BotSpawnTimeOffMin: number + BotSpawnTimeOnMax: number + BotSpawnTimeOnMin: number + BotStart: number + BotStop: number + Description: string + DisabledForScav: boolean + DisabledScavExits: string + Enabled: boolean + EnableCoop: boolean + GlobalLootChanceModifier: number + GlobalLootChanceModifierPvE: number + GlobalContainerChanceModifier: number + IconX: number + IconY: number + Id: string + Insurance: boolean + IsSecret: boolean + Locked: boolean + Loot: any[] + MatchMakerMinPlayersByWaitTime: MinPlayerWaitTime[] + MaxBotPerZone: number + MaxDistToFreePoint: number + MaxPlayers: number + MinDistToExitPoint: number + MinDistToFreePoint: number + MinMaxBots: MinMaxBot[] + MinPlayers: number + MaxCoopGroup: number + Name: string + NonWaveGroupScenario: INonWaveGroupScenario + NewSpawn: boolean + OcculsionCullingEnabled: boolean + OldSpawn: boolean + OpenZones: string + Preview: Preview + PlayersRequestCount: number + RequiredPlayerLevel?: number + RequiredPlayerLevelMin?: number + RequiredPlayerLevelMax?: number + MinPlayerLvlAccessKeys: number + PmcMaxPlayersInGroup: number + ScavMaxPlayersInGroup: number + Rules: string + SafeLocation: boolean + Scene: Scene + SpawnPointParams: SpawnPointParam[] + UnixDateTime: number + _Id: string + doors: any[] + EscapeTimeLimit: number + EscapeTimeLimitCoop: number + exit_access_time: number + exit_count: number + exit_time: number + exits: Exit[] + filter_ex: string[] + limits: ILimit[] + matching_min_seconds: number + GenerateLocalLootCache: boolean + maxItemCountInLocation: MaxItemCountInLocation[] + sav_summon_seconds: number + tmp_location_field_remove_me: number + users_gather_seconds: number + users_spawn_seconds_n: number + users_spawn_seconds_n2: number + users_summon_seconds: number + waves: Wave[] } export interface INonWaveGroupScenario { - Chance: number; - Enabled: boolean; - MaxToBeGroup: number; - MinToBeGroup: number; + Chance: number + Enabled: boolean + MaxToBeGroup: number + MinToBeGroup: number } export interface ILimit extends MinMax { - items: any[]; + items: any[] } export interface AirdropParameter { - AirdropPointDeactivateDistance: number; - MinPlayersCountToSpawnAirdrop: number; - PlaneAirdropChance: number; - PlaneAirdropCooldownMax: number; - PlaneAirdropCooldownMin: number; - PlaneAirdropEnd: number; - PlaneAirdropMax: number; - PlaneAirdropStartMax: number; - PlaneAirdropStartMin: number; - UnsuccessfulTryPenalty: number; + AirdropPointDeactivateDistance: number + MinPlayersCountToSpawnAirdrop: number + PlaneAirdropChance: number + PlaneAirdropCooldownMax: number + PlaneAirdropCooldownMin: number + PlaneAirdropEnd: number + PlaneAirdropMax: number + PlaneAirdropStartMax: number + PlaneAirdropStartMin: number + UnsuccessfulTryPenalty: number } export interface Banner { - id: string; - pic: Pic; + id: string + pic: Pic } export interface Pic { - path: string; - rcid: string; + path: string + rcid: string } export interface BossLocationSpawn { - BossChance: number; - BossDifficult: string; - BossEscortAmount: string; - BossEscortDifficult: string; - BossEscortType: string; - BossName: string; - BossPlayer: boolean; - BossZone: string; - RandomTimeSpawn: boolean; - Time: number; - TriggerId: string; - TriggerName: string; - Delay?: number; - ForceSpawn?: boolean; - IgnoreMaxBots?: boolean; - Supports?: BossSupport[]; - sptId?: string; - spawnMode: string[]; + BossChance: number + BossDifficult: string + BossEscortAmount: string + BossEscortDifficult: string + BossEscortType: string + BossName: string + BossPlayer: boolean + BossZone: string + RandomTimeSpawn: boolean + Time: number + TriggerId: string + TriggerName: string + Delay?: number + ForceSpawn?: boolean + IgnoreMaxBots?: boolean + Supports?: BossSupport[] + sptId?: string + spawnMode: string[] } export interface BossSupport { - BossEscortAmount: string; - BossEscortDifficult: string[]; - BossEscortType: string; + BossEscortAmount: string + BossEscortDifficult: string[] + BossEscortType: string } export interface BotLocationModifier { - AccuracySpeed: number; - DistToActivate: number; - DistToPersueAxemanCoef: number; - DistToSleep: number; - GainSight: number; - KhorovodChance: number; - MagnetPower: number; - MarksmanAccuratyCoef: number; - Scattering: number; - VisibleDistance: number; + AccuracySpeed: number + DistToActivate: number + DistToPersueAxemanCoef: number + DistToSleep: number + GainSight: number + KhorovodChance: number + MagnetPower: number + MarksmanAccuratyCoef: number + Scattering: number + VisibleDistance: number } export interface MinMaxBot extends MinMax { - WildSpawnType: WildSpawnType | string; + WildSpawnType: WildSpawnType | string } export interface MinPlayerWaitTime { - minPlayers: number; - time: number; + minPlayers: number + time: number } export interface Preview { - path: string; - rcid: string; + path: string + rcid: string } export interface Scene { - path: string; - rcid: string; + path: string + rcid: string } export interface SpawnPointParam { - BotZoneName: string; - Categories: string[]; - ColliderParams: ColliderParams; - CorePointId: number; - DelayToCanSpawnSec: number; - Id: string; - Infiltration: string; - Position: Ixyz; - Rotation: number; - Sides: string[]; + BotZoneName: string + Categories: string[] + ColliderParams: ColliderParams + CorePointId: number + DelayToCanSpawnSec: number + Id: string + Infiltration: string + Position: Ixyz + Rotation: number + Sides: string[] } export interface ColliderParams { - _parent: string; - _props: Props; + _parent: string + _props: Props } export interface Props { - Center: Ixyz; - Radius: number; + Center: Ixyz + Radius: number } export interface Exit { /** % Chance out of 100 exit will appear in raid */ - Chance: number; - Count: number; - EntryPoints: string; - EventAvailable: boolean; - ExfiltrationTime: number; - ExfiltrationType: string; - RequiredSlot?: string; - Id: string; - MaxTime: number; - MinTime: number; - Name: string; - PassageRequirement: string; - PlayersCount: number; - RequirementTip: string; - Side?: string; + Chance: number + Count: number + EntryPoints: string + EventAvailable: boolean + ExfiltrationTime: number + ExfiltrationType: string + RequiredSlot?: string + Id: string + MaxTime: number + MinTime: number + Name: string + PassageRequirement: string + PlayersCount: number + RequirementTip: string + Side?: string } export interface MaxItemCountInLocation { - TemplateId: string; - Value: number; + TemplateId: string + Value: number } export interface Wave { - BotPreset: string; - BotSide: string; - SpawnPoints: string; - WildSpawnType: WildSpawnType; - isPlayers: boolean; - number: number; - slots_max: number; - slots_min: number; - time_max: number; - time_min: number; - sptId?: string; - ChanceGroup?: number; + BotPreset: string + BotSide: string + SpawnPoints: string + WildSpawnType: WildSpawnType + isPlayers: boolean + number: number + slots_max: number + slots_min: number + time_max: number + time_min: number + sptId?: string + ChanceGroup?: number } export enum WildSpawnType diff --git a/project/src/models/eft/common/ILocationsSourceDestinationBase.ts b/project/src/models/eft/common/ILocationsSourceDestinationBase.ts index e55949b5..113e5a90 100644 --- a/project/src/models/eft/common/ILocationsSourceDestinationBase.ts +++ b/project/src/models/eft/common/ILocationsSourceDestinationBase.ts @@ -2,12 +2,12 @@ import { ILocations } from "@spt-aki/models/spt/server/ILocations"; export interface ILocationsGenerateAllResponse { - locations: ILocations; - paths: Path[]; + locations: ILocations + paths: Path[] } export interface Path { - Source: string; - Destination: string; + Source: string + Destination: string } diff --git a/project/src/models/eft/common/ILooseLoot.ts b/project/src/models/eft/common/ILooseLoot.ts index 8790c795..1ce3ffd7 100644 --- a/project/src/models/eft/common/ILooseLoot.ts +++ b/project/src/models/eft/common/ILooseLoot.ts @@ -3,54 +3,54 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface ILooseLoot { - spawnpointCount: SpawnpointCount; - spawnpointsForced: SpawnpointsForced[]; - spawnpoints: Spawnpoint[]; + spawnpointCount: SpawnpointCount + spawnpointsForced: SpawnpointsForced[] + spawnpoints: Spawnpoint[] } export interface SpawnpointCount { - mean: number; - std: number; + mean: number + std: number } export interface SpawnpointsForced { - locationId: string; - probability: number; - template: SpawnpointTemplate; + locationId: string + probability: number + template: SpawnpointTemplate } export interface SpawnpointTemplate { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsAlwaysSpawn: boolean; - IsGroupPosition: boolean; - GroupPositions: any[]; - Root: string; - Items: Item[]; + Id: string + IsContainer: boolean + useGravity: boolean + randomRotation: boolean + Position: Ixyz + Rotation: Ixyz + IsAlwaysSpawn: boolean + IsGroupPosition: boolean + GroupPositions: any[] + Root: string + Items: Item[] } export interface Spawnpoint { - locationId: string; - probability: number; - template: SpawnpointTemplate; - itemDistribution: ItemDistribution[]; + locationId: string + probability: number + template: SpawnpointTemplate + itemDistribution: ItemDistribution[] } export interface ItemDistribution { - composedKey: ComposedKey; - relativeProbability: number; + composedKey: ComposedKey + relativeProbability: number } export interface ComposedKey { - key: string; + key: string } diff --git a/project/src/models/eft/common/IMetricsTableData.ts b/project/src/models/eft/common/IMetricsTableData.ts index c2da53e9..fb78ca07 100644 --- a/project/src/models/eft/common/IMetricsTableData.ts +++ b/project/src/models/eft/common/IMetricsTableData.ts @@ -1,8 +1,8 @@ export interface IMetricsTableData { - Keys: number[]; - NetProcessingBins: number[]; - RenderBins: number[]; - GameUpdateBins: number[]; - MemoryMeasureInterval: number; + Keys: number[] + NetProcessingBins: number[] + RenderBins: number[] + GameUpdateBins: number[] + MemoryMeasureInterval: number } diff --git a/project/src/models/eft/common/IPmcData.ts b/project/src/models/eft/common/IPmcData.ts index d0d13cd0..c8d5ec32 100644 --- a/project/src/models/eft/common/IPmcData.ts +++ b/project/src/models/eft/common/IPmcData.ts @@ -5,12 +5,12 @@ export interface IPmcData extends IBotBase export interface IPostRaidPmcData extends IBotBase { - Stats: IPostRaidStats; + Stats: IPostRaidStats } export interface IPostRaidStats { - Eft: IEftStats; + Eft: IEftStats /** Only found in profile we get from client post raid */ - Arena: IEftStats; + Arena: IEftStats } diff --git a/project/src/models/eft/common/Ixyz.ts b/project/src/models/eft/common/Ixyz.ts index 8b43d332..58719f6c 100644 --- a/project/src/models/eft/common/Ixyz.ts +++ b/project/src/models/eft/common/Ixyz.ts @@ -1,6 +1,6 @@ export interface Ixyz { - x: number; - y: number; - z: number; + x: number + y: number + z: number } diff --git a/project/src/models/eft/common/request/IBaseInteractionRequestData.ts b/project/src/models/eft/common/request/IBaseInteractionRequestData.ts index 84a80d8e..0fa1fe47 100644 --- a/project/src/models/eft/common/request/IBaseInteractionRequestData.ts +++ b/project/src/models/eft/common/request/IBaseInteractionRequestData.ts @@ -1,12 +1,12 @@ export interface IBaseInteractionRequestData { - Action: string; - fromOwner?: OwnerInfo; - toOwner?: OwnerInfo; + Action: string + fromOwner?: OwnerInfo + toOwner?: OwnerInfo } export interface OwnerInfo { - id: string; - type: string; + id: string + type: string } diff --git a/project/src/models/eft/common/request/IUIDRequestData.ts b/project/src/models/eft/common/request/IUIDRequestData.ts new file mode 100644 index 00000000..cd775f49 --- /dev/null +++ b/project/src/models/eft/common/request/IUIDRequestData.ts @@ -0,0 +1,4 @@ +export interface IUIDRequestData +{ + uid: string +} diff --git a/project/src/models/eft/common/tables/IAchievement.ts b/project/src/models/eft/common/tables/IAchievement.ts index 4031ce50..3f436f5a 100644 --- a/project/src/models/eft/common/tables/IAchievement.ts +++ b/project/src/models/eft/common/tables/IAchievement.ts @@ -2,19 +2,19 @@ import { IQuestConditionTypes, IQuestRewards } from "./IQuest"; export interface IAchievement { - id: string; - imageUrl: string; - assetPath: string; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; - instantComplete: boolean; - showNotificationsInGame: boolean; - showProgress: boolean; - prefab: string; - rarity: string; - hidden: boolean; - showConditions: boolean; - progressBarEnabled: boolean; - side: string; - index: number; + id: string + imageUrl: string + assetPath: string + rewards: IQuestRewards + conditions: IQuestConditionTypes + instantComplete: boolean + showNotificationsInGame: boolean + showProgress: boolean + prefab: string + rarity: string + hidden: boolean + showConditions: boolean + progressBarEnabled: boolean + side: string + index: number } diff --git a/project/src/models/eft/common/tables/IBotBase.ts b/project/src/models/eft/common/tables/IBotBase.ts index cccd2678..08c018d0 100644 --- a/project/src/models/eft/common/tables/IBotBase.ts +++ b/project/src/models/eft/common/tables/IBotBase.ts @@ -9,94 +9,94 @@ import { QuestStatus } from "@spt-aki/models/enums/QuestStatus"; export interface IBotBase { - _id: string; - aid: number; + _id: string + aid: number /** SPT property - use to store player id - TODO - move to AID ( account id as guid of choice) */ - sessionId: string; - savage?: string; - Info: Info; - Customization: Customization; - Health: Health; - Inventory: Inventory; - Skills: Skills; - Stats: Stats; - Encyclopedia: Record; - TaskConditionCounters: Record; - InsuredItems: InsuredItem[]; - Hideout: Hideout; - Quests: IQuestStatus[]; - TradersInfo: Record; - UnlockedInfo: IUnlockedInfo; - RagfairInfo: RagfairInfo; + sessionId: string + savage?: string + Info: Info + Customization: Customization + Health: Health + Inventory: Inventory + Skills: Skills + Stats: Stats + Encyclopedia: Record + TaskConditionCounters: Record + InsuredItems: InsuredItem[] + Hideout: Hideout + Quests: IQuestStatus[] + TradersInfo: Record + UnlockedInfo: IUnlockedInfo + RagfairInfo: RagfairInfo /** Achievement id and timestamp */ - Achievements: Record; - RepeatableQuests: IPmcDataRepeatableQuest[]; - Bonuses: Bonus[]; - Notes: Notes; - CarExtractCounts: Record; - CoopExtractCounts: Record; - SurvivorClass: SurvivorClass; - WishList: string[]; + Achievements: Record + RepeatableQuests: IPmcDataRepeatableQuest[] + Bonuses: Bonus[] + Notes: Notes + CarExtractCounts: Record + CoopExtractCounts: Record + SurvivorClass: SurvivorClass + WishList: string[] /** SPT specific property used during bot generation in raid */ - sptIsPmc?: boolean; + sptIsPmc?: boolean } export interface ITaskConditionCounter { - id: string; - type: string; - value: number; + id: string + type: string + value: number /** Quest id */ - sourceId: string; + sourceId: string } export interface IUnlockedInfo { - unlockedProductionRecipe: string[]; + unlockedProductionRecipe: string[] } export interface Info { - EntryPoint: string; - Nickname: string; - LowerNickname: string; - Side: string; - SquadInviteRestriction: boolean; - HasCoopExtension: boolean; - Voice: string; - Level: number; - Experience: number; - RegistrationDate: number; - GameVersion: string; - AccountType: number; - MemberCategory: MemberCategory; - lockedMoveCommands: boolean; - SavageLockTime: number; - LastTimePlayedAsSavage: number; - Settings: Settings; - NicknameChangeDate: number; - NeedWipeOptions: any[]; - lastCompletedWipe: LastCompleted; - Bans: IBan[]; - BannedState: boolean; - BannedUntil: number; - IsStreamerModeAvailable: boolean; - lastCompletedEvent?: LastCompleted; + EntryPoint: string + Nickname: string + LowerNickname: string + Side: string + SquadInviteRestriction: boolean + HasCoopExtension: boolean + Voice: string + Level: number + Experience: number + RegistrationDate: number + GameVersion: string + AccountType: number + MemberCategory: MemberCategory + lockedMoveCommands: boolean + SavageLockTime: number + LastTimePlayedAsSavage: number + Settings: Settings + NicknameChangeDate: number + NeedWipeOptions: any[] + lastCompletedWipe: LastCompleted + Bans: IBan[] + BannedState: boolean + BannedUntil: number + IsStreamerModeAvailable: boolean + lastCompletedEvent?: LastCompleted } export interface Settings { - Role: string; - BotDifficulty: string; - Experience: number; - StandingForKill: number; - AggressorBonus: number; + Role: string + BotDifficulty: string + Experience: number + StandingForKill: number + AggressorBonus: number } export interface IBan { - type: BanType; - dateTime: number; + type: BanType + dateTime: number } export enum BanType @@ -112,89 +112,89 @@ export enum BanType export interface Customization { - Head: string; - Body: string; - Feet: string; - Hands: string; + Head: string + Body: string + Feet: string + Hands: string } export interface Health { - Hydration: CurrentMax; - Energy: CurrentMax; - Temperature: CurrentMax; - BodyParts: BodyPartsHealth; - UpdateTime: number; + Hydration: CurrentMax + Energy: CurrentMax + Temperature: CurrentMax + BodyParts: BodyPartsHealth + UpdateTime: number } export interface BodyPartsHealth { - Head: BodyPartHealth; - Chest: BodyPartHealth; - Stomach: BodyPartHealth; - LeftArm: BodyPartHealth; - RightArm: BodyPartHealth; - LeftLeg: BodyPartHealth; - RightLeg: BodyPartHealth; + Head: BodyPartHealth + Chest: BodyPartHealth + Stomach: BodyPartHealth + LeftArm: BodyPartHealth + RightArm: BodyPartHealth + LeftLeg: BodyPartHealth + RightLeg: BodyPartHealth } export interface BodyPartHealth { - Health: CurrentMax; - Effects?: Record; + Health: CurrentMax + Effects?: Record } export interface BodyPartEffectProperties { - Time: number; + Time: number } export interface CurrentMax { - Current: number; - Maximum: number; + Current: number + Maximum: number } export interface Inventory { - items: Item[]; - equipment: string; - stash: string; - sortingTable: string; - questRaidItems: string; - questStashItems: string; + items: Item[] + equipment: string + stash: string + sortingTable: string + questRaidItems: string + questStashItems: string /** Key is hideout area enum numeric as string e.g. "24", value is area _id */ - hideoutAreaStashes: Record; - fastPanel: Record; - favoriteItems: string[]; + hideoutAreaStashes: Record + fastPanel: Record + favoriteItems: string[] } export interface IBaseJsonSkills { - Common: Record; - Mastering: Record; - Points: number; + Common: Record + Mastering: Record + Points: number } export interface Skills { - Common: Common[]; - Mastering: Mastering[]; - Points: number; + Common: Common[] + Mastering: Mastering[] + Points: number } export interface IBaseSkill { - Id: string; - Progress: number; - max?: number; - min?: number; + Id: string + Progress: number + max?: number + min?: number } export interface Common extends IBaseSkill { - PointsEarnedDuringSession?: number; - LastAccess?: number; + PointsEarnedDuringSession?: number + LastAccess?: number } export interface Mastering extends IBaseSkill @@ -202,257 +202,257 @@ export interface Mastering extends IBaseSkill export interface Stats { - Eft: IEftStats; + Eft: IEftStats } export interface IEftStats { - CarriedQuestItems: string[]; - Victims: Victim[]; - TotalSessionExperience: number; - LastSessionDate: number; - SessionCounters: SessionCounters; - OverallCounters: OverallCounters; - SessionExperienceMult?: number; - ExperienceBonusMult?: number; - Aggressor?: Aggressor; - DroppedItems?: IDroppedItem[]; - FoundInRaidItems?: FoundInRaidItem[]; - DamageHistory?: DamageHistory; - DeathCause?: DeathCause; - LastPlayerState?: LastPlayerState; - TotalInGameTime: number; - SurvivorClass?: string; - sptLastRaidFenceRepChange?: number; + CarriedQuestItems: string[] + Victims: Victim[] + TotalSessionExperience: number + LastSessionDate: number + SessionCounters: SessionCounters + OverallCounters: OverallCounters + SessionExperienceMult?: number + ExperienceBonusMult?: number + Aggressor?: Aggressor + DroppedItems?: IDroppedItem[] + FoundInRaidItems?: FoundInRaidItem[] + DamageHistory?: DamageHistory + DeathCause?: DeathCause + LastPlayerState?: LastPlayerState + TotalInGameTime: number + SurvivorClass?: string + sptLastRaidFenceRepChange?: number } export interface IDroppedItem { - QuestId: string; - ItemId: string; - ZoneId: string; + QuestId: string + ItemId: string + ZoneId: string } export interface FoundInRaidItem { - QuestId: string; - ItemId: string; + QuestId: string + ItemId: string } export interface Victim { - AccountId: string; - ProfileId: string; - Name: string; - Side: string; - BodyPart: string; - Time: string; - Distance: number; - Level: number; - Weapon: string; - Role: string; + AccountId: string + ProfileId: string + Name: string + Side: string + BodyPart: string + Time: string + Distance: number + Level: number + Weapon: string + Role: string } export interface SessionCounters { - Items: CounterKeyValue[]; + Items: CounterKeyValue[] } export interface OverallCounters { - Items: CounterKeyValue[]; + Items: CounterKeyValue[] } export interface CounterKeyValue { - Key: string[]; - Value: number; + Key: string[] + Value: number } export interface Aggressor { - AccountId: string; - ProfileId: string; - MainProfileNickname: string; - Name: string; - Side: string; - BodyPart: string; - HeadSegment: string; - WeaponName: string; - Category: string; + AccountId: string + ProfileId: string + MainProfileNickname: string + Name: string + Side: string + BodyPart: string + HeadSegment: string + WeaponName: string + Category: string } export interface DamageHistory { - LethalDamagePart: string; - LethalDamage: LethalDamage; - BodyParts: BodyPartsDamageHistory; + LethalDamagePart: string + LethalDamage: LethalDamage + BodyParts: BodyPartsDamageHistory } export interface LethalDamage { - Amount: number; - Type: string; - SourceId: string; - OverDamageFrom: string; - Blunt: boolean; - ImpactsCount: number; + Amount: number + Type: string + SourceId: string + OverDamageFrom: string + Blunt: boolean + ImpactsCount: number } export interface BodyPartsDamageHistory { - Head: DamageStats[]; - Chest: DamageStats[]; - Stomach: DamageStats[]; - LeftArm: DamageStats[]; - RightArm: DamageStats[]; - LeftLeg: DamageStats[]; - RightLeg: DamageStats[]; - Common: DamageStats[]; + Head: DamageStats[] + Chest: DamageStats[] + Stomach: DamageStats[] + LeftArm: DamageStats[] + RightArm: DamageStats[] + LeftLeg: DamageStats[] + RightLeg: DamageStats[] + Common: DamageStats[] } export interface DamageStats { - Amount: number; - Type: string; - SourceId: string; - OverDamageFrom: string; - Blunt: boolean; - ImpactsCount: number; + Amount: number + Type: string + SourceId: string + OverDamageFrom: string + Blunt: boolean + ImpactsCount: number } export interface DeathCause { - DamageType: string; - Side: string; - Role: string; - WeaponId: string; + DamageType: string + Side: string + Role: string + WeaponId: string } export interface LastPlayerState { - Info: LastPlayerStateInfo; - Customization: Record; - Equipment: any; + Info: LastPlayerStateInfo + Customization: Record + Equipment: any } export interface LastPlayerStateInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; + Nickname: string + Side: string + Level: number + MemberCategory: MemberCategory } export interface BackendCounter { - id: string; - qid?: string; - value: number; + id: string + qid?: string + value: number } export interface InsuredItem { /** Trader Id item was insured by */ - tid: string; - itemId: string; + tid: string + itemId: string } export interface Hideout { - Production: Record; - Areas: HideoutArea[]; - Improvement: Record; - Seed: number; - sptUpdateLastRunTimestamp: number; + Production: Record + Areas: HideoutArea[] + Improvement: Record + Seed: number + sptUpdateLastRunTimestamp: number } export interface IHideoutImprovement { - completed: boolean; - improveCompleteTimestamp: number; + completed: boolean + improveCompleteTimestamp: number } export interface Productive { - Products: Product[]; + Products: Product[] /** Seconds passed of production */ - Progress?: number; + Progress?: number /** Is craft in some state of being worked on by client (crafting/ready to pick up) */ - inProgress?: boolean; - StartTimestamp?: number; - SkipTime?: number; + inProgress?: boolean + StartTimestamp?: number + SkipTime?: number /** Seconds needed to fully craft */ - ProductionTime?: number; - GivenItemsInStart?: string[]; - Interrupted?: boolean; + ProductionTime?: number + GivenItemsInStart?: string[] + Interrupted?: boolean /** Used in hideout production.json */ - needFuelForAllProductionTime?: boolean; + needFuelForAllProductionTime?: boolean /** Used when sending data to client */ - NeedFuelForAllProductionTime?: boolean; - sptIsScavCase?: boolean; + NeedFuelForAllProductionTime?: boolean + sptIsScavCase?: boolean /** Some crafts are always inProgress, but need to be reset, e.g. water collector */ - sptIsComplete?: boolean; + sptIsComplete?: boolean /** Is the craft a Continuous, e.g bitcoins/water collector */ - sptIsContinuous?: boolean; + sptIsContinuous?: boolean /** Stores a list of tools used in this craft and whether they're FiR, to give back once the craft is done */ - sptRequiredTools?: Item[]; + sptRequiredTools?: Item[] } export interface Production extends Productive { - RecipeId: string; - SkipTime: number; - ProductionTime: number; + RecipeId: string + SkipTime: number + ProductionTime: number } export interface ScavCase extends Productive { - RecipeId: string; + RecipeId: string } export interface Product { - _id: string; - _tpl: string; - upd?: Upd; + _id: string + _tpl: string + upd?: Upd } export interface HideoutArea { - type: HideoutAreas; - level: number; - active: boolean; - passiveBonusesEnabled: boolean; + type: HideoutAreas + level: number + active: boolean + passiveBonusesEnabled: boolean /** Must be integer */ - completeTime: number; - constructing: boolean; - slots: HideoutSlot[]; - lastRecipe: string; + completeTime: number + constructing: boolean + slots: HideoutSlot[] + lastRecipe: string } export interface HideoutSlot { /** SPT specific value to keep track of what index this slot is (0,1,2,3 etc) */ - locationIndex: number; - item?: HideoutItem[]; + locationIndex: number + item?: HideoutItem[] } export interface HideoutItem { - _id: string; - _tpl: string; - upd?: Upd; + _id: string + _tpl: string + upd?: Upd } export interface LastCompleted { - $oid: string; + $oid: string } export interface Notes { - Notes: Note[]; + Notes: Note[] } export interface CarExtractCounts @@ -470,48 +470,48 @@ export enum SurvivorClass export interface IQuestStatus { - qid: string; - startTime: number; - status: QuestStatus; - statusTimers?: Record; - /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client*/ - completedConditions?: string[]; - availableAfter?: number; + qid: string + startTime: number + status: QuestStatus + statusTimers?: Record + /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client */ + completedConditions?: string[] + availableAfter?: number } export interface TraderInfo { - loyaltyLevel: number; - salesSum: number; - standing: number; - nextResupply: number; - unlocked: boolean; - disabled: boolean; + loyaltyLevel: number + salesSum: number + standing: number + nextResupply: number + unlocked: boolean + disabled: boolean } export interface RagfairInfo { - rating: number; - isRatingGrowing: boolean; - offers: IRagfairOffer[]; + rating: number + isRatingGrowing: boolean + offers: IRagfairOffer[] } export interface Bonus { - id?: string; - type: BonusType; - templateId?: string; - passive?: boolean; - production?: boolean; - visible?: boolean; - value?: number; - icon?: string; - filter?: string[]; - skillType?: BonusSkillType; + id?: string + type: BonusType + templateId?: string + passive?: boolean + production?: boolean + visible?: boolean + value?: number + icon?: string + filter?: string[] + skillType?: BonusSkillType } export interface Note { - Time: number; - Text: string; + Time: number + Text: string } diff --git a/project/src/models/eft/common/tables/IBotCore.ts b/project/src/models/eft/common/tables/IBotCore.ts index 8499e840..7f3d3979 100644 --- a/project/src/models/eft/common/tables/IBotCore.ts +++ b/project/src/models/eft/common/tables/IBotCore.ts @@ -1,135 +1,135 @@ /* eslint-disable @typescript-eslint/naming-convention */ export interface IBotCore { - SAVAGE_KILL_DIST: number; - SOUND_DOOR_BREACH_METERS: number; - SOUND_DOOR_OPEN_METERS: number; - STEP_NOISE_DELTA: number; - JUMP_NOISE_DELTA: number; - GUNSHOT_SPREAD: number; - GUNSHOT_SPREAD_SILENCE: number; - BASE_WALK_SPEREAD2: number; - MOVE_SPEED_COEF_MAX: number; - SPEED_SERV_SOUND_COEF_A: number; - SPEED_SERV_SOUND_COEF_B: number; - G: number; - STAY_COEF: number; - SIT_COEF: number; - LAY_COEF: number; - MAX_ITERATIONS: number; - START_DIST_TO_COV: number; - MAX_DIST_TO_COV: number; - STAY_HEIGHT: number; - CLOSE_POINTS: number; - COUNT_TURNS: number; - SIMPLE_POINT_LIFE_TIME_SEC: number; - DANGER_POINT_LIFE_TIME_SEC: number; - DANGER_POWER: number; - COVER_DIST_CLOSE: number; - GOOD_DIST_TO_POINT: number; - COVER_TOOFAR_FROM_BOSS: number; - COVER_TOOFAR_FROM_BOSS_SQRT: number; - MAX_Y_DIFF_TO_PROTECT: number; - FLARE_POWER: number; - MOVE_COEF: number; - PRONE_POSE: number; - LOWER_POSE: number; - MAX_POSE: number; - FLARE_TIME: number; - MAX_REQUESTS__PER_GROUP: number; - UPDATE_GOAL_TIMER_SEC: number; - DIST_NOT_TO_GROUP: number; - DIST_NOT_TO_GROUP_SQR: number; - LAST_SEEN_POS_LIFETIME: number; - DELTA_GRENADE_START_TIME: number; - DELTA_GRENADE_END_TIME: number; - DELTA_GRENADE_RUN_DIST: number; - DELTA_GRENADE_RUN_DIST_SQRT: number; - PATROL_MIN_LIGHT_DIST: number; - HOLD_MIN_LIGHT_DIST: number; - STANDART_BOT_PAUSE_DOOR: number; - ARMOR_CLASS_COEF: number; - SHOTGUN_POWER: number; - RIFLE_POWER: number; - PISTOL_POWER: number; - SMG_POWER: number; - SNIPE_POWER: number; - GESTUS_PERIOD_SEC: number; - GESTUS_AIMING_DELAY: number; - GESTUS_REQUEST_LIFETIME: number; - GESTUS_FIRST_STAGE_MAX_TIME: number; - GESTUS_SECOND_STAGE_MAX_TIME: number; - GESTUS_MAX_ANSWERS: number; - GESTUS_FUCK_TO_SHOOT: number; - GESTUS_DIST_ANSWERS: number; - GESTUS_DIST_ANSWERS_SQRT: number; - GESTUS_ANYWAY_CHANCE: number; - TALK_DELAY: number; - CAN_SHOOT_TO_HEAD: boolean; - CAN_TILT: boolean; - TILT_CHANCE: number; - MIN_BLOCK_DIST: number; - MIN_BLOCK_TIME: number; - COVER_SECONDS_AFTER_LOSE_VISION: number; - MIN_ARG_COEF: number; - MAX_ARG_COEF: number; - DEAD_AGR_DIST: number; - MAX_DANGER_CARE_DIST_SQRT: number; - MAX_DANGER_CARE_DIST: number; - MIN_MAX_PERSON_SEARCH: number; - PERCENT_PERSON_SEARCH: number; - LOOK_ANYSIDE_BY_WALL_SEC_OF_ENEMY: number; - CLOSE_TO_WALL_ROTATE_BY_WALL_SQRT: number; - SHOOT_TO_CHANGE_RND_PART_MIN: number; - SHOOT_TO_CHANGE_RND_PART_MAX: number; - SHOOT_TO_CHANGE_RND_PART_DELTA: number; - FORMUL_COEF_DELTA_DIST: number; - FORMUL_COEF_DELTA_SHOOT: number; - FORMUL_COEF_DELTA_FRIEND_COVER: number; - SUSPETION_POINT_DIST_CHECK: number; - MAX_BASE_REQUESTS_PER_PLAYER: number; - MAX_HOLD_REQUESTS_PER_PLAYER: number; - MAX_GO_TO_REQUESTS_PER_PLAYER: number; - MAX_COME_WITH_ME_REQUESTS_PER_PLAYER: number; - CORE_POINT_MAX_VALUE: number; - CORE_POINTS_MAX: number; - CORE_POINTS_MIN: number; - BORN_POISTS_FREE_ONLY_FAREST_BOT: boolean; - BORN_POINSTS_FREE_ONLY_FAREST_PLAYER: boolean; - SCAV_GROUPS_TOGETHER: boolean; - LAY_DOWN_ANG_SHOOT: number; - HOLD_REQUEST_TIME_SEC: number; - TRIGGERS_DOWN_TO_RUN_WHEN_MOVE: number; - MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING: number; - MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING_OTHER_ENEMIS: number; - MIN_DIST_TO_STOP_RUN: number; - JUMP_SPREAD_DIST: number; - LOOK_TIMES_TO_KILL: number; - COME_INSIDE_TIMES: number; - TOTAL_TIME_KILL: number; - TOTAL_TIME_KILL_AFTER_WARN: number; - MOVING_AIM_COEF: number; - VERTICAL_DIST_TO_IGNORE_SOUND: number; - DEFENCE_LEVEL_SHIFT: number; - MIN_DIST_CLOSE_DEF: number; - USE_ID_PRIOR_WHO_GO: boolean; - SMOKE_GRENADE_RADIUS_COEF: number; - GRENADE_PRECISION: number; - MAX_WARNS_BEFORE_KILL: number; - CARE_ENEMY_ONLY_TIME: number; - MIDDLE_POINT_COEF: number; - MAIN_TACTIC_ONLY_ATTACK: boolean; - LAST_DAMAGE_ACTIVE: number; - SHALL_DIE_IF_NOT_INITED: boolean; - CHECK_BOT_INIT_TIME_SEC: number; - WEAPON_ROOT_Y_OFFSET: number; - DELTA_SUPRESS_DISTANCE_SQRT: number; - DELTA_SUPRESS_DISTANCE: number; - WAVE_COEF_LOW: number; - WAVE_COEF_MID: number; - WAVE_COEF_HIGH: number; - WAVE_COEF_HORDE: number; - WAVE_ONLY_AS_ONLINE: boolean; - LOCAL_BOTS_COUNT: number; - AXE_MAN_KILLS_END: number; + SAVAGE_KILL_DIST: number + SOUND_DOOR_BREACH_METERS: number + SOUND_DOOR_OPEN_METERS: number + STEP_NOISE_DELTA: number + JUMP_NOISE_DELTA: number + GUNSHOT_SPREAD: number + GUNSHOT_SPREAD_SILENCE: number + BASE_WALK_SPEREAD2: number + MOVE_SPEED_COEF_MAX: number + SPEED_SERV_SOUND_COEF_A: number + SPEED_SERV_SOUND_COEF_B: number + G: number + STAY_COEF: number + SIT_COEF: number + LAY_COEF: number + MAX_ITERATIONS: number + START_DIST_TO_COV: number + MAX_DIST_TO_COV: number + STAY_HEIGHT: number + CLOSE_POINTS: number + COUNT_TURNS: number + SIMPLE_POINT_LIFE_TIME_SEC: number + DANGER_POINT_LIFE_TIME_SEC: number + DANGER_POWER: number + COVER_DIST_CLOSE: number + GOOD_DIST_TO_POINT: number + COVER_TOOFAR_FROM_BOSS: number + COVER_TOOFAR_FROM_BOSS_SQRT: number + MAX_Y_DIFF_TO_PROTECT: number + FLARE_POWER: number + MOVE_COEF: number + PRONE_POSE: number + LOWER_POSE: number + MAX_POSE: number + FLARE_TIME: number + MAX_REQUESTS__PER_GROUP: number + UPDATE_GOAL_TIMER_SEC: number + DIST_NOT_TO_GROUP: number + DIST_NOT_TO_GROUP_SQR: number + LAST_SEEN_POS_LIFETIME: number + DELTA_GRENADE_START_TIME: number + DELTA_GRENADE_END_TIME: number + DELTA_GRENADE_RUN_DIST: number + DELTA_GRENADE_RUN_DIST_SQRT: number + PATROL_MIN_LIGHT_DIST: number + HOLD_MIN_LIGHT_DIST: number + STANDART_BOT_PAUSE_DOOR: number + ARMOR_CLASS_COEF: number + SHOTGUN_POWER: number + RIFLE_POWER: number + PISTOL_POWER: number + SMG_POWER: number + SNIPE_POWER: number + GESTUS_PERIOD_SEC: number + GESTUS_AIMING_DELAY: number + GESTUS_REQUEST_LIFETIME: number + GESTUS_FIRST_STAGE_MAX_TIME: number + GESTUS_SECOND_STAGE_MAX_TIME: number + GESTUS_MAX_ANSWERS: number + GESTUS_FUCK_TO_SHOOT: number + GESTUS_DIST_ANSWERS: number + GESTUS_DIST_ANSWERS_SQRT: number + GESTUS_ANYWAY_CHANCE: number + TALK_DELAY: number + CAN_SHOOT_TO_HEAD: boolean + CAN_TILT: boolean + TILT_CHANCE: number + MIN_BLOCK_DIST: number + MIN_BLOCK_TIME: number + COVER_SECONDS_AFTER_LOSE_VISION: number + MIN_ARG_COEF: number + MAX_ARG_COEF: number + DEAD_AGR_DIST: number + MAX_DANGER_CARE_DIST_SQRT: number + MAX_DANGER_CARE_DIST: number + MIN_MAX_PERSON_SEARCH: number + PERCENT_PERSON_SEARCH: number + LOOK_ANYSIDE_BY_WALL_SEC_OF_ENEMY: number + CLOSE_TO_WALL_ROTATE_BY_WALL_SQRT: number + SHOOT_TO_CHANGE_RND_PART_MIN: number + SHOOT_TO_CHANGE_RND_PART_MAX: number + SHOOT_TO_CHANGE_RND_PART_DELTA: number + FORMUL_COEF_DELTA_DIST: number + FORMUL_COEF_DELTA_SHOOT: number + FORMUL_COEF_DELTA_FRIEND_COVER: number + SUSPETION_POINT_DIST_CHECK: number + MAX_BASE_REQUESTS_PER_PLAYER: number + MAX_HOLD_REQUESTS_PER_PLAYER: number + MAX_GO_TO_REQUESTS_PER_PLAYER: number + MAX_COME_WITH_ME_REQUESTS_PER_PLAYER: number + CORE_POINT_MAX_VALUE: number + CORE_POINTS_MAX: number + CORE_POINTS_MIN: number + BORN_POISTS_FREE_ONLY_FAREST_BOT: boolean + BORN_POINSTS_FREE_ONLY_FAREST_PLAYER: boolean + SCAV_GROUPS_TOGETHER: boolean + LAY_DOWN_ANG_SHOOT: number + HOLD_REQUEST_TIME_SEC: number + TRIGGERS_DOWN_TO_RUN_WHEN_MOVE: number + MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING: number + MIN_DIST_TO_RUN_WHILE_ATTACK_MOVING_OTHER_ENEMIS: number + MIN_DIST_TO_STOP_RUN: number + JUMP_SPREAD_DIST: number + LOOK_TIMES_TO_KILL: number + COME_INSIDE_TIMES: number + TOTAL_TIME_KILL: number + TOTAL_TIME_KILL_AFTER_WARN: number + MOVING_AIM_COEF: number + VERTICAL_DIST_TO_IGNORE_SOUND: number + DEFENCE_LEVEL_SHIFT: number + MIN_DIST_CLOSE_DEF: number + USE_ID_PRIOR_WHO_GO: boolean + SMOKE_GRENADE_RADIUS_COEF: number + GRENADE_PRECISION: number + MAX_WARNS_BEFORE_KILL: number + CARE_ENEMY_ONLY_TIME: number + MIDDLE_POINT_COEF: number + MAIN_TACTIC_ONLY_ATTACK: boolean + LAST_DAMAGE_ACTIVE: number + SHALL_DIE_IF_NOT_INITED: boolean + CHECK_BOT_INIT_TIME_SEC: number + WEAPON_ROOT_Y_OFFSET: number + DELTA_SUPRESS_DISTANCE_SQRT: number + DELTA_SUPRESS_DISTANCE: number + WAVE_COEF_LOW: number + WAVE_COEF_MID: number + WAVE_COEF_HIGH: number + WAVE_COEF_HORDE: number + WAVE_ONLY_AS_ONLINE: boolean + LOCAL_BOTS_COUNT: number + AXE_MAN_KILLS_END: number } diff --git a/project/src/models/eft/common/tables/IBotType.ts b/project/src/models/eft/common/tables/IBotType.ts index d2f1bdec..4a7012d8 100644 --- a/project/src/models/eft/common/tables/IBotType.ts +++ b/project/src/models/eft/common/tables/IBotType.ts @@ -3,204 +3,204 @@ import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IBotType { - appearance: Appearance; - chances: Chances; - difficulty: Difficulties; - experience: Experience; - firstName: string[]; - generation: Generation; - health: Health; - inventory: Inventory; - lastName: string[]; - skills: Skills; + appearance: Appearance + chances: Chances + difficulty: Difficulties + experience: Experience + firstName: string[] + generation: Generation + health: Health + inventory: Inventory + lastName: string[] + skills: Skills } export interface Appearance { - body: Record; - feet: Record; - hands: Record; - head: Record; - voice: Record; + body: Record + feet: Record + hands: Record + head: Record + voice: Record } export interface Chances { - equipment: EquipmentChances; - weaponMods: ModsChances; - equipmentMods: ModsChances; + equipment: EquipmentChances + weaponMods: ModsChances + equipmentMods: ModsChances } export interface EquipmentChances { - ArmBand: number; - ArmorVest: number; - Backpack: number; - Earpiece: number; - Eyewear: number; - FaceCover: number; - FirstPrimaryWeapon: number; - Headwear: number; - Holster: number; - Pockets: number; - Scabbard: number; - SecondPrimaryWeapon: number; - SecuredContainer: number; - TacticalVest: number; + ArmBand: number + ArmorVest: number + Backpack: number + Earpiece: number + Eyewear: number + FaceCover: number + FirstPrimaryWeapon: number + Headwear: number + Holster: number + Pockets: number + Scabbard: number + SecondPrimaryWeapon: number + SecuredContainer: number + TacticalVest: number } /* eslint-disable @typescript-eslint/naming-convention */ export interface ModsChances { - mod_charge: number; - mod_equipment: number; - mod_equipment_000: number; - mod_equipment_001: number; - mod_equipment_002: number; - mod_flashlight: number; - mod_foregrip: number; - mod_launcher: number; - mod_magazine: number; - mod_mount: number; - mod_mount_000: number; - mod_mount_001: number; - mod_muzzle: number; - mod_nvg: number; - mod_pistol_grip: number; - mod_reciever: number; - mod_scope: number; - mod_scope_000: number; - mod_scope_001: number; - mod_scope_002: number; - mod_scope_003: number; - mod_sight_front: number; - mod_sight_rear: number; - mod_stock: number; - mod_stock_000: number; - mod_stock_akms: number; - mod_tactical: number; - mod_tactical_000: number; - mod_tactical_001: number; - mod_tactical_002: number; - mod_tactical_003: number; - mod_handguard: number; + mod_charge: number + mod_equipment: number + mod_equipment_000: number + mod_equipment_001: number + mod_equipment_002: number + mod_flashlight: number + mod_foregrip: number + mod_launcher: number + mod_magazine: number + mod_mount: number + mod_mount_000: number + mod_mount_001: number + mod_muzzle: number + mod_nvg: number + mod_pistol_grip: number + mod_reciever: number + mod_scope: number + mod_scope_000: number + mod_scope_001: number + mod_scope_002: number + mod_scope_003: number + mod_sight_front: number + mod_sight_rear: number + mod_stock: number + mod_stock_000: number + mod_stock_akms: number + mod_tactical: number + mod_tactical_000: number + mod_tactical_001: number + mod_tactical_002: number + mod_tactical_003: number + mod_handguard: number } export interface Difficulties { - easy: Difficulty; - normal: Difficulty; - hard: Difficulty; - impossible: Difficulty; + easy: Difficulty + normal: Difficulty + hard: Difficulty + impossible: Difficulty } export interface Difficulty { - Aiming: Record; - Boss: Record; - Change: Record; - Core: Record; - Cover: Record; - Grenade: Record; - Hearing: Record; - Lay: Record; - Look: Record; - Mind: Record; - Move: Record; - Patrol: Record; - Scattering: Record; - Shoot: Record; + Aiming: Record + Boss: Record + Change: Record + Core: Record + Cover: Record + Grenade: Record + Hearing: Record + Lay: Record + Look: Record + Mind: Record + Move: Record + Patrol: Record + Scattering: Record + Shoot: Record } export interface Experience { - aggressorBonus: number; - level: MinMax; - reward: MinMax; - standingForKill: number; + aggressorBonus: number + level: MinMax + reward: MinMax + standingForKill: number } export interface Generation { - items: GenerationWeightingItems; + items: GenerationWeightingItems } export interface GenerationWeightingItems { - grenades: GenerationData; - healing: GenerationData; - drugs: GenerationData; - food: GenerationData; - drink: GenerationData; - currency: GenerationData; - stims: GenerationData; - backpackLoot: GenerationData; - pocketLoot: GenerationData; - vestLoot: GenerationData; - magazines: GenerationData; - specialItems: GenerationData; + grenades: GenerationData + healing: GenerationData + drugs: GenerationData + food: GenerationData + drink: GenerationData + currency: GenerationData + stims: GenerationData + backpackLoot: GenerationData + pocketLoot: GenerationData + vestLoot: GenerationData + magazines: GenerationData + specialItems: GenerationData } export interface GenerationData { /** key: number of items, value: weighting */ - weights: Record; + weights: Record /** Array of item tpls */ - whitelist: Record; + whitelist: Record } export interface Health { - BodyParts: BodyPart[]; - Energy: MinMax; - Hydration: MinMax; - Temperature: MinMax; + BodyParts: BodyPart[] + Energy: MinMax + Hydration: MinMax + Temperature: MinMax } export interface BodyPart { - Chest: MinMax; - Head: MinMax; - LeftArm: MinMax; - LeftLeg: MinMax; - RightArm: MinMax; - RightLeg: MinMax; - Stomach: MinMax; + Chest: MinMax + Head: MinMax + LeftArm: MinMax + LeftLeg: MinMax + RightArm: MinMax + RightLeg: MinMax + Stomach: MinMax } export interface Inventory { - equipment: Equipment; - Ammo: Record>; - items: Items; - mods: Mods; + equipment: Equipment + Ammo: Record> + items: Items + mods: Mods } export interface Equipment { - ArmBand: Record; - ArmorVest: Record; - Backpack: Record; - Earpiece: Record; - Eyewear: Record; - FaceCover: Record; - FirstPrimaryWeapon: Record; - Headwear: Record; - Holster: Record; - Pockets: Record; - Scabbard: Record; - SecondPrimaryWeapon: Record; - SecuredContainer: Record; - TacticalVest: Record; + ArmBand: Record + ArmorVest: Record + Backpack: Record + Earpiece: Record + Eyewear: Record + FaceCover: Record + FirstPrimaryWeapon: Record + Headwear: Record + Holster: Record + Pockets: Record + Scabbard: Record + SecondPrimaryWeapon: Record + SecuredContainer: Record + TacticalVest: Record } export interface Items { - Backpack: Record; - Pockets: Record; - SecuredContainer: Record; - SpecialLoot: Record; - TacticalVest: Record; + Backpack: Record + Pockets: Record + SecuredContainer: Record + SpecialLoot: Record + TacticalVest: Record } export type Mods = Record>; diff --git a/project/src/models/eft/common/tables/ICustomizationItem.ts b/project/src/models/eft/common/tables/ICustomizationItem.ts index 07585857..80acd5c1 100644 --- a/project/src/models/eft/common/tables/ICustomizationItem.ts +++ b/project/src/models/eft/common/tables/ICustomizationItem.ts @@ -2,34 +2,34 @@ import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ICustomizationItem { - _id: string; - _name: string; - _parent: string; - _type: string; - _props: Props; - _proto: string; + _id: string + _name: string + _parent: string + _type: string + _props: Props + _proto: string } export interface Props { - Name: string; - ShortName: string; - Description: string; - Side: string[]; - BodyPart: string; - AvailableAsDefault?: boolean; - Body: string; - Hands: string; - Feet: string; - Prefab: Prefab; - WatchPrefab: Prefab; - IntegratedArmorVest: boolean; - WatchPosition: Ixyz; - WatchRotation: Ixyz; + Name: string + ShortName: string + Description: string + Side: string[] + BodyPart: string + AvailableAsDefault?: boolean + Body: string + Hands: string + Feet: string + Prefab: Prefab + WatchPrefab: Prefab + IntegratedArmorVest: boolean + WatchPosition: Ixyz + WatchRotation: Ixyz } export interface Prefab { - path: string; - rcid: string; + path: string + rcid: string } diff --git a/project/src/models/eft/common/tables/IHandbookBase.ts b/project/src/models/eft/common/tables/IHandbookBase.ts index c079d753..3fa61d42 100644 --- a/project/src/models/eft/common/tables/IHandbookBase.ts +++ b/project/src/models/eft/common/tables/IHandbookBase.ts @@ -1,21 +1,21 @@ export interface IHandbookBase { - Categories: Category[]; - Items: HandbookItem[]; + Categories: Category[] + Items: HandbookItem[] } export interface Category { - Id: string; - ParentId?: string; - Icon: string; - Color: string; - Order: string; + Id: string + ParentId?: string + Icon: string + Color: string + Order: string } export interface HandbookItem { - Id: string; - ParentId: string; - Price: number; + Id: string + ParentId: string + Price: number } diff --git a/project/src/models/eft/common/tables/IItem.ts b/project/src/models/eft/common/tables/IItem.ts index 7e0edabf..395748b5 100644 --- a/project/src/models/eft/common/tables/IItem.ts +++ b/project/src/models/eft/common/tables/IItem.ts @@ -1,170 +1,170 @@ export interface Item { - _id: string; - _tpl: string; - parentId?: string; - slotId?: string; - location?: Location | number; - upd?: Upd; + _id: string + _tpl: string + parentId?: string + slotId?: string + location?: Location | number + upd?: Upd } export interface Upd { - Buff?: Buff; - OriginalStackObjectsCount?: number; - Togglable?: Togglable; - Map?: Map; - Tag?: Tag; + Buff?: Buff + OriginalStackObjectsCount?: number + Togglable?: Togglable + Map?: Map + Tag?: Tag /** SPT specific property, not made by BSG */ - sptPresetId?: string; - FaceShield?: FaceShield; - StackObjectsCount?: number; - UnlimitedCount?: boolean; - Repairable?: Repairable; - RecodableComponent?: RecodableComponent; - FireMode?: FireMode; - SpawnedInSession?: boolean; - Light?: Light; - Key?: Key; - Resource?: Resource; - Sight?: Sight; - MedKit?: MedKit; - FoodDrink?: FoodDrink; - Dogtag?: Dogtag; - BuyRestrictionMax?: number; - BuyRestrictionCurrent?: number; - Foldable?: Foldable; - SideEffect?: SideEffect; - RepairKit?: RepairKit; - CultistAmulet?: ICultistAmulet; + sptPresetId?: string + FaceShield?: FaceShield + StackObjectsCount?: number + UnlimitedCount?: boolean + Repairable?: Repairable + RecodableComponent?: RecodableComponent + FireMode?: FireMode + SpawnedInSession?: boolean + Light?: Light + Key?: Key + Resource?: Resource + Sight?: Sight + MedKit?: MedKit + FoodDrink?: FoodDrink + Dogtag?: Dogtag + BuyRestrictionMax?: number + BuyRestrictionCurrent?: number + Foldable?: Foldable + SideEffect?: SideEffect + RepairKit?: RepairKit + CultistAmulet?: ICultistAmulet } export interface Buff { - rarity: string; - buffType: string; - value: number; - thresholdDurability?: number; + rarity: string + buffType: string + value: number + thresholdDurability?: number } export interface Togglable { - On: boolean; + On: boolean } export interface Map { - Markers: MapMarker[]; + Markers: MapMarker[] } export interface MapMarker { - X: number; - Y: number; + X: number + Y: number } export interface Tag { - Color: number; - Name: string; + Color: number + Name: string } export interface FaceShield { - Hits: number; + Hits: number } export interface Repairable { - Durability: number; - MaxDurability: number; + Durability: number + MaxDurability: number } export interface RecodableComponent { - IsEncoded: boolean; + IsEncoded: boolean } export interface MedKit { - HpResource: number; + HpResource: number } export interface Sight { - ScopesCurrentCalibPointIndexes: number[]; - ScopesSelectedModes: number[]; - SelectedScope: number; + ScopesCurrentCalibPointIndexes: number[] + ScopesSelectedModes: number[] + SelectedScope: number } export interface Foldable { - Folded: boolean; + Folded: boolean } export interface FireMode { - FireMode: string; + FireMode: string } export interface FoodDrink { - HpPercent: number; + HpPercent: number } export interface Key { - NumberOfUsages: number; + NumberOfUsages: number } export interface Resource { - Value: number; - UnitsConsumed: number; + Value: number + UnitsConsumed: number } export interface Light { - IsActive: boolean; - SelectedMode: number; + IsActive: boolean + SelectedMode: number } export interface Dogtag { - AccountId: string; - ProfileId: string; - Nickname: string; - Side: string; - Level: number; - Time: string; - Status: string; - KillerAccountId: string; - KillerProfileId: string; - KillerName: string; - WeaponName: string; + AccountId: string + ProfileId: string + Nickname: string + Side: string + Level: number + Time: string + Status: string + KillerAccountId: string + KillerProfileId: string + KillerName: string + WeaponName: string } export interface Location { - x: number; - y: number; - r: string | number; - isSearched?: boolean; + x: number + y: number + r: string | number + isSearched?: boolean /** SPT property? */ - rotation?: string | boolean; + rotation?: string | boolean } export interface SideEffect { - Value: number; + Value: number } export interface RepairKit { - Resource: number; + Resource: number } export interface ICultistAmulet { - NumberOfUsages: number; + NumberOfUsages: number } diff --git a/project/src/models/eft/common/tables/ILocationsBase.ts b/project/src/models/eft/common/tables/ILocationsBase.ts index 28eac6b8..7cd95a3b 100644 --- a/project/src/models/eft/common/tables/ILocationsBase.ts +++ b/project/src/models/eft/common/tables/ILocationsBase.ts @@ -1,7 +1,7 @@ export interface ILocationsBase { - locations: Locations; - paths: Path[]; + locations: Locations + paths: Path[] } export interface Locations @@ -9,6 +9,6 @@ export interface Locations export interface Path { - Source: string; - Destination: string; + Source: string + Destination: string } diff --git a/project/src/models/eft/common/tables/IMatch.ts b/project/src/models/eft/common/tables/IMatch.ts index 59dafe72..9521a23e 100644 --- a/project/src/models/eft/common/tables/IMatch.ts +++ b/project/src/models/eft/common/tables/IMatch.ts @@ -1,14 +1,14 @@ export interface IMatch { - metrics: Metrics; + metrics: Metrics } export interface Metrics { - Keys: number[]; - NetProcessingBins: number[]; - RenderBins: number[]; - GameUpdateBins: number[]; - MemoryMeasureInterval: number; - PauseReasons: number[]; + Keys: number[] + NetProcessingBins: number[] + RenderBins: number[] + GameUpdateBins: number[] + MemoryMeasureInterval: number + PauseReasons: number[] } diff --git a/project/src/models/eft/common/tables/IProfileTemplate.ts b/project/src/models/eft/common/tables/IProfileTemplate.ts index 55987fbc..f9f2ec1d 100644 --- a/project/src/models/eft/common/tables/IProfileTemplate.ts +++ b/project/src/models/eft/common/tables/IProfileTemplate.ts @@ -4,38 +4,38 @@ import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IProfileTemplates { /* eslint-disable @typescript-eslint/naming-convention */ - Standard: IProfileSides; - "Left Behind": IProfileSides; - "Prepare To Escape": IProfileSides; - "Edge Of Darkness": IProfileSides; - "SPT Developer": IProfileSides; - "SPT Easy start": IProfileSides; - "SPT Zero to hero": IProfileSides; + "Standard": IProfileSides + "Left Behind": IProfileSides + "Prepare To Escape": IProfileSides + "Edge Of Darkness": IProfileSides + "SPT Developer": IProfileSides + "SPT Easy start": IProfileSides + "SPT Zero to hero": IProfileSides /* eslint-enable @typescript-eslint/naming-convention */ } export interface IProfileSides { - descriptionLocaleKey: string; - usec: ITemplateSide; - bear: ITemplateSide; + descriptionLocaleKey: string + usec: ITemplateSide + bear: ITemplateSide } export interface ITemplateSide { - character: IPmcData; - suits: string[]; - dialogues: Record; - userbuilds: IUserBuilds; - trader: ProfileTraderTemplate; + character: IPmcData + suits: string[] + dialogues: Record + userbuilds: IUserBuilds + trader: ProfileTraderTemplate } export interface ProfileTraderTemplate { - initialLoyaltyLevel: Record; - setQuestsAvailableForStart?: boolean; - setQuestsAvailableForFinish?: boolean; - initialStanding: number; - initialSalesSum: number; - jaegerUnlocked: boolean; + initialLoyaltyLevel: Record + setQuestsAvailableForStart?: boolean + setQuestsAvailableForFinish?: boolean + initialStanding: number + initialSalesSum: number + jaegerUnlocked: boolean } diff --git a/project/src/models/eft/common/tables/IQuest.ts b/project/src/models/eft/common/tables/IQuest.ts index f544cb9f..657b0a83 100644 --- a/project/src/models/eft/common/tables/IQuest.ts +++ b/project/src/models/eft/common/tables/IQuest.ts @@ -6,171 +6,171 @@ import { QuestTypeEnum } from "@spt-aki/models/enums/QuestTypeEnum"; export interface IQuest { /** SPT addition - human readable quest name */ - QuestName?: string; - _id: string; - canShowNotificationsInGame: boolean; - conditions: IQuestConditionTypes; - description: string; - failMessageText: string; - name: string; - note: string; - traderId: string; - location: string; - image: string; - type: QuestTypeEnum; - isKey: boolean; + QuestName?: string + _id: string + canShowNotificationsInGame: boolean + conditions: IQuestConditionTypes + description: string + failMessageText: string + name: string + note: string + traderId: string + location: string + image: string + type: QuestTypeEnum + isKey: boolean /** @deprecated - Likely not used, use 'status' instead */ - questStatus: QuestStatus; - restartable: boolean; - instantComplete: boolean; - secretQuest: boolean; - startedMessageText: string; - successMessageText: string; - acceptPlayerMessage: string; - declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; - rewards: IQuestRewards; + questStatus: QuestStatus + restartable: boolean + instantComplete: boolean + secretQuest: boolean + startedMessageText: string + successMessageText: string + acceptPlayerMessage: string + declinePlayerMessage: string + completePlayerMessage: string + templateId: string + rewards: IQuestRewards /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; - changeQuestMessageText: string; + status: string | number + KeyQuest: boolean + changeQuestMessageText: string /** "Pmc" or "Scav" */ - side: string; + side: string /** Status of quest to player */ - sptStatus?: QuestStatus; + sptStatus?: QuestStatus } export interface IQuestConditionTypes { - Started: IQuestCondition[]; - AvailableForFinish: IQuestCondition[]; - AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; - Fail: IQuestCondition[]; + Started: IQuestCondition[] + AvailableForFinish: IQuestCondition[] + AvailableForStart: IQuestCondition[] + Success: IQuestCondition[] + Fail: IQuestCondition[] } export interface IQuestCondition { - id: string; - index?: number; - compareMethod?: string; - dynamicLocale: boolean; - visibilityConditions?: VisibilityCondition[]; - globalQuestCounterId?: string; - parentId?: string; - target: string[] | string; - value?: string | number; - type?: boolean; - status?: QuestStatus[]; - availableAfter?: number; - dispersion?: number; - onlyFoundInRaid?: boolean; - oneSessionOnly?: boolean; - doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; - maxDurability?: number; - minDurability?: number; - counter?: IQuestConditionCounter; - plantTime?: number; - zoneId?: string; - countInRaid?: boolean; - completeInSeconds?: number; - isEncoded?: boolean; - conditionType?: string; + id: string + index?: number + compareMethod?: string + dynamicLocale: boolean + visibilityConditions?: VisibilityCondition[] + globalQuestCounterId?: string + parentId?: string + target: string[] | string + value?: string | number + type?: boolean + status?: QuestStatus[] + availableAfter?: number + dispersion?: number + onlyFoundInRaid?: boolean + oneSessionOnly?: boolean + doNotResetIfCounterCompleted?: boolean + dogtagLevel?: number + maxDurability?: number + minDurability?: number + counter?: IQuestConditionCounter + plantTime?: number + zoneId?: string + countInRaid?: boolean + completeInSeconds?: number + isEncoded?: boolean + conditionType?: string } export interface IQuestConditionCounter { - id: string; - conditions: IQuestConditionCounterCondition[]; + id: string + conditions: IQuestConditionCounterCondition[] } export interface IQuestConditionCounterCondition { - id: string; - dynamicLocale: boolean; - target?: string[] | string; // TODO: some objects have an array and some are just strings, thanks bsg very cool - completeInSeconds?: number; - energy?: IValueCompare; - exitName?: string; - hydration?: IValueCompare; - time?: IValueCompare; - compareMethod?: string; - value?: number; - weapon?: string[]; - distance?: ICounterConditionDistance; - equipmentInclusive?: string[][]; - weaponModsInclusive?: string[][]; - weaponModsExclusive?: string[][]; - enemyEquipmentInclusive?: string[][]; - enemyEquipmentExclusive?: string[][]; - weaponCaliber?: string[]; - savageRole?: string[]; - status?: string[]; - bodyPart?: string[]; - daytime?: IDaytimeCounter; - conditionType?: string; - enemyHealthEffects?: IEnemyHealthEffect[]; - resetOnSessionEnd?: boolean; + id: string + dynamicLocale: boolean + target?: string[] | string // TODO: some objects have an array and some are just strings, thanks bsg very cool + completeInSeconds?: number + energy?: IValueCompare + exitName?: string + hydration?: IValueCompare + time?: IValueCompare + compareMethod?: string + value?: number + weapon?: string[] + distance?: ICounterConditionDistance + equipmentInclusive?: string[][] + weaponModsInclusive?: string[][] + weaponModsExclusive?: string[][] + enemyEquipmentInclusive?: string[][] + enemyEquipmentExclusive?: string[][] + weaponCaliber?: string[] + savageRole?: string[] + status?: string[] + bodyPart?: string[] + daytime?: IDaytimeCounter + conditionType?: string + enemyHealthEffects?: IEnemyHealthEffect[] + resetOnSessionEnd?: boolean } export interface IEnemyHealthEffect { - bodyParts: string[]; - effects: string[]; + bodyParts: string[] + effects: string[] } export interface IValueCompare { - compareMethod: string; - value: number; + compareMethod: string + value: number } export interface ICounterConditionDistance { - value: number; - compareMethod: string; + value: number + compareMethod: string } export interface IDaytimeCounter { - from: number; - to: number; + from: number + to: number } export interface VisibilityCondition { - id: string; - target: string; - value?: number; - dynamicLocale?: boolean; - oneSessionOnly: boolean; - conditionType: string; + id: string + target: string + value?: number + dynamicLocale?: boolean + oneSessionOnly: boolean + conditionType: string } export interface IQuestRewards { - AvailableForStart?: IQuestReward[]; - AvailableForFinish?: IQuestReward[]; - Started?: IQuestReward[]; - Success?: IQuestReward[]; - Fail?: IQuestReward[]; - FailRestartable?: IQuestReward[]; - Expired?: IQuestReward[]; + AvailableForStart?: IQuestReward[] + AvailableForFinish?: IQuestReward[] + Started?: IQuestReward[] + Success?: IQuestReward[] + Fail?: IQuestReward[] + FailRestartable?: IQuestReward[] + Expired?: IQuestReward[] } export interface IQuestReward { - value?: string | number; - id?: string; - type: QuestRewardType; - index: number; - target?: string; - items?: Item[]; - loyaltyLevel?: number; + value?: string | number + id?: string + type: QuestRewardType + index: number + target?: string + items?: Item[] + loyaltyLevel?: number /** Hideout area id */ - traderId?: string; - unknown?: boolean; - findInRaid?: boolean; + traderId?: string + unknown?: boolean + findInRaid?: boolean } diff --git a/project/src/models/eft/common/tables/IRepeatableQuests.ts b/project/src/models/eft/common/tables/IRepeatableQuests.ts index 7f82118d..2d6ba29a 100644 --- a/project/src/models/eft/common/tables/IRepeatableQuests.ts +++ b/project/src/models/eft/common/tables/IRepeatableQuests.ts @@ -2,97 +2,97 @@ import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest"; export interface IRepeatableQuest extends IQuest { - changeCost: IChangeCost[]; - changeStandingCost: number; - sptRepatableGroupName: string; + changeCost: IChangeCost[] + changeStandingCost: number + sptRepatableGroupName: string } export interface IRepeatableQuestDatabase { - templates: IRepeatableTemplates; - rewards: IRewardOptions; - data: IOptions; - samples: ISampleQuests[]; + templates: IRepeatableTemplates + rewards: IRewardOptions + data: IOptions + samples: ISampleQuests[] } export interface IRepeatableTemplates { - Elimination: IQuest; - Completion: IQuest; - Exploration: IQuest; + Elimination: IQuest + Completion: IQuest + Exploration: IQuest } export interface IPmcDataRepeatableQuest { - id?: string; - name: string; - activeQuests: IRepeatableQuest[]; - inactiveQuests: IRepeatableQuest[]; - endTime: number; - changeRequirement: Record; // What it costs to reset redundant to change requirements within IRepeatableQuest + id?: string + name: string + activeQuests: IRepeatableQuest[] + inactiveQuests: IRepeatableQuest[] + endTime: number + changeRequirement: Record // What it costs to reset redundant to change requirements within IRepeatableQuest } export interface IChangeRequirement { - changeCost: IChangeCost[]; - changeStandingCost: number; + changeCost: IChangeCost[] + changeStandingCost: number } export interface IChangeCost { - templateId: string; // what item it will take to reset daily - count: number; // amount of item needed to reset + templateId: string // what item it will take to reset daily + count: number // amount of item needed to reset } // Config Options export interface IRewardOptions { - itemsBlacklist: string[]; + itemsBlacklist: string[] } export interface IOptions { - Completion: ICompletionFilter; + Completion: ICompletionFilter } export interface ICompletionFilter { - itemsBlacklist: ItemsBlacklist[]; - itemsWhitelist: ItemsWhitelist[]; + itemsBlacklist: ItemsBlacklist[] + itemsWhitelist: ItemsWhitelist[] } export interface ItemsBlacklist { - minPlayerLevel: number; - itemIds: string[]; + minPlayerLevel: number + itemIds: string[] } export interface ItemsWhitelist { - minPlayerLevel: number; - itemIds: string[]; + minPlayerLevel: number + itemIds: string[] } export interface ISampleQuests { - _id: string; - traderId: string; - location: string; - image: string; - type: string; - isKey: boolean; - restartable: boolean; - instantComplete: boolean; - secretQuest: boolean; - canShowNotificationsInGame: boolean; - rewards: IQuestRewards; - conditions: IQuestConditionTypes; - name: string; - note: string; - description: string; - successMessageText: string; - failMessageText: string; - startedMessageText: string; - templateId: string; + _id: string + traderId: string + location: string + image: string + type: string + isKey: boolean + restartable: boolean + instantComplete: boolean + secretQuest: boolean + canShowNotificationsInGame: boolean + rewards: IQuestRewards + conditions: IQuestConditionTypes + name: string + note: string + description: string + successMessageText: string + failMessageText: string + startedMessageText: string + templateId: string } diff --git a/project/src/models/eft/common/tables/ITemplateItem.ts b/project/src/models/eft/common/tables/ITemplateItem.ts index f3d50f0a..7b79d6d0 100644 --- a/project/src/models/eft/common/tables/ITemplateItem.ts +++ b/project/src/models/eft/common/tables/ITemplateItem.ts @@ -2,570 +2,570 @@ import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; export interface ITemplateItem { - _id: string; - _name: string; - _parent: string; - _type: string; - _props: Props; - _proto: string; + _id: string + _name: string + _parent: string + _type: string + _props: Props + _proto: string } export interface Props { - AllowSpawnOnLocations?: any[]; - BeltMagazineRefreshCount?: number; - ChangePriceCoef?: number; - FixedPrice?: boolean; - SendToClient?: boolean; - Name?: string; - ShortName?: string; - Description?: string; - Weight?: number; - BackgroundColor?: string; - Width?: number; - Height?: number; - StackMaxSize?: number; - Rarity?: string; - SpawnChance?: number; - CreditsPrice?: number; - ItemSound?: string; - Prefab?: Prefab; - UsePrefab?: Prefab; - StackObjectsCount?: number; - NotShownInSlot?: boolean; - ExaminedByDefault?: boolean; - ExamineTime?: number; - IsUndiscardable?: boolean; - IsUnsaleable?: boolean; - IsUnbuyable?: boolean; - IsUngivable?: boolean; - IsUnremovable?: boolean; - IsLockedafterEquip?: boolean; - IsSpecialSlotOnly?: boolean; - IsStationaryWeapon?: boolean; - QuestItem?: boolean; - QuestStashMaxCount?: number; - LootExperience?: number; - ExamineExperience?: number; - HideEntrails?: boolean; - InsuranceDisabled?: boolean; - RepairCost?: number; - RepairSpeed?: number; - ExtraSizeLeft?: number; - ExtraSizeRight?: number; - ExtraSizeUp?: number; - ExtraSizeDown?: number; - ExtraSizeForceAdd?: boolean; - MergesWithChildren?: boolean; - CanSellOnRagfair?: boolean; - CanRequireOnRagfair?: boolean; - ConflictingItems?: string[]; - Unlootable?: boolean; - UnlootableFromSlot?: string; - UnlootableFromSide?: string[]; - AnimationVariantsNumber?: number; - DiscardingBlock?: boolean; - DropSoundType?: string; - RagFairCommissionModifier?: number; - RarityPvE: string; - IsAlwaysAvailableForInsurance?: boolean; - DiscardLimit?: number; - MaxResource?: number; - Resource?: number; - DogTagQualities?: boolean; - Grids?: Grid[]; - Slots?: Slot[]; - CanPutIntoDuringTheRaid?: boolean; - CantRemoveFromSlotsDuringRaid?: string[]; - KeyIds?: string[]; - TagColor?: number; - TagName?: string; - Durability?: number; - Accuracy?: number; - Recoil?: number; - Loudness?: number; - EffectiveDistance?: number; - Ergonomics?: number; - Velocity?: number; - WithAnimatorAiming?: boolean; - RaidModdable?: boolean; - ToolModdable?: boolean; - UniqueAnimationModID?: number; - BlocksFolding?: boolean; - BlocksCollapsible?: boolean; - IsAnimated?: boolean; - HasShoulderContact?: boolean; - SightingRange?: number; - DoubleActionAccuracyPenaltyMult?: number; - ModesCount?: any; - DurabilityBurnModificator?: number; - HeatFactor?: number; - CoolFactor?: number; - muzzleModType?: string; - CustomAimPlane?: string; - sightModType?: string; - aimingSensitivity?: number; - SightModesCount?: number; - OpticCalibrationDistances?: number[]; - ScopesCount?: number; - AimSensitivity?: number | number[][]; - Zooms?: number[][]; - CalibrationDistances?: number[][]; - Intensity?: number; - Mask?: string; - MaskSize?: number; - IsMagazineForStationaryWeapon?: boolean; - NoiseIntensity?: number; - NoiseScale?: number; - Color?: IColor; - DiffuseIntensity?: number; - MagazineWithBelt?: boolean; - HasHinge?: boolean; - RampPalette?: string; - DepthFade?: number; - RoughnessCoef?: number; - SpecularCoef?: number; - MainTexColorCoef?: number; - MinimumTemperatureValue?: number; - RampShift?: number; - HeatMin?: number; - ColdMax?: number; - IsNoisy?: boolean; - IsFpsStuck?: boolean; - IsGlitch?: boolean; - IsMotionBlurred?: boolean; - IsPixelated?: boolean; - PixelationBlockCount?: number; - ShiftsAimCamera?: number; - magAnimationIndex?: number; - Cartridges?: Slot[]; - CanFast?: boolean; - CanHit?: boolean; - CanAdmin?: boolean; - LoadUnloadModifier?: number; - CheckTimeModifier?: number; - CheckOverride?: number; - ReloadMagType?: string; - VisibleAmmoRangesString?: string; - MalfunctionChance?: number; - IsShoulderContact?: boolean; - Foldable?: boolean; - Retractable?: boolean; - SizeReduceRight?: number; - CenterOfImpact?: number; - ShotgunDispersion?: number; - IsSilencer?: boolean; - DeviationCurve?: number; - DeviationMax?: number; - SearchSound?: string; - BlocksArmorVest?: boolean; - speedPenaltyPercent?: number; - GridLayoutName?: string; - ContainerSpawnChanceModifier?: number; - SpawnExcludedFilter?: string[]; - SpawnFilter?: any[]; - containType?: any[]; - sizeWidth?: number; - sizeHeight?: number; - isSecured?: boolean; - spawnTypes?: string; - lootFilter?: any[]; - spawnRarity?: string; - minCountSpawn?: number; - maxCountSpawn?: number; - openedByKeyID?: any[]; - RigLayoutName?: string; - MaxDurability?: number; - armorZone?: string[]; - armorClass?: string | number; - armorColliders?: string[]; - armorPlateColliders?: string[]; - bluntDamageReduceFromSoftArmor?: boolean; - mousePenalty?: number; - weaponErgonomicPenalty?: number; - BluntThroughput?: number; - ArmorMaterial?: string; - ArmorType?: string; - weapClass?: string; - weapUseType?: string; - ammoCaliber?: string; - OperatingResource?: number; - PostRecoilHorizontalRangeHandRotation?: Ixyz; - PostRecoilVerticalRangeHandRotation?: Ixyz; - ProgressRecoilAngleOnStable?: Ixyz; - RepairComplexity?: number; - durabSpawnMin?: number; - durabSpawnMax?: number; - isFastReload?: boolean; - RecoilForceUp?: number; - RecoilForceBack?: number; - RecoilAngle?: number; - RecoilCamera?: number; - weapFireType?: string[]; - RecolDispersion?: number; - SingleFireRate?: number; - CanQueueSecondShot?: boolean; - bFirerate?: number; - bEffDist?: number; - bHearDist?: number; - blockLeftStance?: boolean; - isChamberLoad?: boolean; - chamberAmmoCount?: number; - isBoltCatch?: boolean; - defMagType?: string; - defAmmo?: string; - AdjustCollimatorsToTrajectory?: boolean; - shotgunDispersion?: number; - Chambers?: Slot[]; - CameraSnap?: number; - CameraToWeaponAngleSpeedRange?: Ixyz; - CameraToWeaponAngleStep?: number; - ReloadMode?: string; - AimPlane?: number; - TacticalReloadStiffnes?: Ixyz; - TacticalReloadFixation?: number; - RecoilCenter?: Ixyz; - RotationCenter?: Ixyz; - RotationCenterNoStock?: Ixyz; - ShotsGroupSettings?: IShotsGroupSettings[]; - FoldedSlot?: string; - CompactHandling?: boolean; - MinRepairDegradation?: number; - MaxRepairDegradation?: number; - IronSightRange?: number; - IsBeltMachineGun?: boolean; - IsFlareGun?: boolean; - IsGrenadeLauncher?: boolean; - IsOneoff?: boolean; - MustBoltBeOpennedForExternalReload?: boolean; - MustBoltBeOpennedForInternalReload?: boolean; - NoFiremodeOnBoltcatch?: boolean; - BoltAction?: boolean; - HipAccuracyRestorationDelay?: number; - HipAccuracyRestorationSpeed?: number; - HipInnaccuracyGain?: number; - ManualBoltCatch?: boolean; - BurstShotsCount?: number; - BaseMalfunctionChance?: number; - AllowJam?: boolean; - AllowFeed?: boolean; - AllowMisfire?: boolean; - AllowSlide?: boolean; - DurabilityBurnRatio?: number; - HeatFactorGun?: number; - CoolFactorGun?: number; - CoolFactorGunMods?: number; - HeatFactorByShot?: number; - AllowOverheat?: boolean; - DoubleActionAccuracyPenalty?: number; - RecoilPosZMult?: number; - RecoilReturnPathDampingHandRotation?: number; - RecoilReturnPathOffsetHandRotation?: number; - RecoilReturnSpeedHandRotation?: number; - RecoilStableAngleIncreaseStep?: number; - RecoilStableIndexShot?: number; - MinRepairKitDegradation?: number; - MaxRepairKitDegradation?: number; - BlocksEarpiece?: boolean; - BlocksEyewear?: boolean; - BlocksHeadwear?: boolean; - BlocksFaceCover?: boolean; - Indestructibility?: number; - headSegments?: string[]; - FaceShieldComponent?: boolean; - FaceShieldMask?: string; - MaterialType?: string; - RicochetParams?: Ixyz; - DeafStrength?: string; - BlindnessProtection?: number; - Distortion?: number; - CompressorTreshold?: number; - CompressorAttack?: number; - CompressorRelease?: number; - CompressorGain?: number; - CutoffFreq?: number; - Resonance?: number; - RolloffMultiplier?: number; - ReverbVolume?: number; - CompressorVolume?: number; - AmbientVolume?: number; - DryVolume?: number; - HighFrequenciesGain?: number; - foodUseTime?: number; - foodEffectType?: string; - StimulatorBuffs?: string; - effects_health?: IHealthEffect[] | Record>; - effects_damage?: Record; - MaximumNumberOfUsage?: number; - knifeHitDelay?: number; - knifeHitSlashRate?: number; - knifeHitStabRate?: number; - knifeHitRadius?: number; - knifeHitSlashDam?: number; - knifeHitStabDam?: number; - knifeDurab?: number; - PrimaryDistance?: number; - SecondryDistance?: number; - SlashPenetration?: number; - StabPenetration?: number; - PrimaryConsumption?: number; - SecondryConsumption?: number; - DeflectionConsumption?: number; - AppliedTrunkRotation?: Ixyz; - AppliedHeadRotation?: Ixyz; - DisplayOnModel?: boolean; - AdditionalAnimationLayer?: number; - StaminaBurnRate?: number; - ColliderScaleMultiplier?: Ixyz; - ConfigPathStr?: string; - MaxMarkersCount?: number; - scaleMin?: number; - scaleMax?: number; - medUseTime?: number; - medEffectType?: string; - MaxHpResource?: number; - hpResourceRate?: number; - apResource?: number; - krResource?: number; - MaxOpticZoom?: number; - MaxRepairResource?: number; - TargetItemFilter?: string[]; - RepairQuality?: number; - RepairType?: string; - StackMinRandom?: number; - StackMaxRandom?: number; - ammoType?: string; - InitialSpeed?: number; - BallisticCoeficient?: number; - BulletMassGram?: number; - BulletDiameterMilimeters?: number; - Damage?: number; - ammoAccr?: number; - ammoRec?: number; - ammoDist?: number; - buckshotBullets?: number; - PenetrationPower?: number; - PenetrationPowerDiviation?: number; - ammoHear?: number; - ammoSfx?: string; - MisfireChance?: number; - MinFragmentsCount?: number; - MaxFragmentsCount?: number; - ammoShiftChance?: number; - casingName?: string; - casingEjectPower?: number; - casingMass?: number; - casingSounds?: string; - ProjectileCount?: number; - PenetrationChanceObstacle?: number; - PenetrationDamageMod: number; - RicochetChance?: number; - FragmentationChance?: number; - Deterioration?: number; - SpeedRetardation?: number; - Tracer?: boolean; - TracerColor?: string; - TracerDistance?: number; - ArmorDamage?: number; - Caliber?: string; - StaminaBurnPerDamage?: number; - HeavyBleedingDelta?: number; - LightBleedingDelta?: number; - ShowBullet?: boolean; - HasGrenaderComponent?: boolean; - FuzeArmTimeSec?: number; - ExplosionStrength?: number; - MinExplosionDistance?: number; - MaxExplosionDistance?: number; - FragmentsCount?: number; - FragmentType?: string; - ShowHitEffectOnExplode?: boolean; - ExplosionType?: string; - AmmoLifeTimeSec?: number; - Contusion?: Ixyz; - ArmorDistanceDistanceDamage?: Ixyz; - Blindness?: Ixyz; - IsLightAndSoundShot?: boolean; - LightAndSoundShotAngle?: number; - LightAndSoundShotSelfContusionTime?: number; - LightAndSoundShotSelfContusionStrength?: number; - MalfMisfireChance?: number; - MalfFeedChance?: number; - StackSlots?: StackSlot[]; - type?: string; - eqMin?: number; - eqMax?: number; - rate?: number; - ThrowType?: string; - ExplDelay?: number; - Strength?: number; - ContusionDistance?: number; - throwDamMax?: number; - explDelay?: number; - EmitTime?: number; - CanBeHiddenDuringThrow?: boolean; - MinTimeToContactExplode?: number; - ExplosionEffectType?: string; - LinkedWeapon?: string; - UseAmmoWithoutShell?: boolean; - RandomLootSettings?: IRandomLootSettings; - RecoilCategoryMultiplierHandRotation?: number; - RecoilDampingHandRotation?: number; - LeanWeaponAgainstBody?: boolean; - RemoveShellAfterFire?: boolean; - RepairStrategyTypes?: string[]; - IsEncoded?: boolean; - LayoutName?: string; - Lower75Prefab?: Prefab; - MaxUsages?: number; + AllowSpawnOnLocations?: any[] + BeltMagazineRefreshCount?: number + ChangePriceCoef?: number + FixedPrice?: boolean + SendToClient?: boolean + Name?: string + ShortName?: string + Description?: string + Weight?: number + BackgroundColor?: string + Width?: number + Height?: number + StackMaxSize?: number + Rarity?: string + SpawnChance?: number + CreditsPrice?: number + ItemSound?: string + Prefab?: Prefab + UsePrefab?: Prefab + StackObjectsCount?: number + NotShownInSlot?: boolean + ExaminedByDefault?: boolean + ExamineTime?: number + IsUndiscardable?: boolean + IsUnsaleable?: boolean + IsUnbuyable?: boolean + IsUngivable?: boolean + IsUnremovable?: boolean + IsLockedafterEquip?: boolean + IsSpecialSlotOnly?: boolean + IsStationaryWeapon?: boolean + QuestItem?: boolean + QuestStashMaxCount?: number + LootExperience?: number + ExamineExperience?: number + HideEntrails?: boolean + InsuranceDisabled?: boolean + RepairCost?: number + RepairSpeed?: number + ExtraSizeLeft?: number + ExtraSizeRight?: number + ExtraSizeUp?: number + ExtraSizeDown?: number + ExtraSizeForceAdd?: boolean + MergesWithChildren?: boolean + CanSellOnRagfair?: boolean + CanRequireOnRagfair?: boolean + ConflictingItems?: string[] + Unlootable?: boolean + UnlootableFromSlot?: string + UnlootableFromSide?: string[] + AnimationVariantsNumber?: number + DiscardingBlock?: boolean + DropSoundType?: string + RagFairCommissionModifier?: number + RarityPvE: string + IsAlwaysAvailableForInsurance?: boolean + DiscardLimit?: number + MaxResource?: number + Resource?: number + DogTagQualities?: boolean + Grids?: Grid[] + Slots?: Slot[] + CanPutIntoDuringTheRaid?: boolean + CantRemoveFromSlotsDuringRaid?: string[] + KeyIds?: string[] + TagColor?: number + TagName?: string + Durability?: number + Accuracy?: number + Recoil?: number + Loudness?: number + EffectiveDistance?: number + Ergonomics?: number + Velocity?: number + WithAnimatorAiming?: boolean + RaidModdable?: boolean + ToolModdable?: boolean + UniqueAnimationModID?: number + BlocksFolding?: boolean + BlocksCollapsible?: boolean + IsAnimated?: boolean + HasShoulderContact?: boolean + SightingRange?: number + DoubleActionAccuracyPenaltyMult?: number + ModesCount?: any + DurabilityBurnModificator?: number + HeatFactor?: number + CoolFactor?: number + muzzleModType?: string + CustomAimPlane?: string + sightModType?: string + aimingSensitivity?: number + SightModesCount?: number + OpticCalibrationDistances?: number[] + ScopesCount?: number + AimSensitivity?: number | number[][] + Zooms?: number[][] + CalibrationDistances?: number[][] + Intensity?: number + Mask?: string + MaskSize?: number + IsMagazineForStationaryWeapon?: boolean + NoiseIntensity?: number + NoiseScale?: number + Color?: IColor + DiffuseIntensity?: number + MagazineWithBelt?: boolean + HasHinge?: boolean + RampPalette?: string + DepthFade?: number + RoughnessCoef?: number + SpecularCoef?: number + MainTexColorCoef?: number + MinimumTemperatureValue?: number + RampShift?: number + HeatMin?: number + ColdMax?: number + IsNoisy?: boolean + IsFpsStuck?: boolean + IsGlitch?: boolean + IsMotionBlurred?: boolean + IsPixelated?: boolean + PixelationBlockCount?: number + ShiftsAimCamera?: number + magAnimationIndex?: number + Cartridges?: Slot[] + CanFast?: boolean + CanHit?: boolean + CanAdmin?: boolean + LoadUnloadModifier?: number + CheckTimeModifier?: number + CheckOverride?: number + ReloadMagType?: string + VisibleAmmoRangesString?: string + MalfunctionChance?: number + IsShoulderContact?: boolean + Foldable?: boolean + Retractable?: boolean + SizeReduceRight?: number + CenterOfImpact?: number + ShotgunDispersion?: number + IsSilencer?: boolean + DeviationCurve?: number + DeviationMax?: number + SearchSound?: string + BlocksArmorVest?: boolean + speedPenaltyPercent?: number + GridLayoutName?: string + ContainerSpawnChanceModifier?: number + SpawnExcludedFilter?: string[] + SpawnFilter?: any[] + containType?: any[] + sizeWidth?: number + sizeHeight?: number + isSecured?: boolean + spawnTypes?: string + lootFilter?: any[] + spawnRarity?: string + minCountSpawn?: number + maxCountSpawn?: number + openedByKeyID?: any[] + RigLayoutName?: string + MaxDurability?: number + armorZone?: string[] + armorClass?: string | number + armorColliders?: string[] + armorPlateColliders?: string[] + bluntDamageReduceFromSoftArmor?: boolean + mousePenalty?: number + weaponErgonomicPenalty?: number + BluntThroughput?: number + ArmorMaterial?: string + ArmorType?: string + weapClass?: string + weapUseType?: string + ammoCaliber?: string + OperatingResource?: number + PostRecoilHorizontalRangeHandRotation?: Ixyz + PostRecoilVerticalRangeHandRotation?: Ixyz + ProgressRecoilAngleOnStable?: Ixyz + RepairComplexity?: number + durabSpawnMin?: number + durabSpawnMax?: number + isFastReload?: boolean + RecoilForceUp?: number + RecoilForceBack?: number + RecoilAngle?: number + RecoilCamera?: number + weapFireType?: string[] + RecolDispersion?: number + SingleFireRate?: number + CanQueueSecondShot?: boolean + bFirerate?: number + bEffDist?: number + bHearDist?: number + blockLeftStance?: boolean + isChamberLoad?: boolean + chamberAmmoCount?: number + isBoltCatch?: boolean + defMagType?: string + defAmmo?: string + AdjustCollimatorsToTrajectory?: boolean + shotgunDispersion?: number + Chambers?: Slot[] + CameraSnap?: number + CameraToWeaponAngleSpeedRange?: Ixyz + CameraToWeaponAngleStep?: number + ReloadMode?: string + AimPlane?: number + TacticalReloadStiffnes?: Ixyz + TacticalReloadFixation?: number + RecoilCenter?: Ixyz + RotationCenter?: Ixyz + RotationCenterNoStock?: Ixyz + ShotsGroupSettings?: IShotsGroupSettings[] + FoldedSlot?: string + CompactHandling?: boolean + MinRepairDegradation?: number + MaxRepairDegradation?: number + IronSightRange?: number + IsBeltMachineGun?: boolean + IsFlareGun?: boolean + IsGrenadeLauncher?: boolean + IsOneoff?: boolean + MustBoltBeOpennedForExternalReload?: boolean + MustBoltBeOpennedForInternalReload?: boolean + NoFiremodeOnBoltcatch?: boolean + BoltAction?: boolean + HipAccuracyRestorationDelay?: number + HipAccuracyRestorationSpeed?: number + HipInnaccuracyGain?: number + ManualBoltCatch?: boolean + BurstShotsCount?: number + BaseMalfunctionChance?: number + AllowJam?: boolean + AllowFeed?: boolean + AllowMisfire?: boolean + AllowSlide?: boolean + DurabilityBurnRatio?: number + HeatFactorGun?: number + CoolFactorGun?: number + CoolFactorGunMods?: number + HeatFactorByShot?: number + AllowOverheat?: boolean + DoubleActionAccuracyPenalty?: number + RecoilPosZMult?: number + RecoilReturnPathDampingHandRotation?: number + RecoilReturnPathOffsetHandRotation?: number + RecoilReturnSpeedHandRotation?: number + RecoilStableAngleIncreaseStep?: number + RecoilStableIndexShot?: number + MinRepairKitDegradation?: number + MaxRepairKitDegradation?: number + BlocksEarpiece?: boolean + BlocksEyewear?: boolean + BlocksHeadwear?: boolean + BlocksFaceCover?: boolean + Indestructibility?: number + headSegments?: string[] + FaceShieldComponent?: boolean + FaceShieldMask?: string + MaterialType?: string + RicochetParams?: Ixyz + DeafStrength?: string + BlindnessProtection?: number + Distortion?: number + CompressorTreshold?: number + CompressorAttack?: number + CompressorRelease?: number + CompressorGain?: number + CutoffFreq?: number + Resonance?: number + RolloffMultiplier?: number + ReverbVolume?: number + CompressorVolume?: number + AmbientVolume?: number + DryVolume?: number + HighFrequenciesGain?: number + foodUseTime?: number + foodEffectType?: string + StimulatorBuffs?: string + effects_health?: IHealthEffect[] | Record> + effects_damage?: Record + MaximumNumberOfUsage?: number + knifeHitDelay?: number + knifeHitSlashRate?: number + knifeHitStabRate?: number + knifeHitRadius?: number + knifeHitSlashDam?: number + knifeHitStabDam?: number + knifeDurab?: number + PrimaryDistance?: number + SecondryDistance?: number + SlashPenetration?: number + StabPenetration?: number + PrimaryConsumption?: number + SecondryConsumption?: number + DeflectionConsumption?: number + AppliedTrunkRotation?: Ixyz + AppliedHeadRotation?: Ixyz + DisplayOnModel?: boolean + AdditionalAnimationLayer?: number + StaminaBurnRate?: number + ColliderScaleMultiplier?: Ixyz + ConfigPathStr?: string + MaxMarkersCount?: number + scaleMin?: number + scaleMax?: number + medUseTime?: number + medEffectType?: string + MaxHpResource?: number + hpResourceRate?: number + apResource?: number + krResource?: number + MaxOpticZoom?: number + MaxRepairResource?: number + TargetItemFilter?: string[] + RepairQuality?: number + RepairType?: string + StackMinRandom?: number + StackMaxRandom?: number + ammoType?: string + InitialSpeed?: number + BallisticCoeficient?: number + BulletMassGram?: number + BulletDiameterMilimeters?: number + Damage?: number + ammoAccr?: number + ammoRec?: number + ammoDist?: number + buckshotBullets?: number + PenetrationPower?: number + PenetrationPowerDiviation?: number + ammoHear?: number + ammoSfx?: string + MisfireChance?: number + MinFragmentsCount?: number + MaxFragmentsCount?: number + ammoShiftChance?: number + casingName?: string + casingEjectPower?: number + casingMass?: number + casingSounds?: string + ProjectileCount?: number + PenetrationChanceObstacle?: number + PenetrationDamageMod: number + RicochetChance?: number + FragmentationChance?: number + Deterioration?: number + SpeedRetardation?: number + Tracer?: boolean + TracerColor?: string + TracerDistance?: number + ArmorDamage?: number + Caliber?: string + StaminaBurnPerDamage?: number + HeavyBleedingDelta?: number + LightBleedingDelta?: number + ShowBullet?: boolean + HasGrenaderComponent?: boolean + FuzeArmTimeSec?: number + ExplosionStrength?: number + MinExplosionDistance?: number + MaxExplosionDistance?: number + FragmentsCount?: number + FragmentType?: string + ShowHitEffectOnExplode?: boolean + ExplosionType?: string + AmmoLifeTimeSec?: number + Contusion?: Ixyz + ArmorDistanceDistanceDamage?: Ixyz + Blindness?: Ixyz + IsLightAndSoundShot?: boolean + LightAndSoundShotAngle?: number + LightAndSoundShotSelfContusionTime?: number + LightAndSoundShotSelfContusionStrength?: number + MalfMisfireChance?: number + MalfFeedChance?: number + StackSlots?: StackSlot[] + type?: string + eqMin?: number + eqMax?: number + rate?: number + ThrowType?: string + ExplDelay?: number + Strength?: number + ContusionDistance?: number + throwDamMax?: number + explDelay?: number + EmitTime?: number + CanBeHiddenDuringThrow?: boolean + MinTimeToContactExplode?: number + ExplosionEffectType?: string + LinkedWeapon?: string + UseAmmoWithoutShell?: boolean + RandomLootSettings?: IRandomLootSettings + RecoilCategoryMultiplierHandRotation?: number + RecoilDampingHandRotation?: number + LeanWeaponAgainstBody?: boolean + RemoveShellAfterFire?: boolean + RepairStrategyTypes?: string[] + IsEncoded?: boolean + LayoutName?: string + Lower75Prefab?: Prefab + MaxUsages?: number } export interface IHealthEffect { - type: string; - value: number; + type: string + value: number } export interface Prefab { - path: string; - rcid: string; + path: string + rcid: string } export interface Grid { - _name: string; - _id: string; - _parent: string; - _props: GridProps; - _proto: string; + _name: string + _id: string + _parent: string + _props: GridProps + _proto: string } export interface GridProps { - filters: GridFilter[]; - cellsH: number; - cellsV: number; - minCount: number; - maxCount: number; - maxWeight: number; - isSortingTable: boolean; + filters: GridFilter[] + cellsH: number + cellsV: number + minCount: number + maxCount: number + maxWeight: number + isSortingTable: boolean } export interface GridFilter { - Filter: string[]; - ExcludedFilter: string[]; + Filter: string[] + ExcludedFilter: string[] } export interface Slot { - _name: string; - _id: string; - _parent: string; - _props: SlotProps; - _max_count?: number; - _required?: boolean; - _mergeSlotWithChildren?: boolean; - _proto: string; + _name: string + _id: string + _parent: string + _props: SlotProps + _max_count?: number + _required?: boolean + _mergeSlotWithChildren?: boolean + _proto: string } export interface SlotProps { - filters: SlotFilter[]; + filters: SlotFilter[] } export interface SlotFilter { - Shift?: number; - locked?: boolean; - Plate?: string; - armorColliders?: string[]; - armorPlateColliders?: string[]; - Filter: string[]; - AnimationIndex?: number; + Shift?: number + locked?: boolean + Plate?: string + armorColliders?: string[] + armorPlateColliders?: string[] + Filter: string[] + AnimationIndex?: number } export interface StackSlot { - _name?: string; - _id: string; - _parent: string; - _max_count: number; - _props: StackSlotProps; - _proto: string; - upd: any; + _name?: string + _id: string + _parent: string + _max_count: number + _props: StackSlotProps + _proto: string + upd: any } export interface StackSlotProps { - filters: SlotFilter[]; + filters: SlotFilter[] } export interface IRandomLootSettings { - allowToSpawnIdenticalItems: boolean; - allowToSpawnQuestItems: boolean; - countByRarity: any[]; - excluded: IRandomLootExcluded; - filters: any[]; - findInRaid: boolean; - maxCount: number; - minCount: number; + allowToSpawnIdenticalItems: boolean + allowToSpawnQuestItems: boolean + countByRarity: any[] + excluded: IRandomLootExcluded + filters: any[] + findInRaid: boolean + maxCount: number + minCount: number } export interface IRandomLootExcluded { - categoryTemplates: any[]; - rarity: string[]; - templates: any[]; + categoryTemplates: any[] + rarity: string[] + templates: any[] } export interface EffectsHealth { - Energy: EffectsHealthProps; - Hydration: EffectsHealthProps; + Energy: EffectsHealthProps + Hydration: EffectsHealthProps } export interface EffectsHealthProps { - value: number; + value: number } export interface EffectsDamage { - Pain: IEffectDamageProps; - LightBleeding: IEffectDamageProps; - HeavyBleeding: IEffectDamageProps; - Contusion: IEffectDamageProps; - RadExposure: IEffectDamageProps; - Fracture: IEffectDamageProps; - DestroyedPart: IEffectDamageProps; + Pain: IEffectDamageProps + LightBleeding: IEffectDamageProps + HeavyBleeding: IEffectDamageProps + Contusion: IEffectDamageProps + RadExposure: IEffectDamageProps + Fracture: IEffectDamageProps + DestroyedPart: IEffectDamageProps } export interface IEffectDamageProps { - delay: number; - duration: number; - fadeOut: number; - cost?: number; - healthPenaltyMin?: number; - healthPenaltyMax?: number; + delay: number + duration: number + fadeOut: number + cost?: number + healthPenaltyMin?: number + healthPenaltyMax?: number } export interface IColor { - r: number; - g: number; - b: number; - a: number; + r: number + g: number + b: number + a: number } export interface IShotsGroupSettings { - EndShotIndex: number; - ShotRecoilPositionStrength: Ixyz; - ShotRecoilRadianRange: Ixyz; - ShotRecoilRotationStrength: Ixyz; - StartShotIndex: number; + EndShotIndex: number + ShotRecoilPositionStrength: Ixyz + ShotRecoilRadianRange: Ixyz + ShotRecoilRotationStrength: Ixyz + StartShotIndex: number } diff --git a/project/src/models/eft/common/tables/ITrader.ts b/project/src/models/eft/common/tables/ITrader.ts index a54bbd19..8dc93778 100644 --- a/project/src/models/eft/common/tables/ITrader.ts +++ b/project/src/models/eft/common/tables/ITrader.ts @@ -4,121 +4,121 @@ import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderService export interface ITrader { - assort?: ITraderAssort; - base: ITraderBase; - dialogue?: Record; - questassort?: Record>; - suits?: ISuit[]; - services?: ITraderServiceModel[]; + assort?: ITraderAssort + base: ITraderBase + dialogue?: Record + questassort?: Record> + suits?: ISuit[] + services?: ITraderServiceModel[] } export interface ITraderBase { - refreshTraderRagfairOffers: boolean; - _id: string; - availableInRaid: boolean; - avatar: string; - balance_dol: number; - balance_eur: number; - balance_rub: number; - buyer_up: boolean; - currency: string; - customization_seller: boolean; - discount: number; - discount_end: number; - gridHeight: number; - insurance: Insurance; - items_buy: IItemBuyData; - items_buy_prohibited: IItemBuyData; - location: string; - loyaltyLevels: LoyaltyLevel[]; - medic: boolean; - name: string; - nextResupply: number; - nickname: string; - repair: Repair; - sell_category: string[]; - surname: string; - unlockedByDefault: boolean; + refreshTraderRagfairOffers: boolean + _id: string + availableInRaid: boolean + avatar: string + balance_dol: number + balance_eur: number + balance_rub: number + buyer_up: boolean + currency: string + customization_seller: boolean + discount: number + discount_end: number + gridHeight: number + insurance: Insurance + items_buy: IItemBuyData + items_buy_prohibited: IItemBuyData + location: string + loyaltyLevels: LoyaltyLevel[] + medic: boolean + name: string + nextResupply: number + nickname: string + repair: Repair + sell_category: string[] + surname: string + unlockedByDefault: boolean } export interface IItemBuyData { - category: string[]; - id_list: string[]; + category: string[] + id_list: string[] } export interface Insurance { - availability: boolean; - excluded_category: string[]; - max_return_hour: number; - max_storage_time: number; - min_payment: number; - min_return_hour: number; + availability: boolean + excluded_category: string[] + max_return_hour: number + max_storage_time: number + min_payment: number + min_return_hour: number } export interface LoyaltyLevel { - buy_price_coef: number; - exchange_price_coef: number; - heal_price_coef: number; - insurance_price_coef: number; - minLevel: number; - minSalesSum: number; - minStanding: number; - repair_price_coef: number; + buy_price_coef: number + exchange_price_coef: number + heal_price_coef: number + insurance_price_coef: number + minLevel: number + minSalesSum: number + minStanding: number + repair_price_coef: number } export interface Repair { - availability: boolean; - currency: string; - currency_coefficient: number; - excluded_category: string[]; + availability: boolean + currency: string + currency_coefficient: number + excluded_category: string[] /** Doesn't exist in client object */ - excluded_id_list: any[]; - quality: number; + excluded_id_list: any[] + quality: number } export interface ITraderAssort { - nextResupply: number; - items: Item[]; - barter_scheme: Record; - loyal_level_items: Record; + nextResupply: number + items: Item[] + barter_scheme: Record + loyal_level_items: Record } export interface IBarterScheme { - count: number; - _tpl: string; - onlyFunctional?: boolean; - sptQuestLocked?: boolean; + count: number + _tpl: string + onlyFunctional?: boolean + sptQuestLocked?: boolean } export interface ISuit { - _id: string; - tid: string; - suiteId: string; - isActive: boolean; - requirements: ISuitRequirements; + _id: string + tid: string + suiteId: string + isActive: boolean + requirements: ISuitRequirements } export interface ISuitRequirements { - loyaltyLevel: number; - profileLevel: number; - standing: number; - skillRequirements: string[]; - questRequirements: string[]; - itemRequirements: ItemRequirement[]; + loyaltyLevel: number + profileLevel: number + standing: number + skillRequirements: string[] + questRequirements: string[] + itemRequirements: ItemRequirement[] } export interface ItemRequirement { - count: number; - _tpl: string; - onlyFunctional: boolean; + count: number + _tpl: string + onlyFunctional: boolean } diff --git a/project/src/models/eft/customization/IBuyClothingRequestData.ts b/project/src/models/eft/customization/IBuyClothingRequestData.ts index c5e461e4..dab74dfe 100644 --- a/project/src/models/eft/customization/IBuyClothingRequestData.ts +++ b/project/src/models/eft/customization/IBuyClothingRequestData.ts @@ -1,13 +1,13 @@ export interface IBuyClothingRequestData { - Action: "CustomizationBuy"; - offer: string; - items: ClothingItem[]; + Action: "CustomizationBuy" + offer: string + items: ClothingItem[] } export interface ClothingItem { - del: boolean; - id: string; - count: number; + del: boolean + id: string + count: number } diff --git a/project/src/models/eft/customization/IGetSuitsResponse.ts b/project/src/models/eft/customization/IGetSuitsResponse.ts index d0635c44..8832c574 100644 --- a/project/src/models/eft/customization/IGetSuitsResponse.ts +++ b/project/src/models/eft/customization/IGetSuitsResponse.ts @@ -1,5 +1,5 @@ export interface IGetSuitsResponse { - _id: string; - suites: string[]; + _id: string + suites: string[] } diff --git a/project/src/models/eft/customization/IWearClothingRequestData.ts b/project/src/models/eft/customization/IWearClothingRequestData.ts index b4660f94..ff7e220b 100644 --- a/project/src/models/eft/customization/IWearClothingRequestData.ts +++ b/project/src/models/eft/customization/IWearClothingRequestData.ts @@ -1,5 +1,5 @@ export interface IWearClothingRequestData { - Action: "CustomizationWear"; - suites: string[]; + Action: "CustomizationWear" + suites: string[] } diff --git a/project/src/models/eft/dialog/IAcceptFriendRequestData.ts b/project/src/models/eft/dialog/IAcceptFriendRequestData.ts index c55826ad..7e044094 100644 --- a/project/src/models/eft/dialog/IAcceptFriendRequestData.ts +++ b/project/src/models/eft/dialog/IAcceptFriendRequestData.ts @@ -12,5 +12,5 @@ export interface IDeclineFriendRequestData extends IBaseFriendRequest export interface IBaseFriendRequest { - profileId: string; + profileId: string } diff --git a/project/src/models/eft/dialog/IChatServer.ts b/project/src/models/eft/dialog/IChatServer.ts index fc44abcb..bfef3f3d 100644 --- a/project/src/models/eft/dialog/IChatServer.ts +++ b/project/src/models/eft/dialog/IChatServer.ts @@ -1,19 +1,19 @@ export interface IChatServer { - _id: string; - RegistrationId: number; - VersionId: string; - Ip: string; - Port: number; - DateTime: number; - Chats: IChat[]; - Regions: string[]; + _id: string + RegistrationId: number + VersionId: string + Ip: string + Port: number + DateTime: number + Chats: IChat[] + Regions: string[] /** Possibly removed */ - IsDeveloper?: boolean; + IsDeveloper?: boolean } export interface IChat { - _id: string; - Members: number; + _id: string + Members: number } diff --git a/project/src/models/eft/dialog/IClearMailMessageRequest.ts b/project/src/models/eft/dialog/IClearMailMessageRequest.ts index 00c5e33b..7c6007ad 100644 --- a/project/src/models/eft/dialog/IClearMailMessageRequest.ts +++ b/project/src/models/eft/dialog/IClearMailMessageRequest.ts @@ -1,4 +1,4 @@ export interface IClearMailMessageRequest { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/IDeleteFriendRequest.ts b/project/src/models/eft/dialog/IDeleteFriendRequest.ts index afaaee34..89115e11 100644 --- a/project/src/models/eft/dialog/IDeleteFriendRequest.ts +++ b/project/src/models/eft/dialog/IDeleteFriendRequest.ts @@ -1,4 +1,4 @@ export interface IDeleteFriendRequest { - friend_id: string; + friend_id: string } diff --git a/project/src/models/eft/dialog/IFriendRequestData.ts b/project/src/models/eft/dialog/IFriendRequestData.ts index 63194e7b..7606c44d 100644 --- a/project/src/models/eft/dialog/IFriendRequestData.ts +++ b/project/src/models/eft/dialog/IFriendRequestData.ts @@ -1,4 +1,4 @@ export interface IFriendRequestData { - to: string; + to: string } diff --git a/project/src/models/eft/dialog/IFriendRequestSendResponse.ts b/project/src/models/eft/dialog/IFriendRequestSendResponse.ts index dee3ea8d..fc058479 100644 --- a/project/src/models/eft/dialog/IFriendRequestSendResponse.ts +++ b/project/src/models/eft/dialog/IFriendRequestSendResponse.ts @@ -1,6 +1,6 @@ export interface IFriendRequestSendResponse { - status: number; - requestId: string; - retryAfter: number; + status: number + requestId: string + retryAfter: number } diff --git a/project/src/models/eft/dialog/IGetAllAttachmentsRequestData.ts b/project/src/models/eft/dialog/IGetAllAttachmentsRequestData.ts index 5c74c142..4df486b7 100644 --- a/project/src/models/eft/dialog/IGetAllAttachmentsRequestData.ts +++ b/project/src/models/eft/dialog/IGetAllAttachmentsRequestData.ts @@ -1,4 +1,4 @@ export interface IGetAllAttachmentsRequestData { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/IGetAllAttachmentsResponse.ts b/project/src/models/eft/dialog/IGetAllAttachmentsResponse.ts index 5ad1c2ef..29a71198 100644 --- a/project/src/models/eft/dialog/IGetAllAttachmentsResponse.ts +++ b/project/src/models/eft/dialog/IGetAllAttachmentsResponse.ts @@ -2,7 +2,7 @@ import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetAllAttachmentsResponse { - messages: Message[]; - profiles: any[]; - hasMessagesWithRewards: boolean; + messages: Message[] + profiles: any[] + hasMessagesWithRewards: boolean } diff --git a/project/src/models/eft/dialog/IGetChatServerListRequestData.ts b/project/src/models/eft/dialog/IGetChatServerListRequestData.ts index 34fece80..9056790a 100644 --- a/project/src/models/eft/dialog/IGetChatServerListRequestData.ts +++ b/project/src/models/eft/dialog/IGetChatServerListRequestData.ts @@ -1,4 +1,4 @@ export interface IGetChatServerListRequestData { - VersionId: string; + VersionId: string } diff --git a/project/src/models/eft/dialog/IGetFriendListDataResponse.ts b/project/src/models/eft/dialog/IGetFriendListDataResponse.ts index 4733ee11..0b901a06 100644 --- a/project/src/models/eft/dialog/IGetFriendListDataResponse.ts +++ b/project/src/models/eft/dialog/IGetFriendListDataResponse.ts @@ -2,7 +2,7 @@ import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IGetFriendListDataResponse { - Friends: IUserDialogInfo[]; - Ignore: string[]; - InIgnoreList: string[]; + Friends: IUserDialogInfo[] + Ignore: string[] + InIgnoreList: string[] } diff --git a/project/src/models/eft/dialog/IGetMailDialogInfoRequestData.ts b/project/src/models/eft/dialog/IGetMailDialogInfoRequestData.ts index d138cbb7..ccf0803a 100644 --- a/project/src/models/eft/dialog/IGetMailDialogInfoRequestData.ts +++ b/project/src/models/eft/dialog/IGetMailDialogInfoRequestData.ts @@ -1,4 +1,4 @@ export interface IGetMailDialogInfoRequestData { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/IGetMailDialogListRequestData.ts b/project/src/models/eft/dialog/IGetMailDialogListRequestData.ts index c4605996..507bc56a 100644 --- a/project/src/models/eft/dialog/IGetMailDialogListRequestData.ts +++ b/project/src/models/eft/dialog/IGetMailDialogListRequestData.ts @@ -1,5 +1,5 @@ export interface IGetMailDialogListRequestData { - limit: number; - offset: number; + limit: number + offset: number } diff --git a/project/src/models/eft/dialog/IGetMailDialogViewRequestData.ts b/project/src/models/eft/dialog/IGetMailDialogViewRequestData.ts index 3b8f443f..b5bb0b70 100644 --- a/project/src/models/eft/dialog/IGetMailDialogViewRequestData.ts +++ b/project/src/models/eft/dialog/IGetMailDialogViewRequestData.ts @@ -2,8 +2,8 @@ import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface IGetMailDialogViewRequestData { - type: MessageType; - dialogId: string; - limit: number; - time: number; // decimal + type: MessageType + dialogId: string + limit: number + time: number // decimal } diff --git a/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts b/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts index 763737d7..58ec2259 100644 --- a/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts +++ b/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts @@ -2,7 +2,7 @@ import { IUserDialogInfo, Message } from "@spt-aki/models/eft/profile/IAkiProfil export interface IGetMailDialogViewResponseData { - messages: Message[]; - profiles: IUserDialogInfo[]; - hasMessagesWithRewards: boolean; + messages: Message[] + profiles: IUserDialogInfo[] + hasMessagesWithRewards: boolean } diff --git a/project/src/models/eft/dialog/IPinDialogRequestData.ts b/project/src/models/eft/dialog/IPinDialogRequestData.ts index 6dc1222a..04a5b8f0 100644 --- a/project/src/models/eft/dialog/IPinDialogRequestData.ts +++ b/project/src/models/eft/dialog/IPinDialogRequestData.ts @@ -1,4 +1,4 @@ export interface IPinDialogRequestData { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/IRemoveDialogRequestData.ts b/project/src/models/eft/dialog/IRemoveDialogRequestData.ts index 591145f4..7ff2f9e6 100644 --- a/project/src/models/eft/dialog/IRemoveDialogRequestData.ts +++ b/project/src/models/eft/dialog/IRemoveDialogRequestData.ts @@ -1,4 +1,4 @@ export interface IRemoveDialogRequestData { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/IRemoveMailMessageRequest.ts b/project/src/models/eft/dialog/IRemoveMailMessageRequest.ts index 1594a15f..83ab3915 100644 --- a/project/src/models/eft/dialog/IRemoveMailMessageRequest.ts +++ b/project/src/models/eft/dialog/IRemoveMailMessageRequest.ts @@ -1,4 +1,4 @@ export interface IRemoveMailMessageRequest { - dialogId: string; + dialogId: string } diff --git a/project/src/models/eft/dialog/ISendMessageRequest.ts b/project/src/models/eft/dialog/ISendMessageRequest.ts index b09a7e93..6bbc2748 100644 --- a/project/src/models/eft/dialog/ISendMessageRequest.ts +++ b/project/src/models/eft/dialog/ISendMessageRequest.ts @@ -2,8 +2,8 @@ import { MessageType } from "@spt-aki/models/enums/MessageType"; export interface ISendMessageRequest { - dialogId: string; - type: MessageType; - text: string; - replyTo: string; + dialogId: string + type: MessageType + text: string + replyTo: string } diff --git a/project/src/models/eft/dialog/ISetDialogReadRequestData.ts b/project/src/models/eft/dialog/ISetDialogReadRequestData.ts index 244d34a8..27623fa7 100644 --- a/project/src/models/eft/dialog/ISetDialogReadRequestData.ts +++ b/project/src/models/eft/dialog/ISetDialogReadRequestData.ts @@ -1,4 +1,4 @@ export interface ISetDialogReadRequestData { - dialogs: string[]; + dialogs: string[] } diff --git a/project/src/models/eft/game/ICheckVersionResponse.ts b/project/src/models/eft/game/ICheckVersionResponse.ts index f1cda7bc..5770b570 100644 --- a/project/src/models/eft/game/ICheckVersionResponse.ts +++ b/project/src/models/eft/game/ICheckVersionResponse.ts @@ -1,5 +1,5 @@ export interface ICheckVersionResponse { - isvalid: boolean; - latestVersion: string; + isvalid: boolean + latestVersion: string } diff --git a/project/src/models/eft/game/ICurrentGroupResponse.ts b/project/src/models/eft/game/ICurrentGroupResponse.ts index 3100bb95..0e543a9d 100644 --- a/project/src/models/eft/game/ICurrentGroupResponse.ts +++ b/project/src/models/eft/game/ICurrentGroupResponse.ts @@ -2,22 +2,22 @@ import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface ICurrentGroupResponse { - squad: ICurrentGroupSquadMember[]; + squad: ICurrentGroupSquadMember[] } export interface ICurrentGroupSquadMember { - _id: string; - aid: string; - info: ICurrentGroupMemberInfo; - isLeader: boolean; - isReady: boolean; + _id: string + aid: string + info: ICurrentGroupMemberInfo + isLeader: boolean + isReady: boolean } export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; + Nickname: string + Side: string + Level: string + MemberCategory: MemberCategory } diff --git a/project/src/models/eft/game/IGameConfigResponse.ts b/project/src/models/eft/game/IGameConfigResponse.ts index 6c6d839c..011306bd 100644 --- a/project/src/models/eft/game/IGameConfigResponse.ts +++ b/project/src/models/eft/game/IGameConfigResponse.ts @@ -1,25 +1,25 @@ export interface IGameConfigResponse { - aid: number; - lang: string; - languages: Record; - ndaFree: boolean; - taxonomy: number; - activeProfileId: string; - backend: Backend; - useProtobuf: boolean; - utc_time: number; + aid: number + lang: string + languages: Record + ndaFree: boolean + taxonomy: number + activeProfileId: string + backend: Backend + useProtobuf: boolean + utc_time: number /** Total in game time */ - totalInGame: number; - reportAvailable: boolean; - twitchEventMember: boolean; + totalInGame: number + reportAvailable: boolean + twitchEventMember: boolean } export interface Backend { - Lobby: string; - Trading: string; - Messaging: string; - Main: string; - RagFair: string; + Lobby: string + Trading: string + Messaging: string + Main: string + RagFair: string } diff --git a/project/src/models/eft/game/IGameEmptyCrcRequestData.ts b/project/src/models/eft/game/IGameEmptyCrcRequestData.ts index 8518f9a7..9cd17c8b 100644 --- a/project/src/models/eft/game/IGameEmptyCrcRequestData.ts +++ b/project/src/models/eft/game/IGameEmptyCrcRequestData.ts @@ -1,4 +1,4 @@ export interface IGameEmptyCrcRequestData { - crc: number; + crc: number } diff --git a/project/src/models/eft/game/IGameKeepAliveResponse.ts b/project/src/models/eft/game/IGameKeepAliveResponse.ts index 443d4b6e..c84b6d1f 100644 --- a/project/src/models/eft/game/IGameKeepAliveResponse.ts +++ b/project/src/models/eft/game/IGameKeepAliveResponse.ts @@ -1,5 +1,5 @@ export interface IGameKeepAliveResponse { - msg: string; - utc_time: number; + msg: string + utc_time: number } diff --git a/project/src/models/eft/game/IGameLogoutResponseData.ts b/project/src/models/eft/game/IGameLogoutResponseData.ts index f3374559..188a52ae 100644 --- a/project/src/models/eft/game/IGameLogoutResponseData.ts +++ b/project/src/models/eft/game/IGameLogoutResponseData.ts @@ -1,4 +1,4 @@ export interface IGameLogoutResponseData { - status: string; + status: string } diff --git a/project/src/models/eft/game/IGameModeRequestData.ts b/project/src/models/eft/game/IGameModeRequestData.ts index 283be2bc..6b4b13d1 100644 --- a/project/src/models/eft/game/IGameModeRequestData.ts +++ b/project/src/models/eft/game/IGameModeRequestData.ts @@ -1,4 +1,4 @@ export interface IGameModeRequestData { - sessionMode: string | null; + sessionMode: string | null } diff --git a/project/src/models/eft/game/IGameModeResponse.ts b/project/src/models/eft/game/IGameModeResponse.ts index e26a5944..e7d8b986 100644 --- a/project/src/models/eft/game/IGameModeResponse.ts +++ b/project/src/models/eft/game/IGameModeResponse.ts @@ -6,6 +6,6 @@ export enum ESessionMode export interface IGameModeResponse { - gameMode: ESessionMode; - backendUrl: string; + gameMode: ESessionMode + backendUrl: string } diff --git a/project/src/models/eft/game/IGameStartResponse.ts b/project/src/models/eft/game/IGameStartResponse.ts index a101f356..f5c90f67 100644 --- a/project/src/models/eft/game/IGameStartResponse.ts +++ b/project/src/models/eft/game/IGameStartResponse.ts @@ -1,4 +1,4 @@ export interface IGameStartResponse { - utc_time: number; + utc_time: number } diff --git a/project/src/models/eft/game/IGetItemPricesResponse.ts b/project/src/models/eft/game/IGetItemPricesResponse.ts index ab2bc2db..4e413378 100644 --- a/project/src/models/eft/game/IGetItemPricesResponse.ts +++ b/project/src/models/eft/game/IGetItemPricesResponse.ts @@ -1,6 +1,6 @@ export interface IGetItemPricesResponse { - supplyNextTime: number; - prices: Record; - currencyCourses: Record; + supplyNextTime: number + prices: Record + currencyCourses: Record } diff --git a/project/src/models/eft/game/IGetRaidTimeRequest.ts b/project/src/models/eft/game/IGetRaidTimeRequest.ts index 85835d35..a06415d6 100644 --- a/project/src/models/eft/game/IGetRaidTimeRequest.ts +++ b/project/src/models/eft/game/IGetRaidTimeRequest.ts @@ -1,5 +1,5 @@ export interface IGetRaidTimeRequest { - Side: string; - Location: string; + Side: string + Location: string } diff --git a/project/src/models/eft/game/IGetRaidTimeResponse.ts b/project/src/models/eft/game/IGetRaidTimeResponse.ts index 40078161..377066c8 100644 --- a/project/src/models/eft/game/IGetRaidTimeResponse.ts +++ b/project/src/models/eft/game/IGetRaidTimeResponse.ts @@ -1,15 +1,15 @@ export interface IGetRaidTimeResponse { - RaidTimeMinutes: number; - NewSurviveTimeSeconds: number; - OriginalSurvivalTimeSeconds: number; - ExitChanges: ExtractChange[]; + RaidTimeMinutes: number + NewSurviveTimeSeconds: number + OriginalSurvivalTimeSeconds: number + ExitChanges: ExtractChange[] } export interface ExtractChange { - Name: string; - MinTime?: number; - MaxTime?: number; - Chance?: number; + Name: string + MinTime?: number + MaxTime?: number + Chance?: number } diff --git a/project/src/models/eft/game/IReportNicknameRequestData.ts b/project/src/models/eft/game/IReportNicknameRequestData.ts deleted file mode 100644 index bbce9814..00000000 --- a/project/src/models/eft/game/IReportNicknameRequestData.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IReportNicknameRequestData -{ - uid: string; -} diff --git a/project/src/models/eft/game/IServerDetails.ts b/project/src/models/eft/game/IServerDetails.ts index 7d082d3e..0fc4e74e 100644 --- a/project/src/models/eft/game/IServerDetails.ts +++ b/project/src/models/eft/game/IServerDetails.ts @@ -1,5 +1,5 @@ export interface IServerDetails { - ip: string; - port: number; + ip: string + port: number } diff --git a/project/src/models/eft/game/IVersionValidateRequestData.ts b/project/src/models/eft/game/IVersionValidateRequestData.ts index 35730eba..c31e7f67 100644 --- a/project/src/models/eft/game/IVersionValidateRequestData.ts +++ b/project/src/models/eft/game/IVersionValidateRequestData.ts @@ -1,14 +1,14 @@ export interface IVersionValidateRequestData { - version: Version; - develop: boolean; + version: Version + develop: boolean } export interface Version { - major: string; - minor: string; - game: string; - backend: string; - taxonomy: string; + major: string + minor: string + game: string + backend: string + taxonomy: string } diff --git a/project/src/models/eft/health/IHealthTreatmentRequestData.ts b/project/src/models/eft/health/IHealthTreatmentRequestData.ts index ec5859d7..2d182ea8 100644 --- a/project/src/models/eft/health/IHealthTreatmentRequestData.ts +++ b/project/src/models/eft/health/IHealthTreatmentRequestData.ts @@ -1,41 +1,41 @@ export interface IHealthTreatmentRequestData { - Action: "RestoreHealth"; - trader: string; - items: Cost[]; - difference: Difference; - timestamp: number; + Action: "RestoreHealth" + trader: string + items: Cost[] + difference: Difference + timestamp: number } export interface Cost { /** Id of stack to take money from */ - id: string; + id: string /** Amount of money to take off player for treatment */ - count: number; + count: number } export interface Difference { - BodyParts: BodyParts; - Energy: number; - Hydration: number; + BodyParts: BodyParts + Energy: number + Hydration: number } export interface BodyParts { - Head: BodyPart; - Chest: BodyPart; - Stomach: BodyPart; - LeftArm: BodyPart; - RightArm: BodyPart; - LeftLeg: BodyPart; - RightLeg: BodyPart; + Head: BodyPart + Chest: BodyPart + Stomach: BodyPart + LeftArm: BodyPart + RightArm: BodyPart + LeftLeg: BodyPart + RightLeg: BodyPart } export interface BodyPart { - Health: number; + Health: number /** Effects in array are to be removed */ - Effects: string[]; + Effects: string[] } diff --git a/project/src/models/eft/health/IOffraidEatRequestData.ts b/project/src/models/eft/health/IOffraidEatRequestData.ts index a327bea0..c095f08f 100644 --- a/project/src/models/eft/health/IOffraidEatRequestData.ts +++ b/project/src/models/eft/health/IOffraidEatRequestData.ts @@ -2,8 +2,8 @@ import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/ export interface IOffraidEatRequestData extends IBaseInteractionRequestData { - Action: "Eat"; - item: string; - count: number; - time: number; + Action: "Eat" + item: string + count: number + time: number } diff --git a/project/src/models/eft/health/IOffraidHealRequestData.ts b/project/src/models/eft/health/IOffraidHealRequestData.ts index db7570e9..fd6b1029 100644 --- a/project/src/models/eft/health/IOffraidHealRequestData.ts +++ b/project/src/models/eft/health/IOffraidHealRequestData.ts @@ -2,11 +2,11 @@ import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/ export interface IOffraidHealRequestData extends IBaseInteractionRequestData { - Action: "Heal"; - item: string; - part: BodyPart; - count: number; - time: number; + Action: "Heal" + item: string + part: BodyPart + count: number + time: number } export enum BodyPart diff --git a/project/src/models/eft/health/ISyncHealthRequestData.ts b/project/src/models/eft/health/ISyncHealthRequestData.ts index 5b59155a..4c1a0735 100644 --- a/project/src/models/eft/health/ISyncHealthRequestData.ts +++ b/project/src/models/eft/health/ISyncHealthRequestData.ts @@ -1,26 +1,26 @@ export interface ISyncHealthRequestData { - Health: Health; - IsAlive: boolean; - Hydration?: number; - Energy?: number; - Temperature?: number; + Health: Health + IsAlive: boolean + Hydration?: number + Energy?: number + Temperature?: number } export interface Health { - Head?: BodyPartHealth; - Chest?: BodyPartHealth; - Stomach?: BodyPartHealth; - LeftArm?: BodyPartHealth; - RightArm?: BodyPartHealth; - LeftLeg?: BodyPartHealth; - RightLeg?: BodyPartHealth; + Head?: BodyPartHealth + Chest?: BodyPartHealth + Stomach?: BodyPartHealth + LeftArm?: BodyPartHealth + RightArm?: BodyPartHealth + LeftLeg?: BodyPartHealth + RightLeg?: BodyPartHealth } export interface BodyPartHealth { - Maximum: number; - Current: number; - Effects: Record; + Maximum: number + Current: number + Effects: Record } diff --git a/project/src/models/eft/health/IWorkoutData.ts b/project/src/models/eft/health/IWorkoutData.ts index 36080734..06c009c2 100644 --- a/project/src/models/eft/health/IWorkoutData.ts +++ b/project/src/models/eft/health/IWorkoutData.ts @@ -2,6 +2,6 @@ export interface IWorkoutData extends Record { - skills: any; - effects: any; + skills: any + effects: any } diff --git a/project/src/models/eft/hideout/HideoutUpgradeCompleteRequestData.ts b/project/src/models/eft/hideout/HideoutUpgradeCompleteRequestData.ts index 5c8035c2..34ea75b8 100644 --- a/project/src/models/eft/hideout/HideoutUpgradeCompleteRequestData.ts +++ b/project/src/models/eft/hideout/HideoutUpgradeCompleteRequestData.ts @@ -1,6 +1,6 @@ export interface HideoutUpgradeCompleteRequestData { - Action: string; - areaType: number; - timestamp: number; + Action: string + areaType: number + timestamp: number } diff --git a/project/src/models/eft/hideout/IHandleQTEEventRequestData.ts b/project/src/models/eft/hideout/IHandleQTEEventRequestData.ts index b2692536..ed59291e 100644 --- a/project/src/models/eft/hideout/IHandleQTEEventRequestData.ts +++ b/project/src/models/eft/hideout/IHandleQTEEventRequestData.ts @@ -1,9 +1,9 @@ export interface IHandleQTEEventRequestData { - Action: string; + Action: string /** true if QTE was successful, otherwise false */ - results: boolean[]; + results: boolean[] /** Id of the QTE object used from db/hideout/qte.json */ - id: string; - timestamp: number; + id: string + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutArea.ts b/project/src/models/eft/hideout/IHideoutArea.ts index 595566ec..29a1b368 100644 --- a/project/src/models/eft/hideout/IHideoutArea.ts +++ b/project/src/models/eft/hideout/IHideoutArea.ts @@ -3,92 +3,92 @@ import { BonusType } from "@spt-aki/models/enums/BonusType"; export interface IHideoutArea { - _id: string; - type: number; - enabled: boolean; - needsFuel: boolean; - requirements: IAreaRequirement[]; - takeFromSlotLocked: boolean; - craftGivesExp: boolean; - displayLevel: boolean; - enableAreaRequirements: boolean; - parentArea?: string; - stages: Record; + _id: string + type: number + enabled: boolean + needsFuel: boolean + requirements: IAreaRequirement[] + takeFromSlotLocked: boolean + craftGivesExp: boolean + displayLevel: boolean + enableAreaRequirements: boolean + parentArea?: string + stages: Record } export interface IAreaRequirement { - areaType: number; - requiredlevel: number; - type: string; + areaType: number + requiredlevel: number + type: string } export interface Stage { - autoUpgrade: boolean; - bonuses: StageBonus[]; - constructionTime: number; + autoUpgrade: boolean + bonuses: StageBonus[] + constructionTime: number /** Containers inventory tpl */ - container?: string; - description: string; - displayInterface: boolean; - improvements: IStageImprovement[]; - requirements: IStageRequirement[]; - slots: number; + container?: string + description: string + displayInterface: boolean + improvements: IStageImprovement[] + requirements: IStageRequirement[] + slots: number } export interface IStageImprovement { - id: string; - bonuses: IStageImprovementBonus[]; - improvementTime: number; - requirements: IStageImprovementRequirement[]; + id: string + bonuses: IStageImprovementBonus[] + improvementTime: number + requirements: IStageImprovementRequirement[] } export interface IStageImprovementBonus { - passive: boolean; - production: boolean; - type: string; - value: number; - visible: boolean; + passive: boolean + production: boolean + type: string + value: number + visible: boolean } export interface IStageImprovementRequirement { - count: number; - isEncoded: boolean; - isFunctional: boolean; - templateId: string; - type: string; + count: number + isEncoded: boolean + isFunctional: boolean + templateId: string + type: string } export interface IStageRequirement { - areaType?: number; - requiredLevel?: number; - type: string; - templateId?: string; - count?: number; - isEncoded: false; - isFunctional?: boolean; - traderId?: string; - loyaltyLevel?: number; - skillName?: string; - skillLevel?: number; + areaType?: number + requiredLevel?: number + type: string + templateId?: string + count?: number + isEncoded: false + isFunctional?: boolean + traderId?: string + loyaltyLevel?: number + skillName?: string + skillLevel?: number } export interface StageBonus { - value: number; - passive: boolean; - production: boolean; - visible: boolean; - skillType?: BonusSkillType; - type: BonusType; - filter?: string[]; - icon?: string; + value: number + passive: boolean + production: boolean + visible: boolean + skillType?: BonusSkillType + type: BonusType + filter?: string[] + icon?: string /** CHANGES PER DUMP */ - id?: string; - templateId?: string; + id?: string + templateId?: string } diff --git a/project/src/models/eft/hideout/IHideoutCancelProductionRequestData.ts b/project/src/models/eft/hideout/IHideoutCancelProductionRequestData.ts index c9986ac8..ef0451fa 100644 --- a/project/src/models/eft/hideout/IHideoutCancelProductionRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutCancelProductionRequestData.ts @@ -1,6 +1,6 @@ export interface IHideoutCancelProductionRequestData { - Action: "HideoutCancelProductionCommand"; - recipeId: string; - timestamp: number; + Action: "HideoutCancelProductionCommand" + recipeId: string + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutContinuousProductionStartRequestData.ts b/project/src/models/eft/hideout/IHideoutContinuousProductionStartRequestData.ts index 8598c7a2..20a50f0d 100644 --- a/project/src/models/eft/hideout/IHideoutContinuousProductionStartRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutContinuousProductionStartRequestData.ts @@ -1,6 +1,6 @@ export interface IHideoutContinuousProductionStartRequestData { - Action: "HideoutContinuousProductionStart"; - recipeId: string; - timestamp: number; + Action: "HideoutContinuousProductionStart" + recipeId: string + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutImproveAreaRequestData.ts b/project/src/models/eft/hideout/IHideoutImproveAreaRequestData.ts index 5c033735..01315949 100644 --- a/project/src/models/eft/hideout/IHideoutImproveAreaRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutImproveAreaRequestData.ts @@ -1,16 +1,16 @@ export interface IHideoutImproveAreaRequestData { - Action: "HideoutImproveArea"; + Action: "HideoutImproveArea" /** Hideout area id from areas.json */ - id: string; - areaType: number; - items: HideoutItem[]; - timestamp: number; + id: string + areaType: number + items: HideoutItem[] + timestamp: number } export interface HideoutItem { /** Hideout inventory id that was used by improvement action */ - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/hideout/IHideoutProduction.ts b/project/src/models/eft/hideout/IHideoutProduction.ts index 03004294..cd27b807 100644 --- a/project/src/models/eft/hideout/IHideoutProduction.ts +++ b/project/src/models/eft/hideout/IHideoutProduction.ts @@ -1,28 +1,28 @@ export interface IHideoutProduction { - _id: string; - areaType: number; - requirements: Requirement[]; - productionTime: number; + _id: string + areaType: number + requirements: Requirement[] + productionTime: number /** Tpl of item being crafted */ - endProduct: string; - isEncoded: boolean; - locked: boolean; - needFuelForAllProductionTime: boolean; - continuous: boolean; - count: number; - productionLimitCount: number; + endProduct: string + isEncoded: boolean + locked: boolean + needFuelForAllProductionTime: boolean + continuous: boolean + count: number + productionLimitCount: number } export interface Requirement { - templateId?: string; - count?: number; - isEncoded?: boolean; - isFunctional?: boolean; - type: string; - areaType?: number; - requiredLevel?: number; - resource?: number; - questId?: string; + templateId?: string + count?: number + isEncoded?: boolean + isFunctional?: boolean + type: string + areaType?: number + requiredLevel?: number + resource?: number + questId?: string } diff --git a/project/src/models/eft/hideout/IHideoutPutItemInRequestData.ts b/project/src/models/eft/hideout/IHideoutPutItemInRequestData.ts index 6f31cea3..03effd68 100644 --- a/project/src/models/eft/hideout/IHideoutPutItemInRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutPutItemInRequestData.ts @@ -1,13 +1,13 @@ export interface IHideoutPutItemInRequestData { - Action: "HideoutPutItemsInAreaSlots"; - areaType: number; - items: Record; - timestamp: number; + Action: "HideoutPutItemsInAreaSlots" + areaType: number + items: Record + timestamp: number } export interface ItemDetails { - count: number; - id: string; + count: number + id: string } diff --git a/project/src/models/eft/hideout/IHideoutScavCase.ts b/project/src/models/eft/hideout/IHideoutScavCase.ts index 55dc1abd..52c387c8 100644 --- a/project/src/models/eft/hideout/IHideoutScavCase.ts +++ b/project/src/models/eft/hideout/IHideoutScavCase.ts @@ -2,22 +2,22 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IHideoutScavCase { - _id: string; - ProductionTime: number; - Requirements: Requirement[]; - EndProducts: EndProducts; + _id: string + ProductionTime: number + Requirements: Requirement[] + EndProducts: EndProducts } export interface Requirement { - templateId: string; - count: number; - isFunctional: boolean; - type: string; + templateId: string + count: number + isFunctional: boolean + type: string } export interface EndProducts { - Common: MinMax; - Rare: MinMax; - Superrare: MinMax; + Common: MinMax + Rare: MinMax + Superrare: MinMax } diff --git a/project/src/models/eft/hideout/IHideoutScavCaseStartRequestData.ts b/project/src/models/eft/hideout/IHideoutScavCaseStartRequestData.ts index a97a5655..4ea6aab8 100644 --- a/project/src/models/eft/hideout/IHideoutScavCaseStartRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutScavCaseStartRequestData.ts @@ -1,20 +1,20 @@ export interface IHideoutScavCaseStartRequestData { - Action: "HideoutScavCaseProductionStart"; - recipeId: string; - items: HideoutItem[]; - tools: Tool[]; - timestamp: number; + Action: "HideoutScavCaseProductionStart" + recipeId: string + items: HideoutItem[] + tools: Tool[] + timestamp: number } export interface HideoutItem { - id: string; - count: number; + id: string + count: number } export interface Tool { - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/hideout/IHideoutSettingsBase.ts b/project/src/models/eft/hideout/IHideoutSettingsBase.ts index 8432cd43..cc373d84 100644 --- a/project/src/models/eft/hideout/IHideoutSettingsBase.ts +++ b/project/src/models/eft/hideout/IHideoutSettingsBase.ts @@ -1,7 +1,7 @@ export interface IHideoutSettingsBase { - generatorSpeedWithoutFuel: number; - generatorFuelFlowRate: number; - airFilterUnitFlowRate: number; - gpuBoostRate: number; + generatorSpeedWithoutFuel: number + generatorFuelFlowRate: number + airFilterUnitFlowRate: number + gpuBoostRate: number } diff --git a/project/src/models/eft/hideout/IHideoutSingleProductionStartRequestData.ts b/project/src/models/eft/hideout/IHideoutSingleProductionStartRequestData.ts index 8e4ff655..322f9909 100644 --- a/project/src/models/eft/hideout/IHideoutSingleProductionStartRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutSingleProductionStartRequestData.ts @@ -1,14 +1,14 @@ export interface IHideoutSingleProductionStartRequestData { - Action: "HideoutSingleProductionStart"; - recipeId: string; - items: Item[]; - tools: Item[]; - timestamp: number; + Action: "HideoutSingleProductionStart" + recipeId: string + items: Item[] + tools: Item[] + timestamp: number } export interface Item { - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/hideout/IHideoutTakeItemOutRequestData.ts b/project/src/models/eft/hideout/IHideoutTakeItemOutRequestData.ts index 28577924..ff20af2d 100644 --- a/project/src/models/eft/hideout/IHideoutTakeItemOutRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutTakeItemOutRequestData.ts @@ -1,7 +1,7 @@ export interface IHideoutTakeItemOutRequestData { - Action: "HideoutTakeItemsFromAreaSlots"; - areaType: number; - slots: number[]; - timestamp: number; + Action: "HideoutTakeItemsFromAreaSlots" + areaType: number + slots: number[] + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutTakeProductionRequestData.ts b/project/src/models/eft/hideout/IHideoutTakeProductionRequestData.ts index 33b94f78..2dd5a74f 100644 --- a/project/src/models/eft/hideout/IHideoutTakeProductionRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutTakeProductionRequestData.ts @@ -1,6 +1,6 @@ export interface IHideoutTakeProductionRequestData { - Action: "HideoutTakeProduction"; - recipeId: string; - timestamp: number; + Action: "HideoutTakeProduction" + recipeId: string + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutToggleAreaRequestData.ts b/project/src/models/eft/hideout/IHideoutToggleAreaRequestData.ts index 036c53b5..b8a19da0 100644 --- a/project/src/models/eft/hideout/IHideoutToggleAreaRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutToggleAreaRequestData.ts @@ -1,7 +1,7 @@ export interface IHideoutToggleAreaRequestData { - Action: "HideoutToggleArea"; - areaType: number; - enabled: boolean; - timestamp: number; + Action: "HideoutToggleArea" + areaType: number + enabled: boolean + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutUpgradeCompleteRequestData.ts b/project/src/models/eft/hideout/IHideoutUpgradeCompleteRequestData.ts index 5b12263d..1d5ece72 100644 --- a/project/src/models/eft/hideout/IHideoutUpgradeCompleteRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutUpgradeCompleteRequestData.ts @@ -1,6 +1,6 @@ export interface IHideoutUpgradeCompleteRequestData { - Action: "HideoutUpgradeComplete"; - areaType: number; - timestamp: number; + Action: "HideoutUpgradeComplete" + areaType: number + timestamp: number } diff --git a/project/src/models/eft/hideout/IHideoutUpgradeRequestData.ts b/project/src/models/eft/hideout/IHideoutUpgradeRequestData.ts index 4e6c03a2..3850d48e 100644 --- a/project/src/models/eft/hideout/IHideoutUpgradeRequestData.ts +++ b/project/src/models/eft/hideout/IHideoutUpgradeRequestData.ts @@ -1,13 +1,13 @@ export interface IHideoutUpgradeRequestData { - Action: "HideoutUpgrade"; - areaType: number; - items: HideoutItem[]; - timestamp: number; + Action: "HideoutUpgrade" + areaType: number + items: HideoutItem[] + timestamp: number } export interface HideoutItem { - count: number; - id: string; + count: number + id: string } diff --git a/project/src/models/eft/hideout/IQteData.ts b/project/src/models/eft/hideout/IQteData.ts index 4ce62fae..598791b3 100644 --- a/project/src/models/eft/hideout/IQteData.ts +++ b/project/src/models/eft/hideout/IQteData.ts @@ -1,146 +1,146 @@ import { Effect } from "@spt-aki/models/eft/health/Effect"; import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData"; -import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; -import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; -import { Traders } from "@spt-aki/models/enums/Traders"; import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType"; import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType"; import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType"; import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType"; import { QteType } from "@spt-aki/models/enums/hideout/QteType"; import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType"; +import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas"; +import { SkillTypes } from "@spt-aki/models/enums/SkillTypes"; +import { Traders } from "@spt-aki/models/enums/Traders"; export interface IQteData { - id: string; - type: QteActivityType; - area: HideoutAreas; - areaLevel: number; - quickTimeEvents: IQuickTimeEvent[]; + id: string + type: QteActivityType + area: HideoutAreas + areaLevel: number + quickTimeEvents: IQuickTimeEvent[] requirements: - ( - | IAreaRequirement - | IItemRequirement - | ITraderUnlockRequirement - | ITraderLoyaltyRequirement - | ISkillRequirement - | IResourceRequirement - | IToolRequirement - | IQuestRequirement - | IHealthRequirement - | IBodyPartBuffRequirement - )[]; - results: Record; + ( + | IAreaRequirement + | IItemRequirement + | ITraderUnlockRequirement + | ITraderLoyaltyRequirement + | ISkillRequirement + | IResourceRequirement + | IToolRequirement + | IQuestRequirement + | IHealthRequirement + | IBodyPartBuffRequirement + )[] + results: Record } export interface IQuickTimeEvent { - type: QteType; - position: { x: number; y: number; }; - startDelay: number; - endDelay: number; - speed: number; - successRange: { x: number; y: number; }; - key: string; + type: QteType + position: { x: number, y: number } + startDelay: number + endDelay: number + speed: number + successRange: { x: number, y: number } + key: string } export interface IQteRequirement { - type: RequirementType; + type: RequirementType } export interface IQteResult { - energy: number; - hydration: number; - rewardsRange: IQteEffect[]; + energy: number + hydration: number + rewardsRange: IQteEffect[] } export interface IQteEffect { - type: QteRewardType; - skillId: number; - levelMultipliers: ISkillLevelMultiplier[]; - time: number; - weight: number; - result: QteResultType; + type: QteRewardType + skillId: number + levelMultipliers: ISkillLevelMultiplier[] + time: number + weight: number + result: QteResultType } export interface ISkillLevelMultiplier { - level: number; - multiplier: number; + level: number + multiplier: number } export interface IAreaRequirement extends IQteRequirement { - type: RequirementType.AREA; - areaType: HideoutAreas; - requiredLevel: number; + type: RequirementType.AREA + areaType: HideoutAreas + requiredLevel: number } export interface ITraderUnlockRequirement extends IQteRequirement { - type: RequirementType.TRADER_UNLOCK; - traderId: Traders; + type: RequirementType.TRADER_UNLOCK + traderId: Traders } export interface ITraderLoyaltyRequirement extends IQteRequirement { - type: RequirementType.TRADER_LOYALTY; - traderId: Traders; - loyaltyLevel: number; + type: RequirementType.TRADER_LOYALTY + traderId: Traders + loyaltyLevel: number } export interface ISkillRequirement extends IQteRequirement { - type: RequirementType.SKILL; - skillName: SkillTypes; - skillLevel: number; + type: RequirementType.SKILL + skillName: SkillTypes + skillLevel: number } export interface IResourceRequirement extends IQteRequirement { - type: RequirementType.RESOURCE; - templateId: string; - resource: number; + type: RequirementType.RESOURCE + templateId: string + resource: number } export interface IItemRequirement extends IQteRequirement { - type: RequirementType.ITEM; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; + type: RequirementType.ITEM + templateId: string + count: number + isFunctional: boolean + isEncoded: boolean } export interface IToolRequirement extends IQteRequirement { - type: RequirementType.TOOL; - templateId: string; - count: number; - isFunctional: boolean; - isEncoded: boolean; + type: RequirementType.TOOL + templateId: string + count: number + isFunctional: boolean + isEncoded: boolean } export interface IQuestRequirement extends IQteRequirement { - type: RequirementType.QUEST_COMPLETE; - questId: string; + type: RequirementType.QUEST_COMPLETE + questId: string } export interface IHealthRequirement extends IQteRequirement { - type: RequirementType.HEALTH; - energy: number; - hydration: number; + type: RequirementType.HEALTH + energy: number + hydration: number } export interface IBodyPartBuffRequirement extends IQteRequirement { - type: RequirementType.BODY_PART_BUFF; - effectName: Effect; - bodyPart: BodyPart; - excluded: boolean; + type: RequirementType.BODY_PART_BUFF + effectName: Effect + bodyPart: BodyPart + excluded: boolean } diff --git a/project/src/models/eft/hideout/IRecordShootingRangePoints.ts b/project/src/models/eft/hideout/IRecordShootingRangePoints.ts index 9a872848..01d06b60 100644 --- a/project/src/models/eft/hideout/IRecordShootingRangePoints.ts +++ b/project/src/models/eft/hideout/IRecordShootingRangePoints.ts @@ -1,5 +1,5 @@ export interface IRecordShootingRangePoints { - Action: "RecordShootingRangePoints"; - points: number; + Action: "RecordShootingRangePoints" + points: number } diff --git a/project/src/models/eft/httpResponse/IGetBodyResponseData.ts b/project/src/models/eft/httpResponse/IGetBodyResponseData.ts index feff4081..9b380c88 100644 --- a/project/src/models/eft/httpResponse/IGetBodyResponseData.ts +++ b/project/src/models/eft/httpResponse/IGetBodyResponseData.ts @@ -1,6 +1,6 @@ export interface IGetBodyResponseData { - err: number; - errmsg: any; - (data: Type): Type; + err: number + errmsg: any + (data: Type): Type } diff --git a/project/src/models/eft/httpResponse/INullResponseData.ts b/project/src/models/eft/httpResponse/INullResponseData.ts index 72038291..5c778e0f 100644 --- a/project/src/models/eft/httpResponse/INullResponseData.ts +++ b/project/src/models/eft/httpResponse/INullResponseData.ts @@ -1,6 +1,6 @@ export interface INullResponseData { - err: number; - errmsg: any; - data: null; + err: number + errmsg: any + data: null } diff --git a/project/src/models/eft/inRaid/IInsuredItemsData.ts b/project/src/models/eft/inRaid/IInsuredItemsData.ts index 037c3308..25702cdd 100644 --- a/project/src/models/eft/inRaid/IInsuredItemsData.ts +++ b/project/src/models/eft/inRaid/IInsuredItemsData.ts @@ -1,7 +1,7 @@ export interface IInsuredItemsData { - id: string; - durability?: number; - maxDurability?: number; - hits?: number; + id: string + durability?: number + maxDurability?: number + hits?: number } diff --git a/project/src/models/eft/inRaid/IItemDeliveryRequestData.ts b/project/src/models/eft/inRaid/IItemDeliveryRequestData.ts index 3d5e6a28..07889c30 100644 --- a/project/src/models/eft/inRaid/IItemDeliveryRequestData.ts +++ b/project/src/models/eft/inRaid/IItemDeliveryRequestData.ts @@ -2,6 +2,6 @@ import { Item } from "../common/tables/IItem"; export interface IItemDeliveryRequestData { - items: Item[]; - traderId: string; + items: Item[] + traderId: string } diff --git a/project/src/models/eft/inRaid/IRegisterPlayerRequestData.ts b/project/src/models/eft/inRaid/IRegisterPlayerRequestData.ts index bec81afa..1daccfe7 100644 --- a/project/src/models/eft/inRaid/IRegisterPlayerRequestData.ts +++ b/project/src/models/eft/inRaid/IRegisterPlayerRequestData.ts @@ -1,6 +1,6 @@ export interface IRegisterPlayerRequestData { - crc: number; - locationId: string; - variantId: number; + crc: number + locationId: string + variantId: number } diff --git a/project/src/models/eft/inRaid/ISaveProgressRequestData.ts b/project/src/models/eft/inRaid/ISaveProgressRequestData.ts index cf9a8964..26b2b55b 100644 --- a/project/src/models/eft/inRaid/ISaveProgressRequestData.ts +++ b/project/src/models/eft/inRaid/ISaveProgressRequestData.ts @@ -5,9 +5,9 @@ import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState"; export interface ISaveProgressRequestData { - exit: PlayerRaidEndState; // survived" | "killed" | "left" | "runner" | "missinginaction - profile: IPostRaidPmcData; - isPlayerScav: boolean; - health: ISyncHealthRequestData; - insurance: IInsuredItemsData[]; + exit: PlayerRaidEndState // survived" | "killed" | "left" | "runner" | "missinginaction + profile: IPostRaidPmcData + isPlayerScav: boolean + health: ISyncHealthRequestData + insurance: IInsuredItemsData[] } diff --git a/project/src/models/eft/insurance/IGetInsuranceCostRequestData.ts b/project/src/models/eft/insurance/IGetInsuranceCostRequestData.ts index 99ee41a6..6a808c8e 100644 --- a/project/src/models/eft/insurance/IGetInsuranceCostRequestData.ts +++ b/project/src/models/eft/insurance/IGetInsuranceCostRequestData.ts @@ -1,5 +1,5 @@ export interface IGetInsuranceCostRequestData { - traders: string[]; - items: string[]; + traders: string[] + items: string[] } diff --git a/project/src/models/eft/insurance/IInsureRequestData.ts b/project/src/models/eft/insurance/IInsureRequestData.ts index 04b309bd..783cbf01 100644 --- a/project/src/models/eft/insurance/IInsureRequestData.ts +++ b/project/src/models/eft/insurance/IInsureRequestData.ts @@ -2,7 +2,7 @@ import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/ export interface IInsureRequestData extends IBaseInteractionRequestData { - Action: "Insure"; - tid: string; - items: string[]; + Action: "Insure" + tid: string + items: string[] } diff --git a/project/src/models/eft/inventory/IAddItemDirectRequest.ts b/project/src/models/eft/inventory/IAddItemDirectRequest.ts index fa20f9bd..75e5c9f7 100644 --- a/project/src/models/eft/inventory/IAddItemDirectRequest.ts +++ b/project/src/models/eft/inventory/IAddItemDirectRequest.ts @@ -3,8 +3,8 @@ import { Item } from "../common/tables/IItem"; export interface IAddItemDirectRequest { /** Item and child mods to add to player inventory */ - itemWithModsToAdd: Item[]; - foundInRaid: boolean; - callback: (buyCount: number) => void; - useSortingTable: boolean; + itemWithModsToAdd: Item[] + foundInRaid: boolean + callback: (buyCount: number) => void + useSortingTable: boolean } diff --git a/project/src/models/eft/inventory/IAddItemRequestData.ts b/project/src/models/eft/inventory/IAddItemRequestData.ts index c5462775..4652d1c3 100644 --- a/project/src/models/eft/inventory/IAddItemRequestData.ts +++ b/project/src/models/eft/inventory/IAddItemRequestData.ts @@ -1,13 +1,13 @@ export interface IAddItemRequestData { /** Trader id */ - tid: string; - items: AddItem[]; + tid: string + items: AddItem[] } export interface AddItem { - count: number; - sptIsPreset?: boolean; - item_id: string; + count: number + sptIsPreset?: boolean + item_id: string } diff --git a/project/src/models/eft/inventory/IAddItemTempObject.ts b/project/src/models/eft/inventory/IAddItemTempObject.ts index 762ca648..d271a3e2 100644 --- a/project/src/models/eft/inventory/IAddItemTempObject.ts +++ b/project/src/models/eft/inventory/IAddItemTempObject.ts @@ -2,10 +2,10 @@ import { Item, Location } from "@spt-aki/models/eft/common/tables/IItem"; export interface IAddItemTempObject { - itemRef: Item; - count: number; - isPreset: boolean; - location?: Location; + itemRef: Item + count: number + isPreset: boolean + location?: Location // Container item will be placed in - stash or sorting table - containerId?: string; + containerId?: string } diff --git a/project/src/models/eft/inventory/IAddItemsDirectRequest.ts b/project/src/models/eft/inventory/IAddItemsDirectRequest.ts index 72c9ef9b..6305b7dd 100644 --- a/project/src/models/eft/inventory/IAddItemsDirectRequest.ts +++ b/project/src/models/eft/inventory/IAddItemsDirectRequest.ts @@ -3,10 +3,10 @@ import { Item } from "../common/tables/IItem"; export interface IAddItemsDirectRequest { /** Item and child mods to add to player inventory */ - itemsWithModsToAdd: Item[][]; - foundInRaid: boolean; + itemsWithModsToAdd: Item[][] + foundInRaid: boolean /** Runs after EACH item with children is added */ - callback: (buyCount: number) => void; + callback: (buyCount: number) => void /** Should sorting table be used when no space found in stash */ - useSortingTable: boolean; + useSortingTable: boolean } diff --git a/project/src/models/eft/inventory/IInventoryAddRequestData.ts b/project/src/models/eft/inventory/IInventoryAddRequestData.ts index 9ca991a4..183721f9 100644 --- a/project/src/models/eft/inventory/IInventoryAddRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryAddRequestData.ts @@ -5,7 +5,7 @@ import { export interface IInventoryAddRequestData extends IInventoryBaseActionRequestData { - Action: "Add"; - item: string; - container: Container; + Action: "Add" + item: string + container: Container } diff --git a/project/src/models/eft/inventory/IInventoryBaseActionRequestData.ts b/project/src/models/eft/inventory/IInventoryBaseActionRequestData.ts index 08882a63..3b77d432 100644 --- a/project/src/models/eft/inventory/IInventoryBaseActionRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryBaseActionRequestData.ts @@ -6,33 +6,33 @@ export interface IInventoryBaseActionRequestData extends IBaseInteractionRequest export interface To { - id: string; - container: string; - location?: ToLocation | number; // Hack - isSearched?: boolean; + id: string + container: string + location?: ToLocation | number // Hack + isSearched?: boolean } export interface ToLocation { - x: number; - y: number; - r: string; - rotation?: string; - isSearched: boolean; + x: number + y: number + r: string + rotation?: string + isSearched: boolean } export interface Container { - id: string; - container: string; - location?: Location | number; // Hack - BSG data object shows it as Location only + id: string + container: string + location?: Location | number // Hack - BSG data object shows it as Location only } export interface Location { - x: number; - y: number; - r: string; - rotation?: string; - isSearched: boolean; + x: number + y: number + r: string + rotation?: string + isSearched: boolean } diff --git a/project/src/models/eft/inventory/IInventoryBindRequestData.ts b/project/src/models/eft/inventory/IInventoryBindRequestData.ts index 84beaaaf..8997d95a 100644 --- a/project/src/models/eft/inventory/IInventoryBindRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryBindRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryBindRequestData extends IInventoryBaseActionRequestData { - Action: "Bind"; - item: string; - index: number; + Action: "Bind" + item: string + index: number } diff --git a/project/src/models/eft/inventory/IInventoryCreateMarkerRequestData.ts b/project/src/models/eft/inventory/IInventoryCreateMarkerRequestData.ts index aa72e56b..3249e223 100644 --- a/project/src/models/eft/inventory/IInventoryCreateMarkerRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryCreateMarkerRequestData.ts @@ -2,15 +2,15 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryCreateMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "CreateMapMarker"; - item: string; - mapMarker: MapMarker; + Action: "CreateMapMarker" + item: string + mapMarker: MapMarker } export interface MapMarker { - Type: string; - X: number; - Y: number; - Note: string; + Type: string + X: number + Y: number + Note: string } diff --git a/project/src/models/eft/inventory/IInventoryDeleteMarkerRequestData.ts b/project/src/models/eft/inventory/IInventoryDeleteMarkerRequestData.ts index 676f0b53..7cf7096c 100644 --- a/project/src/models/eft/inventory/IInventoryDeleteMarkerRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryDeleteMarkerRequestData.ts @@ -2,8 +2,8 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryDeleteMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "DeleteMapMarker"; - item: string; - X: number; - Y: number; + Action: "DeleteMapMarker" + item: string + X: number + Y: number } diff --git a/project/src/models/eft/inventory/IInventoryEditMarkerRequestData.ts b/project/src/models/eft/inventory/IInventoryEditMarkerRequestData.ts index 033cc88a..11703df2 100644 --- a/project/src/models/eft/inventory/IInventoryEditMarkerRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryEditMarkerRequestData.ts @@ -2,17 +2,17 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryEditMarkerRequestData extends IInventoryBaseActionRequestData { - Action: "EditMapMarker"; - item: string; - X: number; - Y: number; - mapMarker: MapMarker; + Action: "EditMapMarker" + item: string + X: number + Y: number + mapMarker: MapMarker } export interface MapMarker { - Type: string; - X: number; - Y: number; - Note: string; + Type: string + X: number + Y: number + Note: string } diff --git a/project/src/models/eft/inventory/IInventoryExamineRequestData.ts b/project/src/models/eft/inventory/IInventoryExamineRequestData.ts index aac6e4bd..969aaa2b 100644 --- a/project/src/models/eft/inventory/IInventoryExamineRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryExamineRequestData.ts @@ -3,7 +3,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryExamineRequestData extends IInventoryBaseActionRequestData { - Action: "Examine"; - item: string; - fromOwner: OwnerInfo; + Action: "Examine" + item: string + fromOwner: OwnerInfo } diff --git a/project/src/models/eft/inventory/IInventoryFoldRequestData.ts b/project/src/models/eft/inventory/IInventoryFoldRequestData.ts index 971f630b..d01acf7a 100644 --- a/project/src/models/eft/inventory/IInventoryFoldRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryFoldRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryFoldRequestData extends IInventoryBaseActionRequestData { - Action: "Fold"; - item: string; - value: boolean; + Action: "Fold" + item: string + value: boolean } diff --git a/project/src/models/eft/inventory/IInventoryMergeRequestData.ts b/project/src/models/eft/inventory/IInventoryMergeRequestData.ts index 68626ceb..9985abaf 100644 --- a/project/src/models/eft/inventory/IInventoryMergeRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryMergeRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryMergeRequestData extends IInventoryBaseActionRequestData { - Action: "Merge"; - item: string; - with: string; + Action: "Merge" + item: string + with: string } diff --git a/project/src/models/eft/inventory/IInventoryMoveRequestData.ts b/project/src/models/eft/inventory/IInventoryMoveRequestData.ts index cbf83d68..f1f5d64a 100644 --- a/project/src/models/eft/inventory/IInventoryMoveRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryMoveRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/invento export interface IInventoryMoveRequestData extends IInventoryBaseActionRequestData { - Action: "Move"; - item: string; - to: To; + Action: "Move" + item: string + to: To } diff --git a/project/src/models/eft/inventory/IInventoryReadEncyclopediaRequestData.ts b/project/src/models/eft/inventory/IInventoryReadEncyclopediaRequestData.ts index eac2a581..6e44b694 100644 --- a/project/src/models/eft/inventory/IInventoryReadEncyclopediaRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryReadEncyclopediaRequestData.ts @@ -2,6 +2,6 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryReadEncyclopediaRequestData extends IInventoryBaseActionRequestData { - Action: "ReadEncyclopedia"; - ids: string[]; + Action: "ReadEncyclopedia" + ids: string[] } diff --git a/project/src/models/eft/inventory/IInventoryRemoveRequestData.ts b/project/src/models/eft/inventory/IInventoryRemoveRequestData.ts index 633734c8..920d2584 100644 --- a/project/src/models/eft/inventory/IInventoryRemoveRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryRemoveRequestData.ts @@ -2,6 +2,6 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryRemoveRequestData extends IInventoryBaseActionRequestData { - Action: "Remove"; - item: string; + Action: "Remove" + item: string } diff --git a/project/src/models/eft/inventory/IInventorySortRequestData.ts b/project/src/models/eft/inventory/IInventorySortRequestData.ts index e72d6439..5eca9b0e 100644 --- a/project/src/models/eft/inventory/IInventorySortRequestData.ts +++ b/project/src/models/eft/inventory/IInventorySortRequestData.ts @@ -3,24 +3,24 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventorySortRequestData extends IInventoryBaseActionRequestData { - Action: "ApplyInventoryChanges"; - changedItems: ChangedItem[]; + Action: "ApplyInventoryChanges" + changedItems: ChangedItem[] } export interface ChangedItem { - _id: string; - _tpl: string; - parentId: string; - slotId: string; - location: Location; - upd: Upd; + _id: string + _tpl: string + parentId: string + slotId: string + location: Location + upd: Upd } export interface Location { - x: number; - y: number; - r: string; - isSearched: boolean; + x: number + y: number + r: string + isSearched: boolean } diff --git a/project/src/models/eft/inventory/IInventorySplitRequestData.ts b/project/src/models/eft/inventory/IInventorySplitRequestData.ts index abb447f3..5a4aa06a 100644 --- a/project/src/models/eft/inventory/IInventorySplitRequestData.ts +++ b/project/src/models/eft/inventory/IInventorySplitRequestData.ts @@ -5,12 +5,12 @@ import { export interface IInventorySplitRequestData extends IInventoryBaseActionRequestData { - Action: "Split"; + Action: "Split" /** Id of item to split */ - splitItem: string; + splitItem: string /** Id of new item stack */ - newItem: string; + newItem: string /** Destination new item will be placed in */ - container: Container; - count: number; + container: Container + count: number } diff --git a/project/src/models/eft/inventory/IInventorySwapRequestData.ts b/project/src/models/eft/inventory/IInventorySwapRequestData.ts index 5d65f4d9..8021500b 100644 --- a/project/src/models/eft/inventory/IInventorySwapRequestData.ts +++ b/project/src/models/eft/inventory/IInventorySwapRequestData.ts @@ -3,11 +3,11 @@ import { IInventoryBaseActionRequestData, To } from "@spt-aki/models/eft/invento export interface IInventorySwapRequestData extends IInventoryBaseActionRequestData { - Action: "Swap"; - item: string; - to: To; - item2: string; - to2: To; - fromOwner2: OwnerInfo; - toOwner2: OwnerInfo; + Action: "Swap" + item: string + to: To + item2: string + to2: To + fromOwner2: OwnerInfo + toOwner2: OwnerInfo } diff --git a/project/src/models/eft/inventory/IInventoryTagRequestData.ts b/project/src/models/eft/inventory/IInventoryTagRequestData.ts index 4843764e..efc442d2 100644 --- a/project/src/models/eft/inventory/IInventoryTagRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryTagRequestData.ts @@ -2,8 +2,8 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryTagRequestData extends IInventoryBaseActionRequestData { - Action: "Tag"; - item: string; - TagName: string; - TagColor: number; + Action: "Tag" + item: string + TagName: string + TagColor: number } diff --git a/project/src/models/eft/inventory/IInventoryToggleRequestData.ts b/project/src/models/eft/inventory/IInventoryToggleRequestData.ts index 02e6c3c5..4c44db23 100644 --- a/project/src/models/eft/inventory/IInventoryToggleRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryToggleRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryToggleRequestData extends IInventoryBaseActionRequestData { - Action: "Toggle"; - item: string; - value: boolean; + Action: "Toggle" + item: string + value: boolean } diff --git a/project/src/models/eft/inventory/IInventoryTransferRequestData.ts b/project/src/models/eft/inventory/IInventoryTransferRequestData.ts index 0a286e67..2a78c892 100644 --- a/project/src/models/eft/inventory/IInventoryTransferRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryTransferRequestData.ts @@ -2,8 +2,8 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryTransferRequestData extends IInventoryBaseActionRequestData { - Action: "Transfer"; - item: string; - with: string; - count: number; + Action: "Transfer" + item: string + with: string + count: number } diff --git a/project/src/models/eft/inventory/IInventoryUnbindRequestData.ts b/project/src/models/eft/inventory/IInventoryUnbindRequestData.ts index 23c8a764..5058a827 100644 --- a/project/src/models/eft/inventory/IInventoryUnbindRequestData.ts +++ b/project/src/models/eft/inventory/IInventoryUnbindRequestData.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IInventoryUnbindRequestData extends IInventoryBaseActionRequestData { - Action: "Unbind"; - item: string; - index: number; + Action: "Unbind" + item: string + index: number } diff --git a/project/src/models/eft/inventory/IOpenRandomLootContainerRequestData.ts b/project/src/models/eft/inventory/IOpenRandomLootContainerRequestData.ts index f98ed623..49ad8841 100644 --- a/project/src/models/eft/inventory/IOpenRandomLootContainerRequestData.ts +++ b/project/src/models/eft/inventory/IOpenRandomLootContainerRequestData.ts @@ -2,14 +2,14 @@ import { IInventoryBaseActionRequestData } from "@spt-aki/models/eft/inventory/I export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActionRequestData { - Action: "OpenRandomLootContainer"; + Action: "OpenRandomLootContainer" /** Container item id being opened */ - item: string; - to: To[]; + item: string + to: To[] } export interface To { /** Player character (pmc/scav) id items will be sent to */ - id: string; + id: string } diff --git a/project/src/models/eft/inventory/IRedeemProfileRequestData.ts b/project/src/models/eft/inventory/IRedeemProfileRequestData.ts index 2ec054fb..f88bebdd 100644 --- a/project/src/models/eft/inventory/IRedeemProfileRequestData.ts +++ b/project/src/models/eft/inventory/IRedeemProfileRequestData.ts @@ -2,12 +2,12 @@ import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestDa export interface IRedeemProfileRequestData extends IInventoryBaseActionRequestData { - Action: "RedeemProfileReward"; - events: IRedeemProfileRequestEvent[]; + Action: "RedeemProfileReward" + events: IRedeemProfileRequestEvent[] } export interface IRedeemProfileRequestEvent { - MessageId: string; - EventId: string; + MessageId: string + EventId: string } diff --git a/project/src/models/eft/inventory/ISetFavoriteItems.ts b/project/src/models/eft/inventory/ISetFavoriteItems.ts index 0e47ccac..413087e7 100644 --- a/project/src/models/eft/inventory/ISetFavoriteItems.ts +++ b/project/src/models/eft/inventory/ISetFavoriteItems.ts @@ -2,7 +2,7 @@ import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestDa export interface ISetFavoriteItems extends IInventoryBaseActionRequestData { - Action: "SetFavoriteItems"; - items: any[]; - timestamp: number; + Action: "SetFavoriteItems" + items: any[] + timestamp: number } diff --git a/project/src/models/eft/itemEvent/IEmptyItemEventRouterResponse.ts b/project/src/models/eft/itemEvent/IEmptyItemEventRouterResponse.ts index 55746a71..74e48d8c 100644 --- a/project/src/models/eft/itemEvent/IEmptyItemEventRouterResponse.ts +++ b/project/src/models/eft/itemEvent/IEmptyItemEventRouterResponse.ts @@ -2,5 +2,5 @@ import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRo export interface IEmptyItemEventRouterResponse extends IItemEventRouterBase { - profileChanges: ""; + profileChanges: "" } diff --git a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts index 7760ebc2..140d927b 100644 --- a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts +++ b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts @@ -7,103 +7,103 @@ import { EquipmentBuildType } from "@spt-aki/models/enums/EquipmentBuildType"; export interface IItemEventRouterBase { - warnings: Warning[]; - profileChanges: TProfileChanges | ""; + warnings: Warning[] + profileChanges: TProfileChanges | "" } export type TProfileChanges = Record; export interface Warning { - index: number; - errmsg: string; - code?: string; - data?: any; + 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; + _id: string + experience: number + quests: IQuest[] + ragFairOffers: IRagfairOffer[] + weaponBuilds: IWeaponBuildChange[] + equipmentBuilds: IEquipmentBuildChange[] + items: ItemChanges + production: Record /** Hideout area improvement id */ - improvements: Record; - skills: Skills; - health: Health; - traderRelations: Record; - repeatableQuests?: IPmcDataRepeatableQuest[]; - recipeUnlocked: Record; - changedHideoutStashes?: Record; - questsStatus: IQuestStatus[]; + improvements: Record + skills: Skills + health: Health + traderRelations: Record + repeatableQuests?: IPmcDataRepeatableQuest[] + recipeUnlocked: Record + changedHideoutStashes?: Record + questsStatus: IQuestStatus[] } export interface IHideoutStashItem { - Id: string; - Tpl: string; + Id: string + Tpl: string } export interface IWeaponBuildChange { - id: string; - name: string; - root: string; - items: Item[]; + 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; + id: string + name: string + root: string + items: Item[] + type: string + fastpanel: any[] + buildType: EquipmentBuildType } export interface ItemChanges { - new: Product[]; - change: Product[]; - del: Product[]; // Only needs _id property + new: Product[] + change: Product[] + del: Product[] // Only needs _id property } export interface Improvement { - completed: boolean; - improveCompleteTimestamp: number; + completed: boolean + improveCompleteTimestamp: number } /** Related to TraderInfo */ export interface TraderData { - salesSum: number; - standing: number; - loyalty: number; - unlocked: boolean; - disabled: boolean; + salesSum: number + standing: number + loyalty: number + unlocked: boolean + disabled: boolean } export interface Product { - _id: string; - _tpl?: string; - parentId?: string; - slotId?: string; - location?: ItemChangeLocation; - upd?: Upd; + _id: string + _tpl?: string + parentId?: string + slotId?: string + location?: ItemChangeLocation + upd?: Upd } export interface ItemChangeLocation { - x: number; - y: number; - r: number; - isSearched?: boolean; + x: number + y: number + r: number + isSearched?: boolean } diff --git a/project/src/models/eft/itemEvent/IItemEventRouterRequest.ts b/project/src/models/eft/itemEvent/IItemEventRouterRequest.ts index 4fd8eb7b..f8b41398 100644 --- a/project/src/models/eft/itemEvent/IItemEventRouterRequest.ts +++ b/project/src/models/eft/itemEvent/IItemEventRouterRequest.ts @@ -1,28 +1,28 @@ export interface IItemEventRouterRequest { - data: Daum[]; - tm: number; - reload: number; + data: Daum[] + tm: number + reload: number } export interface Daum { - Action: string; - item: string; - to: To; + Action: string + item: string + to: To } export interface To { - id: string; - container: string; - location?: Location; + id: string + container: string + location?: Location } export interface Location { - x: number; - y: number; - r: string; - isSearched: boolean; + x: number + y: number + r: string + isSearched: boolean } diff --git a/project/src/models/eft/launcher/IChangeRequestData.ts b/project/src/models/eft/launcher/IChangeRequestData.ts index 6257e992..a402f777 100644 --- a/project/src/models/eft/launcher/IChangeRequestData.ts +++ b/project/src/models/eft/launcher/IChangeRequestData.ts @@ -2,5 +2,5 @@ import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestDat export interface IChangeRequestData extends ILoginRequestData { - change: string; + change: string } diff --git a/project/src/models/eft/launcher/IGetMiniProfileRequestData.ts b/project/src/models/eft/launcher/IGetMiniProfileRequestData.ts index 152ae360..6b6432df 100644 --- a/project/src/models/eft/launcher/IGetMiniProfileRequestData.ts +++ b/project/src/models/eft/launcher/IGetMiniProfileRequestData.ts @@ -1,5 +1,5 @@ export interface IGetMiniProfileRequestData { - username: string; - password: string; + username: string + password: string } diff --git a/project/src/models/eft/launcher/ILoginRequestData.ts b/project/src/models/eft/launcher/ILoginRequestData.ts index c124b8ae..1e819064 100644 --- a/project/src/models/eft/launcher/ILoginRequestData.ts +++ b/project/src/models/eft/launcher/ILoginRequestData.ts @@ -1,5 +1,5 @@ export interface ILoginRequestData { - username: string; - password: string; + username: string + password: string } diff --git a/project/src/models/eft/launcher/IMiniProfile.ts b/project/src/models/eft/launcher/IMiniProfile.ts index 41205298..83845ba6 100644 --- a/project/src/models/eft/launcher/IMiniProfile.ts +++ b/project/src/models/eft/launcher/IMiniProfile.ts @@ -1,17 +1,17 @@ export interface IMiniProfile { - username: string; - nickname: string; - side: string; - currlvl: number; - currexp: number; - prevexp: number; - nextlvl: number; - maxlvl: number; - akiData: AkiData; + username: string + nickname: string + side: string + currlvl: number + currexp: number + prevexp: number + nextlvl: number + maxlvl: number + akiData: AkiData } export interface AkiData { - version: string; + version: string } diff --git a/project/src/models/eft/launcher/IRegisterData.ts b/project/src/models/eft/launcher/IRegisterData.ts index c66e87f0..688ecdb1 100644 --- a/project/src/models/eft/launcher/IRegisterData.ts +++ b/project/src/models/eft/launcher/IRegisterData.ts @@ -2,5 +2,5 @@ import { ILoginRequestData } from "@spt-aki/models/eft/launcher/ILoginRequestDat export interface IRegisterData extends ILoginRequestData { - edition: string; + edition: string } diff --git a/project/src/models/eft/location/IAirdropLootResult.ts b/project/src/models/eft/location/IAirdropLootResult.ts index 78d03c7b..c039e910 100644 --- a/project/src/models/eft/location/IAirdropLootResult.ts +++ b/project/src/models/eft/location/IAirdropLootResult.ts @@ -2,6 +2,6 @@ import { LootItem } from "@spt-aki/models/spt/services/LootItem"; export interface IAirdropLootResult { - dropType: string; - loot: LootItem[]; + dropType: string + loot: LootItem[] } diff --git a/project/src/models/eft/location/IGetLocationRequestData.ts b/project/src/models/eft/location/IGetLocationRequestData.ts index c56dea96..0eed8c0f 100644 --- a/project/src/models/eft/location/IGetLocationRequestData.ts +++ b/project/src/models/eft/location/IGetLocationRequestData.ts @@ -1,6 +1,6 @@ export interface IGetLocationRequestData { - crc: number; - locationId: string; - variantId: number; + crc: number + locationId: string + variantId: number } diff --git a/project/src/models/eft/match/IAcceptGroupInviteRequest.ts b/project/src/models/eft/match/IAcceptGroupInviteRequest.ts index eb670d39..63f2aadb 100644 --- a/project/src/models/eft/match/IAcceptGroupInviteRequest.ts +++ b/project/src/models/eft/match/IAcceptGroupInviteRequest.ts @@ -1,4 +1,4 @@ export interface IAcceptGroupInviteRequest { - requestId: string; + requestId: string } diff --git a/project/src/models/eft/match/IAcceptGroupInviteResponse.ts b/project/src/models/eft/match/IAcceptGroupInviteResponse.ts index d525c761..cf650480 100644 --- a/project/src/models/eft/match/IAcceptGroupInviteResponse.ts +++ b/project/src/models/eft/match/IAcceptGroupInviteResponse.ts @@ -1,19 +1,19 @@ export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; + _id: string + aid: number + Info: PlayerInviteInfo + isLeader: boolean + isReady: boolean } export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; + Nickname: string + Side: string + Level: number + MemberCategory: number + GameVersion: string + SavageLockTime: number + SavageNickname: string } diff --git a/project/src/models/eft/match/ICancelGroupInviteRequest.ts b/project/src/models/eft/match/ICancelGroupInviteRequest.ts index d2adf46d..253d4a94 100644 --- a/project/src/models/eft/match/ICancelGroupInviteRequest.ts +++ b/project/src/models/eft/match/ICancelGroupInviteRequest.ts @@ -1,4 +1,4 @@ export interface ICancelGroupInviteRequest { - requestId: string; + requestId: string } diff --git a/project/src/models/eft/match/ICreateGroupRequestData.ts b/project/src/models/eft/match/ICreateGroupRequestData.ts index dd99d1aa..e742335f 100644 --- a/project/src/models/eft/match/ICreateGroupRequestData.ts +++ b/project/src/models/eft/match/ICreateGroupRequestData.ts @@ -2,7 +2,7 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; + location: string + raidMode: RaidMode + startInGroup: boolean } diff --git a/project/src/models/eft/match/IEndOfflineRaidRequestData.ts b/project/src/models/eft/match/IEndOfflineRaidRequestData.ts index 49e0a710..62294f13 100644 --- a/project/src/models/eft/match/IEndOfflineRaidRequestData.ts +++ b/project/src/models/eft/match/IEndOfflineRaidRequestData.ts @@ -1,7 +1,7 @@ export interface IEndOfflineRaidRequestData { - crc: number; - exitStatus: string; - exitName: string; - raidSeconds: number; + crc: number + exitStatus: string + exitName: string + raidSeconds: number } diff --git a/project/src/models/eft/match/IGetGroupStatusRequestData.ts b/project/src/models/eft/match/IGetGroupStatusRequestData.ts index b657a426..d1488a40 100644 --- a/project/src/models/eft/match/IGetGroupStatusRequestData.ts +++ b/project/src/models/eft/match/IGetGroupStatusRequestData.ts @@ -2,10 +2,10 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; + location: string + savage: boolean + dt: string + keyId: string + raidMode: RaidMode + spawnPlace: string } diff --git a/project/src/models/eft/match/IGetGroupStatusResponse.ts b/project/src/models/eft/match/IGetGroupStatusResponse.ts index 1fa1a680..fed1ccdc 100644 --- a/project/src/models/eft/match/IGetGroupStatusResponse.ts +++ b/project/src/models/eft/match/IGetGroupStatusResponse.ts @@ -2,24 +2,24 @@ import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; + players: IPlayer[] + maxPveCountExceeded: boolean } export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; + aid: string + _id: string + lookingGroup: boolean + IsLeader: boolean + IsReady: boolean + Info: ICurrentGroupMemberInfo } export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; + Nickname: string + Side: string + Level: string + MemberCategory: MemberCategory } diff --git a/project/src/models/eft/match/IGetProfileRequestData.ts b/project/src/models/eft/match/IGetProfileRequestData.ts index cb530bca..6be9dc34 100644 --- a/project/src/models/eft/match/IGetProfileRequestData.ts +++ b/project/src/models/eft/match/IGetProfileRequestData.ts @@ -1,4 +1,4 @@ export interface IGetProfileRequestData { - profileId: string; + profileId: string } diff --git a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts index 53305c84..2548f84e 100644 --- a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts +++ b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts @@ -1,17 +1,17 @@ export interface IGetRaidConfigurationRequestData { - keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; - CanShowGroupPreview: boolean; - MaxGroupCount: number; + keyId: string + side: string + location: string + timeVariant: string + raidMode: string + metabolismDisabled: boolean + playersSpawnPlace: string + timeAndWeatherSettings: TimeAndWeatherSettings + botSettings: BotSettings + wavesSettings: WavesSettings + CanShowGroupPreview: boolean + MaxGroupCount: number } // { @@ -46,26 +46,26 @@ export interface IGetRaidConfigurationRequestData export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; + isRandomTime: boolean + isRandomWeather: boolean + cloudinessType: string + rainType: string + windType: string + fogType: string + timeFlowType: string + hourOfDay: number } export interface BotSettings { - isScavWars: boolean; - botAmount: string; + isScavWars: boolean + botAmount: string } export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; + botAmount: string + botDifficulty: string + isBosses: boolean + isTaggedAndCursed: boolean } diff --git a/project/src/models/eft/match/IJoinMatchRequestData.ts b/project/src/models/eft/match/IJoinMatchRequestData.ts index 4ec07d3f..7ce7ed73 100644 --- a/project/src/models/eft/match/IJoinMatchRequestData.ts +++ b/project/src/models/eft/match/IJoinMatchRequestData.ts @@ -1,12 +1,12 @@ export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; + groupid: string + servers: Server[] } export interface Server { - ping: number; - ip: string; - port: string; + ping: number + ip: string + port: string } diff --git a/project/src/models/eft/match/IJoinMatchResult.ts b/project/src/models/eft/match/IJoinMatchResult.ts index 27188f81..da9f4025 100644 --- a/project/src/models/eft/match/IJoinMatchResult.ts +++ b/project/src/models/eft/match/IJoinMatchResult.ts @@ -1,21 +1,21 @@ export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; + maxPveCountExceeded: boolean + profiles: IJoinMatchPlayerProfile[] } export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; + profileid: string + profileToken: string + status: string + sid: string + ip: string + port: number + version: string + location: string + raidMode: string + mode: string + shortid: string + additional_info: any[] } diff --git a/project/src/models/eft/match/IPutMetricsRequestData.ts b/project/src/models/eft/match/IPutMetricsRequestData.ts index 0fb57f0d..198b256d 100644 --- a/project/src/models/eft/match/IPutMetricsRequestData.ts +++ b/project/src/models/eft/match/IPutMetricsRequestData.ts @@ -1,11 +1,11 @@ export interface IPutMetricsRequestData { - sid: string; - settings: any; - SharedSettings: any; - HardwareDescription: any; - Location: string; - Metrics: any; - ClientEvents: any; - SpikeSamples: any[]; + sid: string + settings: any + SharedSettings: any + HardwareDescription: any + Location: string + Metrics: any + ClientEvents: any + SpikeSamples: any[] } diff --git a/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts b/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts index 6dcb7103..60219e63 100644 --- a/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts +++ b/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts @@ -1,4 +1,4 @@ export interface IRemovePlayerFromGroupRequest { - aidToKick: string; + aidToKick: string } diff --git a/project/src/models/eft/match/ISendGroupInviteRequest.ts b/project/src/models/eft/match/ISendGroupInviteRequest.ts index 50e016ab..40d1a551 100644 --- a/project/src/models/eft/match/ISendGroupInviteRequest.ts +++ b/project/src/models/eft/match/ISendGroupInviteRequest.ts @@ -1,5 +1,5 @@ export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; + to: string + inLobby: boolean } diff --git a/project/src/models/eft/match/ITransferGroupRequest.ts b/project/src/models/eft/match/ITransferGroupRequest.ts index ad725553..ddce126a 100644 --- a/project/src/models/eft/match/ITransferGroupRequest.ts +++ b/project/src/models/eft/match/ITransferGroupRequest.ts @@ -1,4 +1,4 @@ export interface ITransferGroupRequest { - aidToChange: string; + aidToChange: string } diff --git a/project/src/models/eft/match/IUpdatePingRequestData.ts b/project/src/models/eft/match/IUpdatePingRequestData.ts index 22ce549e..9a0c90bf 100644 --- a/project/src/models/eft/match/IUpdatePingRequestData.ts +++ b/project/src/models/eft/match/IUpdatePingRequestData.ts @@ -1,4 +1,4 @@ export interface IUpdatePingRequestData { - servers: any[]; + servers: any[] } diff --git a/project/src/models/eft/notes/INoteActionData.ts b/project/src/models/eft/notes/INoteActionData.ts index d2e71b0b..c9fb1ce5 100644 --- a/project/src/models/eft/notes/INoteActionData.ts +++ b/project/src/models/eft/notes/INoteActionData.ts @@ -2,13 +2,13 @@ import { IBaseInteractionRequestData } from "@spt-aki/models/eft/common/request/ export interface INoteActionData extends IBaseInteractionRequestData { - Action: string; - index: number; - note: INote; + Action: string + index: number + note: INote } export interface INote { - Time: number; - Text: string; + Time: number + Text: string } diff --git a/project/src/models/eft/notifier/INotifier.ts b/project/src/models/eft/notifier/INotifier.ts index 68923292..7d66ff95 100644 --- a/project/src/models/eft/notifier/INotifier.ts +++ b/project/src/models/eft/notifier/INotifier.ts @@ -2,19 +2,19 @@ import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { - server: string; - channel_id: string; - url: string; - notifierServer: string; - ws: string; + server: string + channel_id: string + url: string + notifierServer: string + ws: string } export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; + type: NotificationType + eventId: string + dialogId?: string + message?: Message } export enum NotificationType diff --git a/project/src/models/eft/notifier/ISelectProfileRequestData.ts b/project/src/models/eft/notifier/ISelectProfileRequestData.ts deleted file mode 100644 index d5d8b98b..00000000 --- a/project/src/models/eft/notifier/ISelectProfileRequestData.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISelectProfileRequestData -{ - uid: string; -} diff --git a/project/src/models/eft/notifier/ISelectProfileResponse.ts b/project/src/models/eft/notifier/ISelectProfileResponse.ts index ae14c2c8..b2f8f74a 100644 --- a/project/src/models/eft/notifier/ISelectProfileResponse.ts +++ b/project/src/models/eft/notifier/ISelectProfileResponse.ts @@ -1,4 +1,4 @@ export interface ISelectProfileResponse { - status: string; + status: string } diff --git a/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts b/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts index 90b8dd56..bb876b3f 100644 --- a/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts +++ b/project/src/models/eft/player/IPlayerIncrementSkillLevelRequestData.ts @@ -2,22 +2,22 @@ import { Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; export interface IPlayerIncrementSkillLevelRequestData { - _id: string; - experience: number; - quests: any[]; - ragFairOffers: any[]; - builds: any[]; - items: Items; - production: Production; - skills: Skills; - traderRelations: TraderRelations; + _id: string + experience: number + quests: any[] + ragFairOffers: any[] + builds: any[] + items: Items + production: Production + skills: Skills + traderRelations: TraderRelations } export interface Items { - new: any[]; - change: any[]; - del: any[]; + new: any[] + change: any[] + del: any[] } export interface Production diff --git a/project/src/models/eft/presetBuild/IPresetBuildActionRequestData.ts b/project/src/models/eft/presetBuild/IPresetBuildActionRequestData.ts index 75d039b8..4f10e239 100644 --- a/project/src/models/eft/presetBuild/IPresetBuildActionRequestData.ts +++ b/project/src/models/eft/presetBuild/IPresetBuildActionRequestData.ts @@ -2,10 +2,10 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IPresetBuildActionRequestData { - Action: string; - Id: string; + Action: string + Id: string /** name of preset given by player */ - Name: string; - Root: string; - Items: Item[]; + Name: string + Root: string + Items: Item[] } diff --git a/project/src/models/eft/presetBuild/IRemoveBuildRequestData.ts b/project/src/models/eft/presetBuild/IRemoveBuildRequestData.ts index dd9cf749..2014ed6e 100644 --- a/project/src/models/eft/presetBuild/IRemoveBuildRequestData.ts +++ b/project/src/models/eft/presetBuild/IRemoveBuildRequestData.ts @@ -1,4 +1,4 @@ export interface IRemoveBuildRequestData { - id: string; + id: string } diff --git a/project/src/models/eft/profile/GetProfileStatusResponseData.ts b/project/src/models/eft/profile/GetProfileStatusResponseData.ts index 9998aafe..f70e6dcb 100644 --- a/project/src/models/eft/profile/GetProfileStatusResponseData.ts +++ b/project/src/models/eft/profile/GetProfileStatusResponseData.ts @@ -1,21 +1,21 @@ export interface GetProfileStatusResponseData { - maxPveCountExceeded: false; - profiles: ProfileData[]; + maxPveCountExceeded: false + profiles: ProfileData[] } export interface ProfileData { - profileid: string; - profileToken: string; - status: string; - ip: string; - port: number; - sid: string; - version?: string; - location?: string; - raidMode?: string; - mode?: string; - shortId?: string; - additional_info?: any[]; + profileid: string + profileToken: string + status: string + ip: string + port: number + sid: string + version?: string + location?: string + raidMode?: string + mode?: string + shortId?: string + additional_info?: any[] } diff --git a/project/src/models/eft/profile/IAkiProfile.ts b/project/src/models/eft/profile/IAkiProfile.ts index 5e906bc4..12b17380 100644 --- a/project/src/models/eft/profile/IAkiProfile.ts +++ b/project/src/models/eft/profile/IAkiProfile.ts @@ -7,20 +7,20 @@ import { IProfileChangeEvent } from "@spt-aki/models/spt/dialog/ISendMessageDeta export interface IAkiProfile { - info: Info; - characters: Characters; + info: Info + characters: Characters /** Clothing purchases */ - suits: string[]; - userbuilds: IUserBuilds; - dialogues: Record; - aki: Aki; - vitality: Vitality; - inraid: Inraid; - insurance: Insurance[]; + suits: string[] + userbuilds: IUserBuilds + dialogues: Record + aki: Aki + vitality: Vitality + inraid: Inraid + insurance: Insurance[] /** Assort purchases made by player since last trader refresh */ - traderPurchases?: Record>; + traderPurchases?: Record> /** Achievements earned by player */ - achievements: Record; + achievements: Record } export class TraderPurchaseData @@ -32,220 +32,220 @@ export class TraderPurchaseData export interface Info { /** main profile id */ - id: string; - scavId: string; - aid: number; - username: string; - password: string; - wipe: boolean; - edition: string; + id: string + scavId: string + aid: number + username: string + password: string + wipe: boolean + edition: string } export interface Characters { - pmc: IPmcData; - scav: IPmcData; + pmc: IPmcData + scav: IPmcData } /** used by profile.userbuilds */ export interface IUserBuilds { - weaponBuilds: IWeaponBuild[]; - equipmentBuilds: IEquipmentBuild[]; - magazineBuilds: IMagazineBuild[]; + weaponBuilds: IWeaponBuild[] + equipmentBuilds: IEquipmentBuild[] + magazineBuilds: IMagazineBuild[] } export interface IUserBuild { - Id: string; - Name: string; + Id: string + Name: string } export interface IWeaponBuild extends IUserBuild { - Root: string; - Items: Item[]; // Same as PMC inventory items + Root: string + Items: Item[] // Same as PMC inventory items } export interface IEquipmentBuild extends IUserBuild { - Root: string; - Items: Item[]; // Same as PMC inventory items - BuildType: EquipmentBuildType; + Root: string + Items: Item[] // Same as PMC inventory items + BuildType: EquipmentBuildType } export interface IMagazineBuild extends IUserBuild { - Caliber: string; - TopCount: number; - BottomCount: number; - Items: IMagazineTemplateAmmoItem[]; + Caliber: string + TopCount: number + BottomCount: number + Items: IMagazineTemplateAmmoItem[] } export interface IMagazineTemplateAmmoItem { - TemplateId: string; - Count: number; + TemplateId: string + Count: number } /** Used by defaultEquipmentPresets.json */ export interface IDefaultEquipmentPreset extends IUserBuild { - Items: Item[]; - Root: string; - BuildType: EquipmentBuildType; - type: string; + Items: Item[] + Root: string + BuildType: EquipmentBuildType + type: string } export interface Dialogue { - attachmentsNew: number; - new: number; - type: MessageType; - Users?: IUserDialogInfo[]; - pinned: boolean; - messages: Message[]; - _id: string; + attachmentsNew: number + new: number + type: MessageType + Users?: IUserDialogInfo[] + pinned: boolean + messages: Message[] + _id: string } export interface IUserDialogInfo { - _id: string; - aid: number; - Info: IUserDialogDetails; + _id: string + aid: number + Info: IUserDialogDetails } export interface IUserDialogDetails { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; + Nickname: string + Side: string + Level: number + MemberCategory: MemberCategory } // @Cleanup: Maybe the same as Dialogue? export interface DialogueInfo { - attachmentsNew: number; - new: number; - _id: string; - type: MessageType; - pinned: boolean; - Users?: IUserDialogInfo[]; - message: MessagePreview; + attachmentsNew: number + new: number + _id: string + type: MessageType + pinned: boolean + Users?: IUserDialogInfo[] + message: MessagePreview } export interface Message { - _id: string; - uid: string; - type: MessageType; - dt: number; - UtcDateTime?: number; - Member?: IUpdatableChatMember; - templateId?: string; - text?: string; - hasRewards?: boolean; - rewardCollected: boolean; - items?: MessageItems; - maxStorageTime?: number; - systemData?: ISystemData; - profileChangeEvents?: IProfileChangeEvent[]; + _id: string + uid: string + type: MessageType + dt: number + UtcDateTime?: number + Member?: IUpdatableChatMember + templateId?: string + text?: string + hasRewards?: boolean + rewardCollected: boolean + items?: MessageItems + maxStorageTime?: number + systemData?: ISystemData + profileChangeEvents?: IProfileChangeEvent[] } export interface MessagePreview { - uid: string; - type: MessageType; - dt: number; - templateId: string; - text?: string; - systemData?: ISystemData; + uid: string + type: MessageType + dt: number + templateId: string + text?: string + systemData?: ISystemData } export interface MessageItems { - stash?: string; - data?: Item[]; + stash?: string + data?: Item[] } export interface ISystemData { - date?: string; - time?: string; - location?: string; - buyerNickname?: string; - soldItem?: string; - itemCount?: number; + date?: string + time?: string + location?: string + buyerNickname?: string + soldItem?: string + itemCount?: number } export interface IUpdatableChatMember { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; - Ignored: boolean; - Banned: boolean; + Nickname: string + Side: string + Level: number + MemberCategory: MemberCategory + Ignored: boolean + Banned: boolean } export interface DateTime { - date: string; - time: string; + date: string + time: string } export interface Aki { - version: string; - mods?: ModDetails[]; - receivedGifts: ReceivedGift[]; + version: string + mods?: ModDetails[] + receivedGifts: ReceivedGift[] } export interface ModDetails { - name: string; - version: string; - author: string; - dateAdded: number; - url: string; + name: string + version: string + author: string + dateAdded: number + url: string } export interface ReceivedGift { - giftId: string; - timestampAccepted: number; + giftId: string + timestampAccepted: number } export interface Vitality { - health: Health; - effects: Effects; + health: Health + effects: Effects } export interface Health { - Hydration: number; - Energy: number; - Temperature: number; - Head: number; - Chest: number; - Stomach: number; - LeftArm: number; - RightArm: number; - LeftLeg: number; - RightLeg: number; + Hydration: number + Energy: number + Temperature: number + Head: number + Chest: number + Stomach: number + LeftArm: number + RightArm: number + LeftLeg: number + RightLeg: number } export interface Effects { - Head: Head; - Chest: Chest; - Stomach: Stomach; - LeftArm: LeftArm; - RightArm: RightArm; - LeftLeg: LeftLeg; - RightLeg: RightLeg; + Head: Head + Chest: Chest + Stomach: Stomach + LeftArm: LeftArm + RightArm: RightArm + LeftLeg: LeftLeg + RightLeg: RightLeg } export interface Head @@ -259,44 +259,44 @@ export interface Stomach export interface LeftArm { - Fracture?: number; + Fracture?: number } export interface RightArm { - Fracture?: number; + Fracture?: number } export interface LeftLeg { - Fracture?: number; + Fracture?: number } export interface RightLeg { - Fracture?: number; + Fracture?: number } export interface Inraid { - location: string; - character: string; + location: string + character: string } export interface Insurance { - scheduledTime: number; - traderId: string; - maxStorageTime: number; - systemData: ISystemData; - messageType: MessageType; - messageTemplateId: string; - items: Item[]; + scheduledTime: number + traderId: string + maxStorageTime: number + systemData: ISystemData + messageType: MessageType + messageTemplateId: string + items: Item[] } export interface MessageContentRagfair { - offerId: string; - count: number; - handbookId: string; + offerId: string + count: number + handbookId: string } diff --git a/project/src/models/eft/profile/ICompletedAchievementsResponse.ts b/project/src/models/eft/profile/ICompletedAchievementsResponse.ts index 323522f6..89e8904b 100644 --- a/project/src/models/eft/profile/ICompletedAchievementsResponse.ts +++ b/project/src/models/eft/profile/ICompletedAchievementsResponse.ts @@ -1,4 +1,4 @@ export interface ICompletedAchievementsResponse { - elements: Record; + elements: Record } diff --git a/project/src/models/eft/profile/IConnectResponse.ts b/project/src/models/eft/profile/IConnectResponse.ts index 54a561ac..005c5d62 100644 --- a/project/src/models/eft/profile/IConnectResponse.ts +++ b/project/src/models/eft/profile/IConnectResponse.ts @@ -1,7 +1,7 @@ export interface IConnectResponse { - backendUrl: string; - name: string; - editions: string[]; - profileDescriptions: Record; + backendUrl: string + name: string + editions: string[] + profileDescriptions: Record } diff --git a/project/src/models/eft/profile/ICreateProfileResponse.ts b/project/src/models/eft/profile/ICreateProfileResponse.ts index 05fa0542..decb6bb6 100644 --- a/project/src/models/eft/profile/ICreateProfileResponse.ts +++ b/project/src/models/eft/profile/ICreateProfileResponse.ts @@ -1,4 +1,4 @@ export interface ICreateProfileResponse { - uid: string; + uid: string } diff --git a/project/src/models/eft/profile/IGetAchievementsResponse.ts b/project/src/models/eft/profile/IGetAchievementsResponse.ts index ee1d1fd8..c15487c5 100644 --- a/project/src/models/eft/profile/IGetAchievementsResponse.ts +++ b/project/src/models/eft/profile/IGetAchievementsResponse.ts @@ -2,5 +2,5 @@ import { IAchievement } from "../common/tables/IAchievement"; export interface IGetAchievementsResponse { - elements: IAchievement[]; + elements: IAchievement[] } diff --git a/project/src/models/eft/profile/IGetOtherProfileRequest.ts b/project/src/models/eft/profile/IGetOtherProfileRequest.ts index d93b7145..6fd60cb3 100644 --- a/project/src/models/eft/profile/IGetOtherProfileRequest.ts +++ b/project/src/models/eft/profile/IGetOtherProfileRequest.ts @@ -1,4 +1,4 @@ export interface IGetOtherProfileRequest { - accountId: string; + accountId: string } diff --git a/project/src/models/eft/profile/IGetOtherProfileResponse.ts b/project/src/models/eft/profile/IGetOtherProfileResponse.ts index 50d7c975..3e737116 100644 --- a/project/src/models/eft/profile/IGetOtherProfileResponse.ts +++ b/project/src/models/eft/profile/IGetOtherProfileResponse.ts @@ -3,50 +3,50 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IGetOtherProfileResponse { - id: string; - aid: number; - info: IOtherProfileInfo; - customization: IOtherProfileCustomization; - skills: Skills; - equipment: IOtherProfileEquipment; - achievements: Record; - favoriteItems: string[]; - pmcStats: IOtherProfileStats; - scavStats: IOtherProfileStats; + id: string + aid: number + info: IOtherProfileInfo + customization: IOtherProfileCustomization + skills: Skills + equipment: IOtherProfileEquipment + achievements: Record + favoriteItems: string[] + pmcStats: IOtherProfileStats + scavStats: IOtherProfileStats } export interface IOtherProfileInfo { - nickname: string; - side: string; - experience: number; - memberCategory: number; - bannedState: boolean; - bannedUntil: number; - registrationDate: number; + nickname: string + side: string + experience: number + memberCategory: number + bannedState: boolean + bannedUntil: number + registrationDate: number } export interface IOtherProfileCustomization { - head: string; - body: string; - feet: string; - hands: string; + head: string + body: string + feet: string + hands: string } export interface IOtherProfileEquipment { - Id: string; - Items: Item[]; + Id: string + Items: Item[] } export interface IOtherProfileStats { - eft: IOtherProfileSubStats; + eft: IOtherProfileSubStats } export interface IOtherProfileSubStats { - totalInGameTime: number; - overAllCounters: OverallCounters; + totalInGameTime: number + overAllCounters: OverallCounters } diff --git a/project/src/models/eft/profile/IGetProfileSettingsRequest.ts b/project/src/models/eft/profile/IGetProfileSettingsRequest.ts index 0743d19b..b029776d 100644 --- a/project/src/models/eft/profile/IGetProfileSettingsRequest.ts +++ b/project/src/models/eft/profile/IGetProfileSettingsRequest.ts @@ -1,4 +1,4 @@ export interface IGetProfileSettingsRequest { - squadInviteRestriction: boolean; + squadInviteRestriction: boolean } diff --git a/project/src/models/eft/profile/IProfileChangeNicknameRequestData.ts b/project/src/models/eft/profile/IProfileChangeNicknameRequestData.ts index 4538e42f..58a278e7 100644 --- a/project/src/models/eft/profile/IProfileChangeNicknameRequestData.ts +++ b/project/src/models/eft/profile/IProfileChangeNicknameRequestData.ts @@ -1,4 +1,4 @@ export interface IProfileChangeNicknameRequestData { - nickname: string; + nickname: string } diff --git a/project/src/models/eft/profile/IProfileChangeVoiceRequestData.ts b/project/src/models/eft/profile/IProfileChangeVoiceRequestData.ts index b3654893..6a44bceb 100644 --- a/project/src/models/eft/profile/IProfileChangeVoiceRequestData.ts +++ b/project/src/models/eft/profile/IProfileChangeVoiceRequestData.ts @@ -1,4 +1,4 @@ export interface IProfileChangeVoiceRequestData { - voice: string; + voice: string } diff --git a/project/src/models/eft/profile/IProfileCreateRequestData.ts b/project/src/models/eft/profile/IProfileCreateRequestData.ts index 1c9a266b..c437d7f7 100644 --- a/project/src/models/eft/profile/IProfileCreateRequestData.ts +++ b/project/src/models/eft/profile/IProfileCreateRequestData.ts @@ -1,7 +1,7 @@ export interface IProfileCreateRequestData { - side: string; - nickname: string; - headId: string; - voiceId: string; + side: string + nickname: string + headId: string + voiceId: string } diff --git a/project/src/models/eft/profile/ISearchFriendRequestData.ts b/project/src/models/eft/profile/ISearchFriendRequestData.ts index 95e12c4b..cc7848b1 100644 --- a/project/src/models/eft/profile/ISearchFriendRequestData.ts +++ b/project/src/models/eft/profile/ISearchFriendRequestData.ts @@ -1,4 +1,4 @@ export interface ISearchFriendRequestData { - nickname: string; + nickname: string } diff --git a/project/src/models/eft/profile/ISearchFriendResponse.ts b/project/src/models/eft/profile/ISearchFriendResponse.ts index a345c280..f49d28eb 100644 --- a/project/src/models/eft/profile/ISearchFriendResponse.ts +++ b/project/src/models/eft/profile/ISearchFriendResponse.ts @@ -1,14 +1,14 @@ export interface ISearchFriendResponse { - _id: string; - aid: number; - Info: Info; + _id: string + aid: number + Info: Info } export interface Info { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; + Nickname: string + Side: string + Level: number + MemberCategory: number } diff --git a/project/src/models/eft/profile/IValidateNicknameRequestData.ts b/project/src/models/eft/profile/IValidateNicknameRequestData.ts index 9807d254..f580a63a 100644 --- a/project/src/models/eft/profile/IValidateNicknameRequestData.ts +++ b/project/src/models/eft/profile/IValidateNicknameRequestData.ts @@ -1,4 +1,4 @@ export interface IValidateNicknameRequestData { - nickname: string; + nickname: string } diff --git a/project/src/models/eft/quests/IAcceptQuestRequestData.ts b/project/src/models/eft/quests/IAcceptQuestRequestData.ts index 327c52ca..23606ba1 100644 --- a/project/src/models/eft/quests/IAcceptQuestRequestData.ts +++ b/project/src/models/eft/quests/IAcceptQuestRequestData.ts @@ -1,6 +1,6 @@ export interface IAcceptQuestRequestData { - Action: "QuestAccept"; - qid: string; - type: string; + Action: "QuestAccept" + qid: string + type: string } diff --git a/project/src/models/eft/quests/ICompleteQuestRequestData.ts b/project/src/models/eft/quests/ICompleteQuestRequestData.ts index 9886c81e..75f38885 100644 --- a/project/src/models/eft/quests/ICompleteQuestRequestData.ts +++ b/project/src/models/eft/quests/ICompleteQuestRequestData.ts @@ -1,8 +1,8 @@ export interface ICompleteQuestRequestData { - Action: string; + Action: string /** Quest Id */ - qid: string; - removeExcessItems: boolean; + qid: string + removeExcessItems: boolean } diff --git a/project/src/models/eft/quests/IFailQuestRequestData.ts b/project/src/models/eft/quests/IFailQuestRequestData.ts index 748812cd..22fd94fd 100644 --- a/project/src/models/eft/quests/IFailQuestRequestData.ts +++ b/project/src/models/eft/quests/IFailQuestRequestData.ts @@ -1,6 +1,6 @@ export interface IFailQuestRequestData { - Action: "QuestFail"; - qid: string; - removeExcessItems: boolean; + Action: "QuestFail" + qid: string + removeExcessItems: boolean } diff --git a/project/src/models/eft/quests/IHandoverQuestRequestData.ts b/project/src/models/eft/quests/IHandoverQuestRequestData.ts index 4543cd37..42f97791 100644 --- a/project/src/models/eft/quests/IHandoverQuestRequestData.ts +++ b/project/src/models/eft/quests/IHandoverQuestRequestData.ts @@ -1,13 +1,13 @@ export interface IHandoverQuestRequestData { - Action: "QuestHandover"; - qid: string; - conditionId: string; - items: Item[]; + Action: "QuestHandover" + qid: string + conditionId: string + items: Item[] } export interface Item { - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/quests/IListQuestsRequestData.ts b/project/src/models/eft/quests/IListQuestsRequestData.ts index 0598751e..22f98124 100644 --- a/project/src/models/eft/quests/IListQuestsRequestData.ts +++ b/project/src/models/eft/quests/IListQuestsRequestData.ts @@ -1,4 +1,4 @@ export interface IListQuestsRequestData { - completed: boolean; + completed: boolean } diff --git a/project/src/models/eft/quests/IRepeatableQuestChangeRequest.ts b/project/src/models/eft/quests/IRepeatableQuestChangeRequest.ts index 58dc2140..c644063c 100644 --- a/project/src/models/eft/quests/IRepeatableQuestChangeRequest.ts +++ b/project/src/models/eft/quests/IRepeatableQuestChangeRequest.ts @@ -1,5 +1,5 @@ export interface IRepeatableQuestChangeRequest { - Action: "RepeatableQuestChange"; - qid: string; + Action: "RepeatableQuestChange" + qid: string } diff --git a/project/src/models/eft/ragfair/IAddOfferRequestData.ts b/project/src/models/eft/ragfair/IAddOfferRequestData.ts index 18376a3a..ddb7d1e0 100644 --- a/project/src/models/eft/ragfair/IAddOfferRequestData.ts +++ b/project/src/models/eft/ragfair/IAddOfferRequestData.ts @@ -1,16 +1,16 @@ export interface IAddOfferRequestData { - Action: string; - sellInOnePiece: boolean; - items: string[]; - requirements: Requirement[]; + Action: string + sellInOnePiece: boolean + items: string[] + requirements: Requirement[] } export interface Requirement { - _tpl: string; - count: number; - level: number; - side: number; - onlyFunctional: boolean; + _tpl: string + count: number + level: number + side: number + onlyFunctional: boolean } diff --git a/project/src/models/eft/ragfair/IExtendOfferRequestData.ts b/project/src/models/eft/ragfair/IExtendOfferRequestData.ts index 116ddebc..5ffbd443 100644 --- a/project/src/models/eft/ragfair/IExtendOfferRequestData.ts +++ b/project/src/models/eft/ragfair/IExtendOfferRequestData.ts @@ -1,5 +1,5 @@ export interface IExtendOfferRequestData { - offerId: string; - renewalTime: number; + offerId: string + renewalTime: number } diff --git a/project/src/models/eft/ragfair/IGetItemPriceResult.ts b/project/src/models/eft/ragfair/IGetItemPriceResult.ts index 0bb80f2b..6a771d92 100644 --- a/project/src/models/eft/ragfair/IGetItemPriceResult.ts +++ b/project/src/models/eft/ragfair/IGetItemPriceResult.ts @@ -2,5 +2,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; export interface IGetItemPriceResult extends MinMax { - avg: number; + avg: number } diff --git a/project/src/models/eft/ragfair/IGetMarketPriceRequestData.ts b/project/src/models/eft/ragfair/IGetMarketPriceRequestData.ts index 17b20561..38f472a6 100644 --- a/project/src/models/eft/ragfair/IGetMarketPriceRequestData.ts +++ b/project/src/models/eft/ragfair/IGetMarketPriceRequestData.ts @@ -1,4 +1,4 @@ export interface IGetMarketPriceRequestData { - templateId: string; + templateId: string } diff --git a/project/src/models/eft/ragfair/IGetOffersResult.ts b/project/src/models/eft/ragfair/IGetOffersResult.ts index 983680dd..549c78d1 100644 --- a/project/src/models/eft/ragfair/IGetOffersResult.ts +++ b/project/src/models/eft/ragfair/IGetOffersResult.ts @@ -2,8 +2,8 @@ import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; export interface IGetOffersResult { - categories?: Record; - offers: IRagfairOffer[]; - offersCount: number; - selectedCategory: string; + categories?: Record + offers: IRagfairOffer[] + offersCount: number + selectedCategory: string } diff --git a/project/src/models/eft/ragfair/IGetRagfairOfferByIdRequest.ts b/project/src/models/eft/ragfair/IGetRagfairOfferByIdRequest.ts index 24d07b8d..981a783d 100644 --- a/project/src/models/eft/ragfair/IGetRagfairOfferByIdRequest.ts +++ b/project/src/models/eft/ragfair/IGetRagfairOfferByIdRequest.ts @@ -1,4 +1,4 @@ export interface IGetRagfairOfferByIdRequest { - id: number; + id: number } diff --git a/project/src/models/eft/ragfair/IRagfairOffer.ts b/project/src/models/eft/ragfair/IRagfairOffer.ts index 3ef94492..2f0d737b 100644 --- a/project/src/models/eft/ragfair/IRagfairOffer.ts +++ b/project/src/models/eft/ragfair/IRagfairOffer.ts @@ -3,52 +3,52 @@ import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; export interface IRagfairOffer { - sellResult?: SellResult[]; - _id: string; - items: Item[]; - requirements: OfferRequirement[]; - root: string; - intId: number; + sellResult?: SellResult[] + _id: string + items: Item[] + requirements: OfferRequirement[] + root: string + intId: number /** Handbook price */ - itemsCost: number; + itemsCost: number /** Rouble price */ - requirementsCost: number; - startTime: number; - endTime: number; - sellInOnePiece: boolean; - loyaltyLevel: number; - buyRestrictionMax?: number; - buyRestrictionCurrent?: number; - locked: boolean; - unlimitedCount: boolean; + requirementsCost: number + startTime: number + endTime: number + sellInOnePiece: boolean + loyaltyLevel: number + buyRestrictionMax?: number + buyRestrictionCurrent?: number + locked: boolean + unlimitedCount: boolean /** Rouble price */ - summaryCost: number; - user: IRagfairOfferUser; - notAvailable: boolean; + summaryCost: number + user: IRagfairOfferUser + notAvailable: boolean /** TODO - implement this value - not currently used */ - CurrentItemCount: number; - priority: boolean; + CurrentItemCount: number + priority: boolean } export interface OfferRequirement { - _tpl: string; - count: number; - onlyFunctional: boolean; + _tpl: string + count: number + onlyFunctional: boolean } export interface IRagfairOfferUser { - id: string; - nickname?: string; - rating?: number; - memberType: MemberCategory; - avatar?: string; - isRatingGrowing?: boolean; + id: string + nickname?: string + rating?: number + memberType: MemberCategory + avatar?: string + isRatingGrowing?: boolean } export interface SellResult { - sellTime: number; - amount: number; + sellTime: number + amount: number } diff --git a/project/src/models/eft/ragfair/IRemoveOfferRequestData.ts b/project/src/models/eft/ragfair/IRemoveOfferRequestData.ts index 6bb8d2d3..4f8b6aaf 100644 --- a/project/src/models/eft/ragfair/IRemoveOfferRequestData.ts +++ b/project/src/models/eft/ragfair/IRemoveOfferRequestData.ts @@ -1,5 +1,5 @@ export interface IRemoveOfferRequestData { - Action: string; - offerId: string; + Action: string + offerId: string } diff --git a/project/src/models/eft/ragfair/ISearchRequestData.ts b/project/src/models/eft/ragfair/ISearchRequestData.ts index 8f11fe9f..02b2a5a5 100644 --- a/project/src/models/eft/ragfair/ISearchRequestData.ts +++ b/project/src/models/eft/ragfair/ISearchRequestData.ts @@ -2,29 +2,29 @@ import { RagfairSort } from "@spt-aki/models/enums/RagfairSort"; export interface ISearchRequestData { - page: number; - limit: number; - sortType: RagfairSort; - sortDirection: number; - currency: number; - priceFrom: number; - priceTo: number; - quantityFrom: number; - quantityTo: number; - conditionFrom: number; - conditionTo: number; - oneHourExpiration: boolean; - removeBartering: boolean; - offerOwnerType: OfferOwnerType; - onlyFunctional: boolean; - updateOfferCount: boolean; - handbookId: string; - linkedSearchId: string; - neededSearchId: string; - buildItems: BuildItems; - buildCount: number; - tm: number; - reload: number; + page: number + limit: number + sortType: RagfairSort + sortDirection: number + currency: number + priceFrom: number + priceTo: number + quantityFrom: number + quantityTo: number + conditionFrom: number + conditionTo: number + oneHourExpiration: boolean + removeBartering: boolean + offerOwnerType: OfferOwnerType + onlyFunctional: boolean + updateOfferCount: boolean + handbookId: string + linkedSearchId: string + neededSearchId: string + buildItems: BuildItems + buildCount: number + tm: number + reload: number } export enum OfferOwnerType diff --git a/project/src/models/eft/ragfair/ISendRagfairReportRequestData.ts b/project/src/models/eft/ragfair/ISendRagfairReportRequestData.ts index f9deffa9..424ec0a2 100644 --- a/project/src/models/eft/ragfair/ISendRagfairReportRequestData.ts +++ b/project/src/models/eft/ragfair/ISendRagfairReportRequestData.ts @@ -1,4 +1,4 @@ export interface ISendRagfairReportRequestData { - offerId: number; + offerId: number } diff --git a/project/src/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.ts b/project/src/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.ts index 67aed9a5..ab0d0fef 100644 --- a/project/src/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.ts +++ b/project/src/models/eft/ragfair/IStorePlayerOfferTaxAmountRequestData.ts @@ -1,7 +1,7 @@ export interface IStorePlayerOfferTaxAmountRequestData { - id: string; - tpl: string; - count: number; - fee: number; + id: string + tpl: string + count: number + fee: number } diff --git a/project/src/models/eft/repair/IBaseRepairActionDataRequest.ts b/project/src/models/eft/repair/IBaseRepairActionDataRequest.ts index 67fe317f..7ee92971 100644 --- a/project/src/models/eft/repair/IBaseRepairActionDataRequest.ts +++ b/project/src/models/eft/repair/IBaseRepairActionDataRequest.ts @@ -1,4 +1,4 @@ export interface IBaseRepairActionDataRequest { - Action: string; + Action: string } diff --git a/project/src/models/eft/repair/IRepairActionDataRequest.ts b/project/src/models/eft/repair/IRepairActionDataRequest.ts index f22750a3..3f798f27 100644 --- a/project/src/models/eft/repair/IRepairActionDataRequest.ts +++ b/project/src/models/eft/repair/IRepairActionDataRequest.ts @@ -2,13 +2,13 @@ import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRe export interface IRepairActionDataRequest extends IBaseRepairActionDataRequest { - Action: "Repair"; - repairKitsInfo: RepairKitsInfo[]; - target: string; // item to repair + Action: "Repair" + repairKitsInfo: RepairKitsInfo[] + target: string // item to repair } export interface RepairKitsInfo { - _id: string; // id of repair kit to use - count: number; // amout of units to reduce kit by + _id: string // id of repair kit to use + count: number // amout of units to reduce kit by } diff --git a/project/src/models/eft/repair/ITraderRepairActionDataRequest.ts b/project/src/models/eft/repair/ITraderRepairActionDataRequest.ts index 6aa6f5b5..fbc94b18 100644 --- a/project/src/models/eft/repair/ITraderRepairActionDataRequest.ts +++ b/project/src/models/eft/repair/ITraderRepairActionDataRequest.ts @@ -2,13 +2,13 @@ import { IBaseRepairActionDataRequest } from "@spt-aki/models/eft/repair/IBaseRe export interface ITraderRepairActionDataRequest extends IBaseRepairActionDataRequest { - Action: "TraderRepair"; - tid: string; - repairItems: RepairItem[]; + Action: "TraderRepair" + tid: string + repairItems: RepairItem[] } export interface RepairItem { - _id: string; - count: number; + _id: string + count: number } diff --git a/project/src/models/eft/trade/IProcessBaseTradeRequestData.ts b/project/src/models/eft/trade/IProcessBaseTradeRequestData.ts index 2d59e790..c7f40b7c 100644 --- a/project/src/models/eft/trade/IProcessBaseTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessBaseTradeRequestData.ts @@ -1,6 +1,6 @@ export interface IProcessBaseTradeRequestData { - Action: string; - type: string; - tid: string; + Action: string + type: string + tid: string } diff --git a/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts b/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts index dff5e8fc..32ec8b86 100644 --- a/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessBuyTradeRequestData.ts @@ -3,18 +3,18 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcess export interface IProcessBuyTradeRequestData extends IProcessBaseTradeRequestData { - Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | ""; - type: string; - tid: string; - item_id: string; - count: number; - scheme_id: number; - scheme_items: SchemeItem[]; + Action: "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | "" + type: string + tid: string + item_id: string + count: number + scheme_id: number + scheme_items: SchemeItem[] } export interface SchemeItem { /** Id of stack to take money from, is money tpl when Action is `SptInsure` */ - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/trade/IProcessRagfairTradeRequestData.ts b/project/src/models/eft/trade/IProcessRagfairTradeRequestData.ts index bb5e07ad..88bc36e2 100644 --- a/project/src/models/eft/trade/IProcessRagfairTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessRagfairTradeRequestData.ts @@ -1,18 +1,18 @@ export interface IProcessRagfairTradeRequestData { - Action: string; - offers: IOfferRequest[]; + Action: string + offers: IOfferRequest[] } export interface IOfferRequest { - id: string; - count: number; - items: IItemReqeust[]; + id: string + count: number + items: IItemReqeust[] } export interface IItemReqeust { - id: string; - count: number; + id: string + count: number } diff --git a/project/src/models/eft/trade/IProcessSellTradeRequestData.ts b/project/src/models/eft/trade/IProcessSellTradeRequestData.ts index ecf1dba2..3a876c85 100644 --- a/project/src/models/eft/trade/IProcessSellTradeRequestData.ts +++ b/project/src/models/eft/trade/IProcessSellTradeRequestData.ts @@ -2,16 +2,16 @@ import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcess export interface IProcessSellTradeRequestData extends IProcessBaseTradeRequestData { - Action: "sell_to_trader"; - type: string; - tid: string; - price: number; - items: Item[]; + Action: "sell_to_trader" + type: string + tid: string + price: number + items: Item[] } export interface Item { - id: string; - count: number; - scheme_id: number; + id: string + count: number + scheme_id: number } diff --git a/project/src/models/eft/trade/ISellScavItemsToFenceRequestData.ts b/project/src/models/eft/trade/ISellScavItemsToFenceRequestData.ts index c8f9adb6..6545ac7b 100644 --- a/project/src/models/eft/trade/ISellScavItemsToFenceRequestData.ts +++ b/project/src/models/eft/trade/ISellScavItemsToFenceRequestData.ts @@ -2,8 +2,8 @@ import { OwnerInfo } from "@spt-aki/models/eft/common/request/IBaseInteractionRe export interface ISellScavItemsToFenceRequestData { - Action: "SellAllFromSavage"; - totalValue: number; - fromOwner: OwnerInfo; - toOwner: OwnerInfo; + Action: "SellAllFromSavage" + totalValue: number + fromOwner: OwnerInfo + toOwner: OwnerInfo } diff --git a/project/src/models/eft/weather/IWeatherData.ts b/project/src/models/eft/weather/IWeatherData.ts index ea2d3c1f..2a2cb6c5 100644 --- a/project/src/models/eft/weather/IWeatherData.ts +++ b/project/src/models/eft/weather/IWeatherData.ts @@ -3,25 +3,25 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { - acceleration: number; - time: string; - date: string; - weather: IWeather; - season: Season; + acceleration: number + time: string + date: string + weather: IWeather + season: Season } export interface IWeather { - pressure: number; - temp: number; - fog: number; - rain_intensity: number; - rain: number; - wind_gustiness: number; - wind_direction: WindDirection; - wind_speed: number; - cloud: number; - time: string; - date: string; - timestamp: number; + pressure: number + temp: number + fog: number + rain_intensity: number + rain: number + wind_gustiness: number + wind_direction: WindDirection + wind_speed: number + cloud: number + time: string + date: string + timestamp: number } diff --git a/project/src/models/eft/wishlist/IWishlistActionData.ts b/project/src/models/eft/wishlist/IWishlistActionData.ts index 0f54fcfa..d44d002f 100644 --- a/project/src/models/eft/wishlist/IWishlistActionData.ts +++ b/project/src/models/eft/wishlist/IWishlistActionData.ts @@ -1,5 +1,5 @@ export interface IWishlistActionData { - Action: string; - templateId: string; + Action: string + templateId: string } diff --git a/project/src/models/enums/BaseClasses.ts b/project/src/models/enums/BaseClasses.ts index 7fe74d52..9024628b 100644 --- a/project/src/models/enums/BaseClasses.ts +++ b/project/src/models/enums/BaseClasses.ts @@ -111,5 +111,5 @@ export enum BaseClasses BARREL = "555ef6e44bdc2de9068b457e", CHARGING_HANDLE = "55818a6f4bdc2db9688b456b", COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ", - HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba" + HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba", } diff --git a/project/src/models/enums/SkillTypes.ts b/project/src/models/enums/SkillTypes.ts index ea94c754..8003e0aa 100644 --- a/project/src/models/enums/SkillTypes.ts +++ b/project/src/models/enums/SkillTypes.ts @@ -35,7 +35,7 @@ export enum SkillTypes NIGHT_OPS = "NightOps", SILENT_OPS = "SilentOps", LOCKPICKING = "Lockpicking", - /** Also called Weapon Maintenance*/ + /** Also called Weapon Maintenance */ WEAPON_TREATMENT = "WeaponTreatment", MAG_DRILLS = "MagDrills", FREE_TRADING = "Freetrading", diff --git a/project/src/models/external/HttpFramework.ts b/project/src/models/external/HttpFramework.ts index 9ac9db8b..34a0187d 100644 --- a/project/src/models/external/HttpFramework.ts +++ b/project/src/models/external/HttpFramework.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { IncomingMessage, ServerResponse } from "node:http"; import { injectable } from "tsyringe"; - import { HttpMethods } from "@spt-aki/servers/http/HttpMethods"; export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void; @@ -13,7 +12,7 @@ export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) = */ export const Listen = (basePath: string) => { - return (Base: T): T => + return (Base: T): T => { // Used for the base class to be able to use DI injectable()(Base); @@ -62,8 +61,8 @@ export const Listen = (basePath: string) => { const routesHandles = this.handlers[req.method]; - return Object.keys(this.handlers).some((meth) => meth === req.method) - && Object.keys(routesHandles).some((route) => (new RegExp(route)).test(req.url)); + return Object.keys(this.handlers).some(meth => meth === req.method) + && Object.keys(routesHandles).some(route => new RegExp(route).test(req.url)); }; // The actual handle method dispatches the request to the registered handlers @@ -82,7 +81,7 @@ export const Listen = (basePath: string) => routes.sort((routeA, routeB) => routeB.length - routeA.length); // Filter to select valid routes but only use the first element since it's the most precise - const validRoutes = routes.filter((handlerKey) => (new RegExp(handlerKey)).test(route)); + const validRoutes = routes.filter(handlerKey => new RegExp(handlerKey).test(route)); if (validRoutes.length > 0) { routesHandles[validRoutes[0]](sessionID, req, resp); diff --git a/project/src/models/external/IPostAkiLoadMod.ts b/project/src/models/external/IPostAkiLoadMod.ts index d88e8e3d..4dee592e 100644 --- a/project/src/models/external/IPostAkiLoadMod.ts +++ b/project/src/models/external/IPostAkiLoadMod.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPostAkiLoadMod { - postAkiLoad(container: DependencyContainer): void; + postAkiLoad(container: DependencyContainer): void } diff --git a/project/src/models/external/IPostAkiLoadModAsync.ts b/project/src/models/external/IPostAkiLoadModAsync.ts index 3bfb37e7..93a30aba 100644 --- a/project/src/models/external/IPostAkiLoadModAsync.ts +++ b/project/src/models/external/IPostAkiLoadModAsync.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPostAkiLoadModAsync { - postAkiLoadAsync(container: DependencyContainer): Promise; + postAkiLoadAsync(container: DependencyContainer): Promise } diff --git a/project/src/models/external/IPostDBLoadMod.ts b/project/src/models/external/IPostDBLoadMod.ts index d5af8f9a..8a62f92b 100644 --- a/project/src/models/external/IPostDBLoadMod.ts +++ b/project/src/models/external/IPostDBLoadMod.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPostDBLoadMod { - postDBLoad(container: DependencyContainer): void; + postDBLoad(container: DependencyContainer): void } diff --git a/project/src/models/external/IPostDBLoadModAsync.ts b/project/src/models/external/IPostDBLoadModAsync.ts index 14297c3e..f05ff65e 100644 --- a/project/src/models/external/IPostDBLoadModAsync.ts +++ b/project/src/models/external/IPostDBLoadModAsync.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPostDBLoadModAsync { - postDBLoadAsync(container: DependencyContainer): Promise; + postDBLoadAsync(container: DependencyContainer): Promise } diff --git a/project/src/models/external/IPreAkiLoadMod.ts b/project/src/models/external/IPreAkiLoadMod.ts index 9d5532a1..3800719e 100644 --- a/project/src/models/external/IPreAkiLoadMod.ts +++ b/project/src/models/external/IPreAkiLoadMod.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPreAkiLoadMod { - preAkiLoad(container: DependencyContainer): void; + preAkiLoad(container: DependencyContainer): void } diff --git a/project/src/models/external/IPreAkiLoadModAsync.ts b/project/src/models/external/IPreAkiLoadModAsync.ts index 2b15db36..b0ecf9e0 100644 --- a/project/src/models/external/IPreAkiLoadModAsync.ts +++ b/project/src/models/external/IPreAkiLoadModAsync.ts @@ -2,5 +2,5 @@ import type { DependencyContainer } from "tsyringe"; export interface IPreAkiLoadModAsync { - preAkiLoadAsync(container: DependencyContainer): Promise; + preAkiLoadAsync(container: DependencyContainer): Promise } diff --git a/project/src/models/external/tsyringe.ts b/project/src/models/external/tsyringe.ts index 3be95e9a..56a7e58f 100644 --- a/project/src/models/external/tsyringe.ts +++ b/project/src/models/external/tsyringe.ts @@ -1,2 +1,2 @@ import type { DependencyContainer } from "tsyringe"; -export type {DependencyContainer}; +export type { DependencyContainer }; diff --git a/project/src/models/spt/bindings/Route.ts b/project/src/models/spt/bindings/Route.ts index be18924e..591023e2 100644 --- a/project/src/models/spt/bindings/Route.ts +++ b/project/src/models/spt/bindings/Route.ts @@ -1,4 +1,4 @@ export interface IRoute { - aki: any; + aki: any } diff --git a/project/src/models/spt/bots/BotGenerationDetails.ts b/project/src/models/spt/bots/BotGenerationDetails.ts index 725f34e3..0110c1b1 100644 --- a/project/src/models/spt/bots/BotGenerationDetails.ts +++ b/project/src/models/spt/bots/BotGenerationDetails.ts @@ -3,26 +3,26 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ - isPmc: boolean; + isPmc: boolean /** assault/pmcBot etc */ - role: string; + role: string /** Side of bot */ - side: string; + side: string /** Active players current level */ - playerLevel?: number; - playerName?: string; + playerLevel?: number + playerName?: string /** Level specific overrides for PMC level */ - locationSpecificPmcLevelOverride?: MinMax; + locationSpecificPmcLevelOverride?: MinMax /** Delta of highest level of bot e.g. 50 means 50 levels above player */ - botRelativeLevelDeltaMax: number; + botRelativeLevelDeltaMax: number /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ - botRelativeLevelDeltaMin: number; + botRelativeLevelDeltaMin: number /** How many to create and store */ - botCountToGenerate: number; + botCountToGenerate: number /** Desired difficulty of the bot */ - botDifficulty: string; + botDifficulty: string /** Will the generated bot be a player scav */ - isPlayerScav: boolean; - eventRole?: string; - allPmcsHaveSameNameAsPlayer?: boolean; + isPlayerScav: boolean + eventRole?: string + allPmcsHaveSameNameAsPlayer?: boolean } diff --git a/project/src/models/spt/bots/IBotLootCache.ts b/project/src/models/spt/bots/IBotLootCache.ts index 8441b181..d4f282c3 100644 --- a/project/src/models/spt/bots/IBotLootCache.ts +++ b/project/src/models/spt/bots/IBotLootCache.ts @@ -1,19 +1,19 @@ export interface IBotLootCache { - backpackLoot: Record; - pocketLoot: Record; - vestLoot: Record; - secureLoot: Record; - combinedPoolLoot: Record; + backpackLoot: Record + pocketLoot: Record + vestLoot: Record + secureLoot: Record + combinedPoolLoot: Record - specialItems: Record; - healingItems: Record; - drugItems: Record; - foodItems: Record; - drinkItems: Record; - currencyItems: Record; - stimItems: Record; - grenadeItems: Record; + specialItems: Record + healingItems: Record + drugItems: Record + foodItems: Record + drinkItems: Record + currencyItems: Record + stimItems: Record + grenadeItems: Record } export enum LootCacheType diff --git a/project/src/models/spt/bots/IChooseRandomCompatibleModResult.ts b/project/src/models/spt/bots/IChooseRandomCompatibleModResult.ts index 15770188..054394c4 100644 --- a/project/src/models/spt/bots/IChooseRandomCompatibleModResult.ts +++ b/project/src/models/spt/bots/IChooseRandomCompatibleModResult.ts @@ -1,8 +1,8 @@ export interface IChooseRandomCompatibleModResult { - incompatible: boolean; - found?: boolean; - chosenTpl?: string; - reason: string; - slotBlocked?: boolean; + incompatible: boolean + found?: boolean + chosenTpl?: string + reason: string + slotBlocked?: boolean } diff --git a/project/src/models/spt/bots/IItemSpawnLimitSettings.ts b/project/src/models/spt/bots/IItemSpawnLimitSettings.ts index 8cfde823..60b7122f 100644 --- a/project/src/models/spt/bots/IItemSpawnLimitSettings.ts +++ b/project/src/models/spt/bots/IItemSpawnLimitSettings.ts @@ -1,5 +1,5 @@ export interface IItemSpawnLimitSettings { - currentLimits: Record; - globalLimits: Record; + currentLimits: Record + globalLimits: Record } diff --git a/project/src/models/spt/callbacks/IBotCallbacks.ts b/project/src/models/spt/callbacks/IBotCallbacks.ts index 9bb5076b..3856bc05 100644 --- a/project/src/models/spt/callbacks/IBotCallbacks.ts +++ b/project/src/models/spt/callbacks/IBotCallbacks.ts @@ -5,8 +5,8 @@ import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyR export interface IBotCallbacks { - getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; - getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string; - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; - getBotCap(): string; + getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string + getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData + getBotCap(): string } diff --git a/project/src/models/spt/callbacks/IBundleCallbacks.ts b/project/src/models/spt/callbacks/IBundleCallbacks.ts index 1f0354df..a99cadfa 100644 --- a/project/src/models/spt/callbacks/IBundleCallbacks.ts +++ b/project/src/models/spt/callbacks/IBundleCallbacks.ts @@ -1,6 +1,6 @@ export interface IBundleCallbacks { - sendBundle(sessionID: string, req: any, resp: any, body: any): any; - getBundles(url: string, info: any, sessionID: string): string; - getBundle(url: string, info: any, sessionID: string): string; + sendBundle(sessionID: string, req: any, resp: any, body: any): any + getBundles(url: string, info: any, sessionID: string): string + getBundle(url: string, info: any, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/ICustomizationCallbacks.ts b/project/src/models/spt/callbacks/ICustomizationCallbacks.ts index 0398f5af..f9a18894 100644 --- a/project/src/models/spt/callbacks/ICustomizationCallbacks.ts +++ b/project/src/models/spt/callbacks/ICustomizationCallbacks.ts @@ -7,8 +7,8 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve export interface ICustomizationCallbacks { - getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; - getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData; - wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse; - buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse; + getSuits(url: string, info: any, sessionID: string): IGetBodyResponseData + getTraderSuits(url: string, info: any, sessionID: string): IGetBodyResponseData + wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse + buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/IDataCallbacks.ts b/project/src/models/spt/callbacks/IDataCallbacks.ts index 6f970b76..e846e969 100644 --- a/project/src/models/spt/callbacks/IDataCallbacks.ts +++ b/project/src/models/spt/callbacks/IDataCallbacks.ts @@ -9,33 +9,33 @@ import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDataCallbacks { - getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string; - getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string + getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData getHideoutSettings( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; - getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + ): IGetBodyResponseData + getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData gethideoutProduction( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData getHideoutScavcase( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData getLocalesLanguages( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData>; - getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string; + ): IGetBodyResponseData> + getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/IDialogueCallbacks.ts b/project/src/models/spt/callbacks/IDialogueCallbacks.ts index 66f83179..0c13c158 100644 --- a/project/src/models/spt/callbacks/IDialogueCallbacks.ts +++ b/project/src/models/spt/callbacks/IDialogueCallbacks.ts @@ -22,31 +22,31 @@ export interface IDialogueCallbacks url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; - getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData; + ): IGetBodyResponseData + getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData getMailDialogList( url: string, info: IGetMailDialogListRequestData, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData getMailDialogView( url: string, info: IGetMailDialogViewRequestData, sessionID: string, - ): IGetBodyResponseData; - getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData; - removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData; - pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData; - setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData; + ): IGetBodyResponseData + getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData + removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData + pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData + unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData + setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData getAllAttachments( url: string, info: IGetAllAttachmentsRequestData, sessionID: string, - ): IGetBodyResponseData; - listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData; - sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData; - update(): boolean; + ): IGetBodyResponseData + listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + sendFriendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData + sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData + update(): boolean } diff --git a/project/src/models/spt/callbacks/IGameCallbacks.ts b/project/src/models/spt/callbacks/IGameCallbacks.ts index bb08f360..ce90a466 100644 --- a/project/src/models/spt/callbacks/IGameCallbacks.ts +++ b/project/src/models/spt/callbacks/IGameCallbacks.ts @@ -7,16 +7,16 @@ import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullRespons export interface IGameCallbacks { - versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData; - gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData + gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData getGameConfig( url: string, info: IGameEmptyCrcRequestData, sessionID: string, - ): IGetBodyResponseData; - getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; + ): IGetBodyResponseData + getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getVersion(url: string, info: IEmptyRequestData, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/IHandbookCallbacks.ts b/project/src/models/spt/callbacks/IHandbookCallbacks.ts index ebd3e1d0..221a488d 100644 --- a/project/src/models/spt/callbacks/IHandbookCallbacks.ts +++ b/project/src/models/spt/callbacks/IHandbookCallbacks.ts @@ -1,4 +1,4 @@ export interface IHandbookCallbacks { - load(): void; + load(): void } diff --git a/project/src/models/spt/callbacks/IHealthCallbacks.ts b/project/src/models/spt/callbacks/IHealthCallbacks.ts index 009e4d87..903873d4 100644 --- a/project/src/models/spt/callbacks/IHealthCallbacks.ts +++ b/project/src/models/spt/callbacks/IHealthCallbacks.ts @@ -7,9 +7,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IHealthCallbacks { - onLoad(sessionID: string): IAkiProfile; - syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): any; - offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): any; - offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): any; - healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): any; + onLoad(sessionID: string): IAkiProfile + syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): any + offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): any + offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): any + healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): any } diff --git a/project/src/models/spt/callbacks/IHideoutCallbacks.ts b/project/src/models/spt/callbacks/IHideoutCallbacks.ts index 3746d364..f2da0c94 100644 --- a/project/src/models/spt/callbacks/IHideoutCallbacks.ts +++ b/project/src/models/spt/callbacks/IHideoutCallbacks.ts @@ -12,42 +12,42 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve export interface IHideoutCallbacks { - upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse; + upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse upgradeComplete( pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse putItemsInAreaSlots( pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse takeItemsFromAreaSlots( pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string, - ): IItemEventRouterResponse; - toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse; + ): IItemEventRouterResponse + toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse singleProductionStart( pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse scavCaseProductionStart( pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse continuousProductionStart( pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse takeProduction( pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string, - ): IItemEventRouterResponse; - update(timeSinceLastRun: number): boolean; + ): IItemEventRouterResponse + update(timeSinceLastRun: number): boolean } diff --git a/project/src/models/spt/callbacks/IHttpCallbacks.ts b/project/src/models/spt/callbacks/IHttpCallbacks.ts index ef20c3a1..aa9843d6 100644 --- a/project/src/models/spt/callbacks/IHttpCallbacks.ts +++ b/project/src/models/spt/callbacks/IHttpCallbacks.ts @@ -1,6 +1,6 @@ export interface IHttpCallbacks { - load(): void; - sendImage(sessionID: string, req: any, resp: any, body: any): void; - getImage(): string; + load(): void + sendImage(sessionID: string, req: any, resp: any, body: any): void + getImage(): string } diff --git a/project/src/models/spt/callbacks/IInraidCallbacks.ts b/project/src/models/spt/callbacks/IInraidCallbacks.ts index 1a8ddd89..3afe8d88 100644 --- a/project/src/models/spt/callbacks/IInraidCallbacks.ts +++ b/project/src/models/spt/callbacks/IInraidCallbacks.ts @@ -6,11 +6,11 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInraidCallbacks { - onLoad(sessionID: string): IAkiProfile; - registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData; - saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData; - getRaidEndState(): string; - getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string; - getWeaponDurability(url: string, info: any, sessionID: string): string; - getAirdropConfig(url: string, info: any, sessionID: string): string; + onLoad(sessionID: string): IAkiProfile + registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData + saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData + getRaidEndState(): string + getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string + getWeaponDurability(url: string, info: any, sessionID: string): string + getAirdropConfig(url: string, info: any, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/IInsuranceCallbacks.ts b/project/src/models/spt/callbacks/IInsuranceCallbacks.ts index 93caacde..8c5f33c3 100644 --- a/project/src/models/spt/callbacks/IInsuranceCallbacks.ts +++ b/project/src/models/spt/callbacks/IInsuranceCallbacks.ts @@ -5,8 +5,8 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IInsuranceCallbacks { - onLoad(sessionID: string): IAkiProfile; - getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): any; - insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): any; - update(secondsSinceLastRun: number): boolean; + onLoad(sessionID: string): IAkiProfile + getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): any + insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): any + update(secondsSinceLastRun: number): boolean } diff --git a/project/src/models/spt/callbacks/IInventoryCallbacks.ts b/project/src/models/spt/callbacks/IInventoryCallbacks.ts index 92640338..5e4473c7 100644 --- a/project/src/models/spt/callbacks/IInventoryCallbacks.ts +++ b/project/src/models/spt/callbacks/IInventoryCallbacks.ts @@ -19,36 +19,36 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve export interface IInventoryCallbacks { - moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse; - removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse; - splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse; - mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse; - transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse; - swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse; - foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse; - toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse; - tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; - bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; - examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; + moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse + removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse + splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse + mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse + transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse + swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse + foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse + toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse + tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse + bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse + examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse readEncyclopedia( pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string, - ): IItemEventRouterResponse; - sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse; + ): IItemEventRouterResponse + sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse createMapMarker( pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse deleteMapMarker( pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse editMapMarker( pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/IItemEventCallbacks.ts b/project/src/models/spt/callbacks/IItemEventCallbacks.ts index 5b02f663..a7530d08 100644 --- a/project/src/models/spt/callbacks/IItemEventCallbacks.ts +++ b/project/src/models/spt/callbacks/IItemEventCallbacks.ts @@ -8,5 +8,5 @@ export interface IItemEventCallbacks url: string, info: IItemEventRouterRequest, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData } diff --git a/project/src/models/spt/callbacks/ILauncherCallbacks.ts b/project/src/models/spt/callbacks/ILauncherCallbacks.ts index ad726ec8..862a95fb 100644 --- a/project/src/models/spt/callbacks/ILauncherCallbacks.ts +++ b/project/src/models/spt/callbacks/ILauncherCallbacks.ts @@ -6,17 +6,17 @@ import { IRemoveProfileData } from "@spt-aki/models/eft/launcher/IRemoveProfileD export interface ILauncherCallbacks { - connect(): string; - login(url: string, info: ILoginRequestData, sessionID: string): string; - register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - get(url: string, info: ILoginRequestData, sessionID: string): string; - changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK"; - wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK"; - getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; - getAllMiniProfiles(url: string, info: any, sessionID: string): string; - getServerVersion(): string; - ping(url: string, info: any, sessionID: string): string; - removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string; - getCompatibleTarkovVersion(): string; + connect(): string + login(url: string, info: ILoginRequestData, sessionID: string): string + register(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK" + get(url: string, info: ILoginRequestData, sessionID: string): string + changeUsername(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK" + changePassword(url: string, info: IChangeRequestData, sessionID: string): "FAILED" | "OK" + wipe(url: string, info: IRegisterData, sessionID: string): "FAILED" | "OK" + getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string + getAllMiniProfiles(url: string, info: any, sessionID: string): string + getServerVersion(): string + ping(url: string, info: any, sessionID: string): string + removeProfile(url: string, info: IRemoveProfileData, sessionID: string): string + getCompatibleTarkovVersion(): string } diff --git a/project/src/models/spt/callbacks/ILocationCallbacks.ts b/project/src/models/spt/callbacks/ILocationCallbacks.ts index 97ed5e5f..28083092 100644 --- a/project/src/models/spt/callbacks/ILocationCallbacks.ts +++ b/project/src/models/spt/callbacks/ILocationCallbacks.ts @@ -5,6 +5,6 @@ import { IGetLocationRequestData } from "@spt-aki/models/eft/location/IGetLocati export interface ILocationCallbacks { - getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData; - getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData; + getLocationData(url: string, info: any, sessionID: string): IGetBodyResponseData + getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData } diff --git a/project/src/models/spt/callbacks/IModCallbacks.ts b/project/src/models/spt/callbacks/IModCallbacks.ts index c3a18ff7..2beddcaa 100644 --- a/project/src/models/spt/callbacks/IModCallbacks.ts +++ b/project/src/models/spt/callbacks/IModCallbacks.ts @@ -1,7 +1,7 @@ export interface IModCallbacks { - load(): void; - sendBundle(sessionID: string, req: any, resp: any, body: any): void; - getBundles(url: string, info: any, sessionID: string): string; - getBundle(url: string, info: any, sessionID: string): string; + load(): void + sendBundle(sessionID: string, req: any, resp: any, body: any): void + getBundles(url: string, info: any, sessionID: string): string + getBundle(url: string, info: any, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/INoteCallbacks.ts b/project/src/models/spt/callbacks/INoteCallbacks.ts index ff7f1078..aca10ad3 100644 --- a/project/src/models/spt/callbacks/INoteCallbacks.ts +++ b/project/src/models/spt/callbacks/INoteCallbacks.ts @@ -4,7 +4,7 @@ import { INoteActionData } from "@spt-aki/models/eft/notes/INoteActionData"; export interface INoteCallbacks { - addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; - deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse + editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse + deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/INotifierCallbacks.ts b/project/src/models/spt/callbacks/INotifierCallbacks.ts index 1dd6a6c0..b953dc4a 100644 --- a/project/src/models/spt/callbacks/INotifierCallbacks.ts +++ b/project/src/models/spt/callbacks/INotifierCallbacks.ts @@ -1,7 +1,7 @@ import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; +import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier"; -import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData"; export interface INotifierCallbacks { @@ -11,13 +11,13 @@ export interface INotifierCallbacks * until we actually have something to send because otherwise we'd spam the client * and the client would abort the connection due to spam. */ - sendNotification(sessionID: string, req: any, resp: any, data: any): void; - getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData; + sendNotification(sessionID: string, req: any, resp: any, data: any): void + getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData createNotifierChannel( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; - selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData; - notify(url: string, info: any, sessionID: string): string; + ): IGetBodyResponseData + selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData + notify(url: string, info: any, sessionID: string): string } diff --git a/project/src/models/spt/callbacks/IPresetBuildCallbacks.ts b/project/src/models/spt/callbacks/IPresetBuildCallbacks.ts index fc1cdc48..e84717a8 100644 --- a/project/src/models/spt/callbacks/IPresetBuildCallbacks.ts +++ b/project/src/models/spt/callbacks/IPresetBuildCallbacks.ts @@ -6,25 +6,25 @@ import { IWeaponBuild } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface IPresetBuildCallbacks { - getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData; + getHandbookUserlist(url: string, info: any, sessionID: string): IGetBodyResponseData saveWeaponBuild( pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse removeWeaponBuild( pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse saveEquipmentBuild( pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse removeEquipmentBuild( pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/IPresetCallbacks.ts b/project/src/models/spt/callbacks/IPresetCallbacks.ts index 393bcb3a..31659fdb 100644 --- a/project/src/models/spt/callbacks/IPresetCallbacks.ts +++ b/project/src/models/spt/callbacks/IPresetCallbacks.ts @@ -1,4 +1,4 @@ export interface IPresetCallbacks { - load(): void; + load(): void } diff --git a/project/src/models/spt/callbacks/IProfileCallbacks.ts b/project/src/models/spt/callbacks/IProfileCallbacks.ts index 41ffecbe..92ee67e5 100644 --- a/project/src/models/spt/callbacks/IProfileCallbacks.ts +++ b/project/src/models/spt/callbacks/IProfileCallbacks.ts @@ -10,18 +10,18 @@ import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValid export interface IProfileCallbacks { - onLoad(sessionID: string): any; - createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData; - getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData; - changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData; - validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData; - getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + onLoad(sessionID: string): any + createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData + getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData + changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData + validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData + getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData searchFriend( url: string, info: ISearchFriendRequestData, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData } diff --git a/project/src/models/spt/callbacks/IQuestCallbacks.ts b/project/src/models/spt/callbacks/IQuestCallbacks.ts index f68105f6..0b7901d3 100644 --- a/project/src/models/spt/callbacks/IQuestCallbacks.ts +++ b/project/src/models/spt/callbacks/IQuestCallbacks.ts @@ -16,14 +16,14 @@ export interface IQuestCallbacks pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string, - ): IItemEventRouterResponse; - acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse; - completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse; - handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse; - listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData; + ): IItemEventRouterResponse + acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse + completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse + handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse + listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData activityPeriods( url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData; + ): IGetBodyResponseData } diff --git a/project/src/models/spt/callbacks/IRagfairCallbacks.ts b/project/src/models/spt/callbacks/IRagfairCallbacks.ts index 5550e6b5..a7afb07e 100644 --- a/project/src/models/spt/callbacks/IRagfairCallbacks.ts +++ b/project/src/models/spt/callbacks/IRagfairCallbacks.ts @@ -11,17 +11,17 @@ import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestDa export interface IRagfairCallbacks { - load(): void; - search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData; + load(): void + search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData getMarketPrice( url: string, info: IGetMarketPriceRequestData, sessionID: string, - ): IGetBodyResponseData; - getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; - removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse; - extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse; - update(timeSinceLastRun: number): boolean; - updatePlayer(timeSinceLastRun: number): boolean; + ): IGetBodyResponseData + getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse + removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse + extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse + update(timeSinceLastRun: number): boolean + updatePlayer(timeSinceLastRun: number): boolean } diff --git a/project/src/models/spt/callbacks/IRepairCallbacks.ts b/project/src/models/spt/callbacks/IRepairCallbacks.ts index b48cd829..3f8be6c5 100644 --- a/project/src/models/spt/callbacks/IRepairCallbacks.ts +++ b/project/src/models/spt/callbacks/IRepairCallbacks.ts @@ -5,6 +5,6 @@ import { ITraderRepairActionDataRequest } from "@spt-aki/models/eft/repair/ITrad export interface IRepairCallbacks { - traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; - repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse; + traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse + repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/ISaveCallbacks.ts b/project/src/models/spt/callbacks/ISaveCallbacks.ts index 4425d74d..b054464d 100644 --- a/project/src/models/spt/callbacks/ISaveCallbacks.ts +++ b/project/src/models/spt/callbacks/ISaveCallbacks.ts @@ -1,5 +1,5 @@ export interface ISaveCallbacks { - load(): void; - update(secondsSinceLastRun: number): boolean; + load(): void + update(secondsSinceLastRun: number): boolean } diff --git a/project/src/models/spt/callbacks/ITradeCallbacks.ts b/project/src/models/spt/callbacks/ITradeCallbacks.ts index d4ef386c..5f615678 100644 --- a/project/src/models/spt/callbacks/ITradeCallbacks.ts +++ b/project/src/models/spt/callbacks/ITradeCallbacks.ts @@ -5,10 +5,10 @@ import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProc export interface ITradeCallbacks { - processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; + processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse processRagfairTrade( pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string, - ): IItemEventRouterResponse; + ): IItemEventRouterResponse } diff --git a/project/src/models/spt/callbacks/ITraderCallbacks.ts b/project/src/models/spt/callbacks/ITraderCallbacks.ts index 33a854e3..a61c7b19 100644 --- a/project/src/models/spt/callbacks/ITraderCallbacks.ts +++ b/project/src/models/spt/callbacks/ITraderCallbacks.ts @@ -8,9 +8,9 @@ import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyR export interface ITraderCallbacks { - load(): void; - getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; - update(): boolean; + load(): void + getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData + update(): boolean } diff --git a/project/src/models/spt/callbacks/IWeatherCallbacks.ts b/project/src/models/spt/callbacks/IWeatherCallbacks.ts index a400d3b8..04a6e3ba 100644 --- a/project/src/models/spt/callbacks/IWeatherCallbacks.ts +++ b/project/src/models/spt/callbacks/IWeatherCallbacks.ts @@ -3,5 +3,5 @@ import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyR export interface IWeatherCallbacks { - getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData } diff --git a/project/src/models/spt/callbacks/IWishlistCallbacks.ts b/project/src/models/spt/callbacks/IWishlistCallbacks.ts index 6a7239cb..c3aac691 100644 --- a/project/src/models/spt/callbacks/IWishlistCallbacks.ts +++ b/project/src/models/spt/callbacks/IWishlistCallbacks.ts @@ -4,6 +4,6 @@ import { IWishlistActionData } from "@spt-aki/models/eft/wishlist/IWishlistActio export interface IWishlistCallbacks { - addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; - removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse; + addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse + removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse } diff --git a/project/src/models/spt/config/IAirdropConfig.ts b/project/src/models/spt/config/IAirdropConfig.ts index 1eac1aac..0ccbeb4c 100644 --- a/project/src/models/spt/config/IAirdropConfig.ts +++ b/project/src/models/spt/config/IAirdropConfig.ts @@ -4,63 +4,63 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IAirdropConfig extends IBaseConfig { - kind: "aki-airdrop"; - airdropChancePercent: AirdropChancePercent; - airdropTypeWeightings: Record; + kind: "aki-airdrop" + airdropChancePercent: AirdropChancePercent + airdropTypeWeightings: Record /** Lowest point plane will fly at */ - planeMinFlyHeight: number; + planeMinFlyHeight: number /** Highest point plane will fly at */ - planeMaxFlyHeight: number; + planeMaxFlyHeight: number /** Loudness of plane engine */ - planeVolume: number; + planeVolume: number /** Speed plane flies overhead */ - planeSpeed: number; + planeSpeed: number /** Speed loot crate falls after being dropped */ - crateFallSpeed: number; + crateFallSpeed: number /** Container tpls to use when spawning crate - affects container size, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ - containerIds: Record; + containerIds: Record /** Earliest time aircraft will spawn in raid */ - airdropMinStartTimeSeconds: number; + airdropMinStartTimeSeconds: number /** Latest time aircraft will spawn in raid */ - airdropMaxStartTimeSeconds: number; + airdropMaxStartTimeSeconds: number /** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */ - loot: Record; + loot: Record } /** Chance map will have an airdrop occur out of 100 - locations not included count as 0% */ export interface AirdropChancePercent { - bigmap: number; - woods: number; - lighthouse: number; - shoreline: number; - interchange: number; - reserve: number; - tarkovStreets: number; - sandbox: number; + bigmap: number + woods: number + lighthouse: number + shoreline: number + interchange: number + reserve: number + tarkovStreets: number + sandbox: number } /** Loot inside crate */ export interface AirdropLoot { /** Min/max of weapons inside crate */ - weaponPresetCount?: MinMax; + weaponPresetCount?: MinMax /** Min/max of armors (head/chest/rig) inside crate */ - armorPresetCount?: MinMax; + armorPresetCount?: MinMax /** Min/max of items inside crate */ - itemCount: MinMax; + itemCount: MinMax /** Min/max of sealed weapon boxes inside crate */ - weaponCrateCount: MinMax; + weaponCrateCount: MinMax /** Items to never allow - tpls */ - itemBlacklist: string[]; + itemBlacklist: string[] /** Item type (parentId) to allow inside crate */ - itemTypeWhitelist: string[]; + itemTypeWhitelist: string[] /** Item type/ item tpls to limit count of inside crate - key: item base type: value: max count */ - itemLimits: Record; + itemLimits: Record /** Items to limit stack size of key: item tpl value: min/max stack size */ - itemStackLimits: Record; + itemStackLimits: Record /** Armor levels to allow inside crate e.g. [4,5,6] */ - armorLevelWhitelist?: number[]; + armorLevelWhitelist?: number[] /** Should boss items be added to airdrop crate */ - allowBossItems: boolean; + allowBossItems: boolean } diff --git a/project/src/models/spt/config/IBTRConfig.ts b/project/src/models/spt/config/IBTRConfig.ts index 5d729e75..a1f1a0f7 100644 --- a/project/src/models/spt/config/IBTRConfig.ts +++ b/project/src/models/spt/config/IBTRConfig.ts @@ -3,13 +3,13 @@ import { IBaseConfig } from "./IBaseConfig"; export interface IBTRConfig extends IBaseConfig { - kind: "aki-btr"; + kind: "aki-btr" /** How fast the BTR moves */ - moveSpeed: number; + moveSpeed: number /** How long the cover fire service lasts for */ - coverFireTime: number; + coverFireTime: number /** How long the BTR waits at every point in its path */ - pointWaitTime: MinMax; + pointWaitTime: MinMax /** How long after purchasing the taxi service before the BTR leaves */ - taxiWaitTime: number; + taxiWaitTime: number } diff --git a/project/src/models/spt/config/IBaseConfig.ts b/project/src/models/spt/config/IBaseConfig.ts index 0b1806a6..11a77c73 100644 --- a/project/src/models/spt/config/IBaseConfig.ts +++ b/project/src/models/spt/config/IBaseConfig.ts @@ -1,10 +1,10 @@ export interface IBaseConfig { - kind: string; + kind: string } export interface IRunIntervalValues { - inRaid: number; - outOfRaid: number; + inRaid: number + outOfRaid: number } diff --git a/project/src/models/spt/config/IBotConfig.ts b/project/src/models/spt/config/IBotConfig.ts index 1ea1acc2..cc811264 100644 --- a/project/src/models/spt/config/IBotConfig.ts +++ b/project/src/models/spt/config/IBotConfig.ts @@ -5,201 +5,201 @@ import { IBotDurability } from "@spt-aki/models/spt/config/IBotDurability"; export interface IBotConfig extends IBaseConfig { - kind: "aki-bot"; + kind: "aki-bot" /** How many variants of each bot should be generated on raid start */ - presetBatch: PresetBatch; + presetBatch: PresetBatch /** Bot roles that should not have PMC types (sptBear/sptUsec) added as enemies to */ - botsToNotAddPMCsAsEnemiesTo: string[]; + botsToNotAddPMCsAsEnemiesTo: string[] /** What bot types should be classified as bosses */ - bosses: string[]; + bosses: string[] /** Control weapon/armor durability min/max values for each bot type */ - durability: IBotDurability; + durability: IBotDurability /** Controls the percentage values of randomization item resources */ - lootItemResourceRandomization: Record; + lootItemResourceRandomization: Record /** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */ - revenge: Record; + revenge: Record /** Control how many items are allowed to spawn on a bot * key: bottype, value: */ - itemSpawnLimits: Record>; + itemSpawnLimits: Record> /** Blacklist/whitelist items on a bot */ - equipment: Record; + equipment: Record /** Show a bots botType value after their name */ - showTypeInNickname: boolean; + showTypeInNickname: boolean /** What ai brain should a normal scav use per map */ - assaultBrainType: Record>; + assaultBrainType: Record> /** What ai brain should a player scav use per map */ - playerScavBrainType: Record>; + playerScavBrainType: Record> /** Max number of bots that can be spawned in a raid at any one time */ - maxBotCap: Record; + maxBotCap: Record /** Chance scav has fake pscav name e.g. Scav name (player name) */ - chanceAssaultScavHasPlayerScavName: number; + chanceAssaultScavHasPlayerScavName: number /** How many stacks of secret ammo should a bot have in its bot secure container */ - secureContainerAmmoStackCount: number; + secureContainerAmmoStackCount: number /** Bot roles in this array will be given a dog tag on generation */ - botRolesWithDogTags: string[]; + botRolesWithDogTags: string[] /** Settings to control the items that get added into wallets on bots */ - walletLoot: IWalletLootSettings; + walletLoot: IWalletLootSettings /** Currency weights, Keyed by botrole / currency */ - currencyStackSize: Record>>; + currencyStackSize: Record>> } /** Number of bots to generate and store in cache on raid start per bot type */ export interface PresetBatch { - assault: number; - bossBully: number; - bossGluhar: number; - bossKilla: number; - bossKojaniy: number; - bossSanitar: number; - bossTagilla: number; - bossKnight: number; - bossTest: number; - cursedAssault: number; - followerBully: number; - followerGluharAssault: number; - followerGluharScout: number; - followerGluharSecurity: number; - followerGluharSnipe: number; - followerKojaniy: number; - followerSanitar: number; - followerTagilla: number; - followerBirdEye: number; - followerBigPipe: number; - followerTest: number; - followerBoar: number; - marksman: number; - pmcBot: number; - sectantPriest: number; - sectantWarrior: number; - gifter: number; - test: number; - exUsec: number; - arenaFighterEvent: number; - arenaFighter: number; - crazyAssaultEvent: number; - bossBoar: number; - bossBoarSniper: number; - sptUsec: number; - sptBear: number; + assault: number + bossBully: number + bossGluhar: number + bossKilla: number + bossKojaniy: number + bossSanitar: number + bossTagilla: number + bossKnight: number + bossTest: number + cursedAssault: number + followerBully: number + followerGluharAssault: number + followerGluharScout: number + followerGluharSecurity: number + followerGluharSnipe: number + followerKojaniy: number + followerSanitar: number + followerTagilla: number + followerBirdEye: number + followerBigPipe: number + followerTest: number + followerBoar: number + marksman: number + pmcBot: number + sectantPriest: number + sectantWarrior: number + gifter: number + test: number + exUsec: number + arenaFighterEvent: number + arenaFighter: number + crazyAssaultEvent: number + bossBoar: number + bossBoarSniper: number + sptUsec: number + sptBear: number } export interface IWalletLootSettings { /** Chance wallets have loot in them */ - chancePercent: number; - itemCount: MinMax; - stackSizeWeight: Record; - currencyWeight: Record; + chancePercent: number + itemCount: MinMax + stackSizeWeight: Record + currencyWeight: Record /** What wallets will have money in them */ - walletTplPool: string[]; + walletTplPool: string[] } export interface EquipmentFilters { /** Limits for mod types per weapon .e.g. scopes */ - weaponModLimits: ModLimits; + weaponModLimits: ModLimits /** Whitelist for weapon sight types allowed per gun */ - weaponSightWhitelist: Record; + weaponSightWhitelist: Record /** Chance face shield is down/active */ - faceShieldIsActiveChancePercent?: number; + faceShieldIsActiveChancePercent?: number /** Chance gun flashlight is active during the day */ - lightIsActiveDayChancePercent?: number; + lightIsActiveDayChancePercent?: number /** Chance gun flashlight is active during the night */ - lightIsActiveNightChancePercent?: number; + lightIsActiveNightChancePercent?: number /** Chance gun laser is active during the day */ - laserIsActiveChancePercent?: number; + laserIsActiveChancePercent?: number /** Chance NODS are down/active during the day */ - nvgIsActiveChanceDayPercent?: number; + nvgIsActiveChanceDayPercent?: number /** Chance NODS are down/active during the night */ - nvgIsActiveChanceNightPercent?: number; - forceOnlyArmoredRigWhenNoArmor?: boolean; + nvgIsActiveChanceNightPercent?: number + forceOnlyArmoredRigWhenNoArmor?: boolean /** Should plates be filtered by level */ - filterPlatesByLevel?: boolean; + filterPlatesByLevel?: boolean /** What additional slot ids should be seen as required when choosing a mod to add to a weapon */ - weaponSlotIdsToMakeRequired?: string[]; + weaponSlotIdsToMakeRequired?: string[] /** Adjust weighting/chances of items on bot by level of bot */ - randomisation: RandomisationDetails[]; + randomisation: RandomisationDetails[] /** Blacklist equipment by level of bot */ - blacklist: EquipmentFilterDetails[]; + blacklist: EquipmentFilterDetails[] /** Whitelist equipment by level of bot */ - whitelist: EquipmentFilterDetails[]; + whitelist: EquipmentFilterDetails[] /** Adjust equipment/ammo */ - weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]; + weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[] /** Same as weightingAdjustments but based on player level instead of bot level */ - weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]; + weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[] /** Should the stock mod be forced to spawn on bot */ - forceStock?: boolean; - armorPlateWeighting?: IArmorPlateWeights[]; + forceStock?: boolean + armorPlateWeighting?: IArmorPlateWeights[] } export interface ModLimits { /** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */ - scopeLimit?: number; + scopeLimit?: number /** How many lasers or lights are allowed on a weapon - hard coded to work with TACTICAL_COMBO, and FLASHLIGHT */ - lightLaserLimit?: number; + lightLaserLimit?: number } export interface RandomisationDetails { /** Between what levels do these randomisation setting apply to */ - levelRange: MinMax; - generation?: Record; + levelRange: MinMax + generation?: Record /** Mod slots that should be fully randomised -ignores mods from bottype.json and instaed creates a pool using items.json */ - randomisedWeaponModSlots?: string[]; + randomisedWeaponModSlots?: string[] /** Armor slots that should be randomised e.g. 'Headwear, Armband' */ - randomisedArmorSlots?: string[]; + randomisedArmorSlots?: string[] /** Equipment chances */ - equipment?: Record; + equipment?: Record /** Weapon mod chances */ - weaponMods?: Record; + weaponMods?: Record /** Equipment mod chances */ - equipmentMods?: Record; + equipmentMods?: Record } export interface EquipmentFilterDetails { /** Between what levels do these equipment filter setting apply to */ - levelRange: MinMax; + levelRange: MinMax /** Key: mod slot name e.g. mod_magazine, value: item tpls */ - equipment: Record; + equipment: Record /** Key: cartridge type e.g. Caliber23x75, value: item tpls */ - cartridge: Record; + cartridge: Record } export interface WeightingAdjustmentDetails { /** Between what levels do these weight settings apply to */ - levelRange: MinMax; + levelRange: MinMax /** Key: ammo type e.g. Caliber556x45NATO, value: item tpl + weight */ - ammo?: IAdjustmentDetails; + ammo?: IAdjustmentDetails /** Key: equipment slot e.g. TacticalVest, value: item tpl + weight */ - equipment?: IAdjustmentDetails; + equipment?: IAdjustmentDetails /** Key: clothing slot e.g. feet, value: item tpl + weight */ - clothing?: IAdjustmentDetails; + clothing?: IAdjustmentDetails } export interface IAdjustmentDetails { - add: Record>; - edit: Record>; + add: Record> + edit: Record> } export interface IArmorPlateWeights extends Record { - levelRange: MinMax; + levelRange: MinMax } export interface IRandomisedResourceDetails { - food: IRandomisedResourceValues; - meds: IRandomisedResourceValues; + food: IRandomisedResourceValues + meds: IRandomisedResourceValues } export interface IRandomisedResourceValues { - /** Minimum percent of item to randomized between min and max resource*/ - resourcePercent: number; + /** Minimum percent of item to randomized between min and max resource */ + resourcePercent: number /** Chance for randomization to not occur */ - chanceMaxResourcePercent: number; + chanceMaxResourcePercent: number } diff --git a/project/src/models/spt/config/IBotDurability.ts b/project/src/models/spt/config/IBotDurability.ts index fab49064..92b25859 100644 --- a/project/src/models/spt/config/IBotDurability.ts +++ b/project/src/models/spt/config/IBotDurability.ts @@ -1,61 +1,61 @@ export interface IBotDurability { - default: DefaultDurability; - pmc: PmcDurability; - boss: BotDurability; - follower: BotDurability; - assault: BotDurability; - cursedassault: BotDurability; - marksman: BotDurability; - pmcbot: BotDurability; - arenafighterevent: BotDurability; - arenafighter: BotDurability; - crazyassaultevent: BotDurability; - exusec: BotDurability; - gifter: BotDurability; - sectantpriest: BotDurability; - sectantwarrior: BotDurability; + default: DefaultDurability + pmc: PmcDurability + boss: BotDurability + follower: BotDurability + assault: BotDurability + cursedassault: BotDurability + marksman: BotDurability + pmcbot: BotDurability + arenafighterevent: BotDurability + arenafighter: BotDurability + crazyassaultevent: BotDurability + exusec: BotDurability + gifter: BotDurability + sectantpriest: BotDurability + sectantwarrior: BotDurability } /** Durability values to be used when a more specific bot type cant be found */ export interface DefaultDurability { - armor: ArmorDurability; - weapon: WeaponDurability; + armor: ArmorDurability + weapon: WeaponDurability } export interface PmcDurability { - armor: PmcDurabilityArmor; - weapon: WeaponDurability; + armor: PmcDurabilityArmor + weapon: WeaponDurability } export interface PmcDurabilityArmor { - lowestMaxPercent: number; - highestMaxPercent: number; - maxDelta: number; - minDelta: number; + lowestMaxPercent: number + highestMaxPercent: number + maxDelta: number + minDelta: number } export interface BotDurability { - armor: ArmorDurability; - weapon: WeaponDurability; + armor: ArmorDurability + weapon: WeaponDurability } export interface ArmorDurability { - maxDelta: number; - minDelta: number; - minLimitPercent: number; + maxDelta: number + minDelta: number + minLimitPercent: number } export interface WeaponDurability { - lowestMax: number; - highestMax: number; - maxDelta: number; - minDelta: number; - minLimitPercent: number; + lowestMax: number + highestMax: number + maxDelta: number + minDelta: number + minLimitPercent: number } diff --git a/project/src/models/spt/config/ICoreConfig.ts b/project/src/models/spt/config/ICoreConfig.ts index 21f61368..374655bb 100644 --- a/project/src/models/spt/config/ICoreConfig.ts +++ b/project/src/models/spt/config/ICoreConfig.ts @@ -2,22 +2,22 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ICoreConfig extends IBaseConfig { - kind: "aki-core"; - akiVersion: string; - projectName: string; - compatibleTarkovVersion: string; - serverName: string; - profileSaveIntervalSeconds: number; - sptFriendNickname: string; - allowProfileWipe: boolean; - bsgLogging: IBsgLogging; - release: IRelease; - fixes: IGameFixes; - features: IServerFeatures; + kind: "aki-core" + akiVersion: string + projectName: string + compatibleTarkovVersion: string + serverName: string + profileSaveIntervalSeconds: number + sptFriendNickname: string + allowProfileWipe: boolean + bsgLogging: IBsgLogging + release: IRelease + fixes: IGameFixes + features: IServerFeatures /** Commit hash build server was created from */ - commit?: string; + commit?: string /** Timestamp of server build */ - buildTime?: string; + buildTime?: string } export interface IBsgLogging @@ -34,67 +34,67 @@ export interface IBsgLogging * 5 - fatal * 6 - off */ - verbosity: number; + verbosity: number // Should we send the logging to the server - sendToServer: boolean; + sendToServer: boolean } export interface IRelease { // Disclaimer outlining the intended usage of bleeding edge - betaDisclaimerText?: string; + betaDisclaimerText?: string // Text logged when users agreed to terms - betaDisclaimerAcceptText: string; + betaDisclaimerAcceptText: string // Server mods loaded message - serverModsLoadedText: string; + serverModsLoadedText: string // Server mods loaded debug message text - serverModsLoadedDebugText: string; + serverModsLoadedDebugText: string // Client mods loaded message - clientModsLoadedText: string; + clientModsLoadedText: string // Client mods loaded debug message text - clientModsLoadedDebugText: string; + clientModsLoadedDebugText: string // Illegal plugins log message - illegalPluginsLoadedText: string; + illegalPluginsLoadedText: string // Illegal plugins exception - illegalPluginsExceptionText: string; + illegalPluginsExceptionText: string // Summary of release changes - releaseSummaryText?: string; + releaseSummaryText?: string // Enables the cool watermark in-game - isBeta?: boolean; + isBeta?: boolean // Whether mods are enabled - isModdable?: boolean; + isModdable?: boolean // Are mods loaded on the server? - isModded: boolean; + isModded: boolean // How long before the messagebox times out and closes the game - betaDisclaimerTimeoutDelay: number; + betaDisclaimerTimeoutDelay: number } export interface IGameFixes { /** Shotguns use a different value than normal guns causing huge pellet dispersion */ - fixShotgunDispersion: boolean; - /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ - removeModItemsFromProfile: boolean; + fixShotgunDispersion: boolean + /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load */ + removeModItemsFromProfile: boolean /** Fix issues that cause the game to not start due to inventory item issues */ - fixProfileBreakingInventoryItemIssues: boolean; + fixProfileBreakingInventoryItemIssues: boolean } export interface IServerFeatures { /* Controls whether or not the server attempts to download mod dependencies not included in the server's executable */ - autoInstallModDependencies: boolean; - compressProfile: boolean; - chatbotFeatures: IChatbotFeatures; + autoInstallModDependencies: boolean + compressProfile: boolean + chatbotFeatures: IChatbotFeatures } export interface IChatbotFeatures { - sptFriendEnabled: boolean; - commandoEnabled: boolean; - commandoFeatures: ICommandoFeatures; + sptFriendEnabled: boolean + commandoEnabled: boolean + commandoFeatures: ICommandoFeatures } export interface ICommandoFeatures { - giveCommandEnabled: boolean; + giveCommandEnabled: boolean } diff --git a/project/src/models/spt/config/IGiftsConfig.ts b/project/src/models/spt/config/IGiftsConfig.ts index c9ee799f..6e335bc4 100644 --- a/project/src/models/spt/config/IGiftsConfig.ts +++ b/project/src/models/spt/config/IGiftsConfig.ts @@ -8,28 +8,28 @@ import { IProfileChangeEvent } from "../dialog/ISendMessageDetails"; export interface IGiftsConfig extends IBaseConfig { - kind: "aki-gifts"; - gifts: Record; + kind: "aki-gifts" + gifts: Record } export interface Gift { /** Items to send to player */ - items: Item[]; + items: Item[] /** Who is sending the gift to player */ - sender: GiftSenderType; + sender: GiftSenderType /** Optinal - supply a users id to send from, not necessary when sending from SYSTEM or TRADER */ - senderId?: string; - senderDetails: IUserDialogInfo; + senderId?: string + senderDetails: IUserDialogInfo /** Optional - supply a trader type to send from, not necessary when sending from SYSTEM or USER */ - trader?: Traders; - messageText: string; + trader?: Traders + messageText: string /** Optional - if sending text from the client locale file */ - localeTextId?: string; + localeTextId?: string /** Optional - Used by Seasonal events to send on specific day */ - timestampToSend?: number; - associatedEvent: SeasonalEventType; - collectionTimeHours: number; + timestampToSend?: number + associatedEvent: SeasonalEventType + collectionTimeHours: number /** Optional, can be used to change profile settings like level/skills */ - profileChangeEvents?: IProfileChangeEvent[]; + profileChangeEvents?: IProfileChangeEvent[] } diff --git a/project/src/models/spt/config/IHealthConfig.ts b/project/src/models/spt/config/IHealthConfig.ts index 33a62d96..913e2727 100644 --- a/project/src/models/spt/config/IHealthConfig.ts +++ b/project/src/models/spt/config/IHealthConfig.ts @@ -2,19 +2,19 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHealthConfig extends IBaseConfig { - kind: "aki-health"; - healthMultipliers: HealthMultipliers; - save: Save; + kind: "aki-health" + healthMultipliers: HealthMultipliers + save: Save } export interface HealthMultipliers { - death: number; - blacked: number; + death: number + blacked: number } export interface Save { - health: boolean; - effects: boolean; + health: boolean + effects: boolean } diff --git a/project/src/models/spt/config/IHideoutConfig.ts b/project/src/models/spt/config/IHideoutConfig.ts index 0fc1caca..84493dd7 100644 --- a/project/src/models/spt/config/IHideoutConfig.ts +++ b/project/src/models/spt/config/IHideoutConfig.ts @@ -2,15 +2,15 @@ import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBas export interface IHideoutConfig extends IBaseConfig { - kind: "aki-hideout"; + kind: "aki-hideout" /** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */ - runIntervalSeconds: number; + runIntervalSeconds: number /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; - hoursForSkillCrafting: number; - expCraftAmount: number; - overrideCraftTimeSeconds: number; - overrideBuildTimeSeconds: number; + runIntervalValues: IRunIntervalValues + hoursForSkillCrafting: number + expCraftAmount: number + overrideCraftTimeSeconds: number + overrideBuildTimeSeconds: number /** Only process a profiles hideout crafts when it has been active in the last x minutes */ - updateProfileHideoutWhenActiveWithinMinutes: number; + updateProfileHideoutWhenActiveWithinMinutes: number } diff --git a/project/src/models/spt/config/IHttpConfig.ts b/project/src/models/spt/config/IHttpConfig.ts index f1130624..b27e3ffc 100644 --- a/project/src/models/spt/config/IHttpConfig.ts +++ b/project/src/models/spt/config/IHttpConfig.ts @@ -2,15 +2,15 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IHttpConfig extends IBaseConfig { - kind: "aki-http"; + kind: "aki-http" /** Address used by webserver */ - ip: string; - port: number; + ip: string + port: number /** Address used by game client to connect to */ - backendIp: string; - backendPort: string; - webSocketPingDelayMs: number; - logRequests: boolean; + backendIp: string + backendPort: string + webSocketPingDelayMs: number + logRequests: boolean /** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */ - serverImagePathOverride: Record; + serverImagePathOverride: Record } diff --git a/project/src/models/spt/config/IInRaidConfig.ts b/project/src/models/spt/config/IInRaidConfig.ts index f3dd433a..d77aff9b 100644 --- a/project/src/models/spt/config/IInRaidConfig.ts +++ b/project/src/models/spt/config/IInRaidConfig.ts @@ -2,44 +2,44 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInRaidConfig extends IBaseConfig { - kind: "aki-inraid"; - MIAOnRaidEnd: boolean; + kind: "aki-inraid" + MIAOnRaidEnd: boolean /** Overrides to apply to the pre-raid settings screen */ - raidMenuSettings: RaidMenuSettings; + raidMenuSettings: RaidMenuSettings /** What effects should be saved post-raid */ - save: Save; + save: Save /** Names of car extracts */ - carExtracts: string[]; + carExtracts: string[] /** Names of coop extracts */ - coopExtracts: string[]; + coopExtracts: string[] /** Fence rep gain from a single car extract */ - carExtractBaseStandingGain: number; + carExtractBaseStandingGain: number /** Fence rep gain from a single coop extract */ - coopExtractBaseStandingGain: number; + coopExtractBaseStandingGain: number /** Fence rep gain when successfully extracting as pscav */ - scavExtractGain: number; + scavExtractGain: number /** The likelihood of PMC eliminating a minimum of 2 scavs while you engage them as a pscav. */ - pmcKillProbabilityForScavGain: number; + pmcKillProbabilityForScavGain: number /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ - keepFiRSecureContainerOnDeath: boolean; + keepFiRSecureContainerOnDeath: boolean /** Percentage chance a player scav hot is hostile to the player when scavving */ - playerScavHostileChancePercent: number; + playerScavHostileChancePercent: number } export interface RaidMenuSettings { - aiAmount: string; - aiDifficulty: string; - bossEnabled: boolean; - scavWars: boolean; - taggedAndCursed: boolean; - enablePve: boolean; - randomWeather: boolean; - randomTime: boolean; + aiAmount: string + aiDifficulty: string + bossEnabled: boolean + scavWars: boolean + taggedAndCursed: boolean + enablePve: boolean + randomWeather: boolean + randomTime: boolean } export interface Save { /** Should loot gained from raid be saved */ - loot: boolean; + loot: boolean } diff --git a/project/src/models/spt/config/IInsuranceConfig.ts b/project/src/models/spt/config/IInsuranceConfig.ts index 40855ae1..a6d9fbb1 100644 --- a/project/src/models/spt/config/IInsuranceConfig.ts +++ b/project/src/models/spt/config/IInsuranceConfig.ts @@ -2,21 +2,21 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInsuranceConfig extends IBaseConfig { - kind: "aki-insurance"; + kind: "aki-insurance" /** Insurance price multiplier */ - insuranceMultiplier: Record; + insuranceMultiplier: Record /** Chance item is returned as insurance, keyed by trader id */ - returnChancePercent: Record; + returnChancePercent: Record /** Item slots that should never be returned as insurance */ - blacklistedEquipment: string[]; + blacklistedEquipment: string[] /** Some slots should always be removed, e.g. 'cartridges' */ - slotIdsToAlwaysRemove: string[]; + slotIdsToAlwaysRemove: string[] /** Override to control how quickly insurance is processed/returned in second */ - returnTimeOverrideSeconds: number; + returnTimeOverrideSeconds: number /** How often server should process insurance in seconds */ - runIntervalSeconds: number; + runIntervalSeconds: number // Lowest rouble price for an attachment to be allowed to be taken - minAttachmentRoublePriceToBeTaken: number; + minAttachmentRoublePriceToBeTaken: number // Chance out of 100% no attachments from a parent are taken - chanceNoAttachmentsTakenPercent: number; + chanceNoAttachmentsTakenPercent: number } diff --git a/project/src/models/spt/config/IInventoryConfig.ts b/project/src/models/spt/config/IInventoryConfig.ts index a2b10d9a..d2d4ac8b 100644 --- a/project/src/models/spt/config/IInventoryConfig.ts +++ b/project/src/models/spt/config/IInventoryConfig.ts @@ -3,33 +3,33 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IInventoryConfig extends IBaseConfig { - kind: "aki-inventory"; + kind: "aki-inventory" /** Should new items purchased by flagged as found in raid */ - newItemsMarkedFound: boolean; - randomLootContainers: Record; - sealedAirdropContainer: ISealedAirdropContainerSettings; + newItemsMarkedFound: boolean + randomLootContainers: Record + sealedAirdropContainer: ISealedAirdropContainerSettings /** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */ - customMoneyTpls: string[]; + customMoneyTpls: string[] /** Multipliers for skill gain when inside menus, NOT in-game */ - skillGainMultiplers: Record; + skillGainMultiplers: Record } export interface RewardDetails { - rewardCount: number; - foundInRaid: boolean; - rewardTplPool?: Record; - rewardTypePool?: Record; + rewardCount: number + foundInRaid: boolean + rewardTplPool?: Record + rewardTypePool?: Record } export interface ISealedAirdropContainerSettings { - weaponRewardWeight: Record; - defaultPresetsOnly: boolean; + weaponRewardWeight: Record + defaultPresetsOnly: boolean /** Should contents be flagged as found in raid when opened */ - foundInRaid: boolean; - weaponModRewardLimits: Record; - rewardTypeLimits: Record; - ammoBoxWhitelist: string[]; - allowBossItems: boolean; + foundInRaid: boolean + weaponModRewardLimits: Record + rewardTypeLimits: Record + ammoBoxWhitelist: string[] + allowBossItems: boolean } diff --git a/project/src/models/spt/config/IItemConfig.ts b/project/src/models/spt/config/IItemConfig.ts index ff0d1deb..44301552 100644 --- a/project/src/models/spt/config/IItemConfig.ts +++ b/project/src/models/spt/config/IItemConfig.ts @@ -2,12 +2,12 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IItemConfig extends IBaseConfig { - kind: "aki-item"; + kind: "aki-item" /** Items that should be globally blacklisted */ - blacklist: string[]; + blacklist: string[] /** items that should not be given as rewards */ - rewardItemBlacklist: string[]; + rewardItemBlacklist: string[] /** Items that can only be found on bosses */ - bossItems: string[]; - handbookPriceOverride: Record; + bossItems: string[] + handbookPriceOverride: Record } diff --git a/project/src/models/spt/config/ILocaleConfig.ts b/project/src/models/spt/config/ILocaleConfig.ts index 5dc68990..ca216494 100644 --- a/project/src/models/spt/config/ILocaleConfig.ts +++ b/project/src/models/spt/config/ILocaleConfig.ts @@ -2,12 +2,12 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocaleConfig extends IBaseConfig { - kind: "aki-locale"; + kind: "aki-locale" /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ - gameLocale: string; + gameLocale: string /** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */ - serverLocale: string; + serverLocale: string /** Languages server can be translated into */ - serverSupportedLocales: string[]; - fallbacks: { [locale: string]: string; }; + serverSupportedLocales: string[] + fallbacks: { [locale: string]: string } } diff --git a/project/src/models/spt/config/ILocationConfig.ts b/project/src/models/spt/config/ILocationConfig.ts index e282ba0f..4694d744 100644 --- a/project/src/models/spt/config/ILocationConfig.ts +++ b/project/src/models/spt/config/ILocationConfig.ts @@ -4,147 +4,147 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILocationConfig extends IBaseConfig { - kind: "aki-location"; + kind: "aki-location" /** Waves with a min/max of the same value don't spawn any bots, bsg only spawn the difference between min and max */ - fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings; + fixEmptyBotWavesSettings: IFixEmptyBotWavesSettings /** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */ - rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings; + rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings /** When a map has hit max alive bots, any wave that should spawn will be reduced to 1 bot in size and placed in a spawn queue, this splits waves into smaller sizes to reduce the impact of this behaviour */ - splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings; - looseLootMultiplier: LootMultiplier; - staticLootMultiplier: LootMultiplier; + splitWaveIntoSingleSpawnsSettings: ISplitWaveSettings + looseLootMultiplier: LootMultiplier + staticLootMultiplier: LootMultiplier /** Custom bot waves to add to a locations base json on game start if addCustomBotWavesToMaps is true */ - customWaves: CustomWaves; + customWaves: CustomWaves /** Open zones to add to map */ - openZones: Record; + openZones: Record /** Key = map id, value = item tpls that should only have one forced loot spawn position */ - forcedLootSingleSpawnById: Record; + forcedLootSingleSpawnById: Record /** How many attempts should be taken to fit an item into a container before giving up */ - fitLootIntoContainerAttempts: number; + fitLootIntoContainerAttempts: number /** Add all possible zones to each maps `OpenZones` property */ - addOpenZonesToAllMaps: boolean; - /** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves*/ - addCustomBotWavesToMaps: boolean; + addOpenZonesToAllMaps: boolean + /** Allow addition of custom bot waves designed by SPT to be added to maps - defined in configs/location.json.customWaves */ + addCustomBotWavesToMaps: boolean /** Should the limits defined inside botTypeLimits to appled to locations on game start */ - enableBotTypeLimits: boolean; - /** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true*/ - botTypeLimits: Record; + enableBotTypeLimits: boolean + /** Add limits to a locations base.MinMaxBots array if enableBotTypeLimits is true */ + botTypeLimits: Record /** container randomisation settings */ - containerRandomisationSettings: IContainerRandomistionSettings; - /** How full must a random loose magazine be %*/ - minFillLooseMagazinePercent: number; - /** How full must a random static magazine be %*/ - minFillStaticMagazinePercent: number; - allowDuplicateItemsInStaticContainers: boolean; + containerRandomisationSettings: IContainerRandomistionSettings + /** How full must a random loose magazine be % */ + minFillLooseMagazinePercent: number + /** How full must a random static magazine be % */ + minFillStaticMagazinePercent: number + allowDuplicateItemsInStaticContainers: boolean /** Chance loose magazines have ammo in them TODO - rename to dynamicMagazineLootHasAmmoChancePercent */ - magazineLootHasAmmoChancePercent: number; + magazineLootHasAmmoChancePercent: number /** Chance static magazines have ammo in them */ - staticMagazineLootHasAmmoChancePercent: number; + staticMagazineLootHasAmmoChancePercent: number /** Key: map, value: loose loot ids to ignore */ - looseLootBlacklist: Record; - /** Key: map, value: settings to control how long scav raids are*/ - scavRaidTimeSettings: IScavRaidTimeSettings; + looseLootBlacklist: Record + /** Key: map, value: settings to control how long scav raids are */ + scavRaidTimeSettings: IScavRaidTimeSettings /** Settings to adjust mods for lootable equipment in raid */ - equipmentLootSettings: IEquipmentLootSettings; - /** Sets the max Patrol Value of the Boxzone on the map Ground Zero*/ - sandboxMaxPatrolvalue: number; + equipmentLootSettings: IEquipmentLootSettings + /** Sets the max Patrol Value of the Boxzone on the map Ground Zero */ + sandboxMaxPatrolvalue: number } export interface IEquipmentLootSettings { // Percentage chance item will be added to equipment - modSpawnChancePercent: Record; + modSpawnChancePercent: Record } export interface IFixEmptyBotWavesSettings { - enabled: boolean; - ignoreMaps: string[]; + enabled: boolean + ignoreMaps: string[] } export interface IRogueLighthouseSpawnTimeSettings { - enabled: boolean; - waitTimeSeconds: number; + enabled: boolean + waitTimeSeconds: number } export interface ISplitWaveSettings { - enabled: boolean; - ignoreMaps: string[]; - waveSizeThreshold: number; + enabled: boolean + ignoreMaps: string[] + waveSizeThreshold: number } export interface CustomWaves { /** Bosses spawn on raid start */ - boss: Record; - normal: Record; + boss: Record + normal: Record } export interface IBotTypeLimit extends MinMax { - type: string; + type: string } /** Multiplier to apply to the loot count for a given map */ export interface LootMultiplier { - bigmap: number; - develop: number; + bigmap: number + develop: number // eslint-disable-next-line @typescript-eslint/naming-convention - factory4_day: number; + factory4_day: number // eslint-disable-next-line @typescript-eslint/naming-convention - factory4_night: number; - interchange: number; - laboratory: number; - rezervbase: number; - shoreline: number; - woods: number; - hideout: number; - lighthouse: number; - privatearea: number; - suburbs: number; - tarkovstreets: number; - terminal: number; - town: number; - sandbox: number; + factory4_night: number + interchange: number + laboratory: number + rezervbase: number + shoreline: number + woods: number + hideout: number + lighthouse: number + privatearea: number + suburbs: number + tarkovstreets: number + terminal: number + town: number + sandbox: number } export interface IContainerRandomistionSettings { - enabled: boolean; + enabled: boolean /** What maps can use the container randomisation feature */ - maps: Record; + maps: Record /** Some container types don't work when randomised */ - containerTypesToNotRandomise: string[]; - containerGroupMinSizeMultiplier: number; - containerGroupMaxSizeMultiplier: number; + containerTypesToNotRandomise: string[] + containerGroupMinSizeMultiplier: number + containerGroupMaxSizeMultiplier: number } export interface IScavRaidTimeSettings { - settings: IScavRaidTimeConfigSettings; - maps: Record; + settings: IScavRaidTimeConfigSettings + maps: Record } export interface IScavRaidTimeConfigSettings { - trainArrivalDelayObservedSeconds: number; + trainArrivalDelayObservedSeconds: number } export interface IScavRaidTimeLocationSettings { /** Should loot be reduced by same percent length of raid is reduced by */ - reduceLootByPercent: boolean; + reduceLootByPercent: boolean /** Smallest % of container loot that should be spawned */ - minStaticLootPercent: number; + minStaticLootPercent: number /** Smallest % of loose loot that should be spawned */ - minDynamicLootPercent: number; + minDynamicLootPercent: number /** Chance raid time is reduced */ - reducedChancePercent: number; + reducedChancePercent: number /** How much should raid time be reduced - weighted */ - reductionPercentWeights: Record; + reductionPercentWeights: Record /** Should bot waves be removed / spawn times be adjusted */ - adjustWaves: boolean; + adjustWaves: boolean } diff --git a/project/src/models/spt/config/ILootConfig.ts b/project/src/models/spt/config/ILootConfig.ts index d8ac9cab..6bc1b328 100644 --- a/project/src/models/spt/config/ILootConfig.ts +++ b/project/src/models/spt/config/ILootConfig.ts @@ -3,9 +3,9 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILootConfig extends IBaseConfig { - kind: "aki-loot"; + kind: "aki-loot" /** Spawn positions to add into a map, key=mapid */ - looseLoot: Record; + looseLoot: Record /** Loose loot probability adjustments to apply on game start */ - looseLootSpawnPointAdjustments: Record>; + looseLootSpawnPointAdjustments: Record> } diff --git a/project/src/models/spt/config/ILostOnDeathConfig.ts b/project/src/models/spt/config/ILostOnDeathConfig.ts index 6dc9a561..029f426d 100644 --- a/project/src/models/spt/config/ILostOnDeathConfig.ts +++ b/project/src/models/spt/config/ILostOnDeathConfig.ts @@ -2,28 +2,28 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ILostOnDeathConfig extends IBaseConfig { - kind: "aki-lostondeath"; + kind: "aki-lostondeath" /** What equipment in each slot should be lost on death */ - equipment: Equipment; + equipment: Equipment /** Should special slot items be removed from quest inventory on death e.g. wifi camera/markers */ - specialSlotItems: boolean; + specialSlotItems: boolean /** Should quest items be removed from quest inventory on death */ - questItems: boolean; + questItems: boolean } export interface Equipment { - ArmBand: boolean; - Headwear: boolean; - Earpiece: boolean; - FaceCover: boolean; - ArmorVest: boolean; - Eyewear: boolean; - TacticalVest: boolean; - PocketItems: boolean; - Backpack: boolean; - Holster: boolean; - FirstPrimaryWeapon: boolean; - SecondPrimaryWeapon: boolean; - Scabbard: boolean; + ArmBand: boolean + Headwear: boolean + Earpiece: boolean + FaceCover: boolean + ArmorVest: boolean + Eyewear: boolean + TacticalVest: boolean + PocketItems: boolean + Backpack: boolean + Holster: boolean + FirstPrimaryWeapon: boolean + SecondPrimaryWeapon: boolean + Scabbard: boolean } diff --git a/project/src/models/spt/config/IMatchConfig.ts b/project/src/models/spt/config/IMatchConfig.ts index 6b42237a..61bccbe2 100644 --- a/project/src/models/spt/config/IMatchConfig.ts +++ b/project/src/models/spt/config/IMatchConfig.ts @@ -2,6 +2,6 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IMatchConfig extends IBaseConfig { - kind: "aki-match"; - enabled: boolean; + kind: "aki-match" + enabled: boolean } diff --git a/project/src/models/spt/config/IPlayerScavConfig.ts b/project/src/models/spt/config/IPlayerScavConfig.ts index 65fdde08..2f853075 100644 --- a/project/src/models/spt/config/IPlayerScavConfig.ts +++ b/project/src/models/spt/config/IPlayerScavConfig.ts @@ -3,31 +3,31 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPlayerScavConfig extends IBaseConfig { - kind: "aki-playerscav"; - karmaLevel: Record; + kind: "aki-playerscav" + karmaLevel: Record } export interface KarmaLevel { - botTypeForLoot: string; - modifiers: Modifiers; - itemLimits: ItemLimits; - equipmentBlacklist: Record; - lootItemsToAddChancePercent: Record; + botTypeForLoot: string + modifiers: Modifiers + itemLimits: ItemLimits + equipmentBlacklist: Record + lootItemsToAddChancePercent: Record } export interface Modifiers { - equipment: Record; - mod: Record; + equipment: Record + mod: Record } export interface ItemLimits { - healing: GenerationData; - drugs: GenerationData; - stims: GenerationData; - looseLoot: GenerationData; - magazines: GenerationData; - grenades: GenerationData; + healing: GenerationData + drugs: GenerationData + stims: GenerationData + looseLoot: GenerationData + magazines: GenerationData + grenades: GenerationData } diff --git a/project/src/models/spt/config/IPmChatResponse.ts b/project/src/models/spt/config/IPmChatResponse.ts index 5aebb6cd..39995c2b 100644 --- a/project/src/models/spt/config/IPmChatResponse.ts +++ b/project/src/models/spt/config/IPmChatResponse.ts @@ -2,16 +2,16 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcChatResponse extends IBaseConfig { - kind: "aki-pmcchatresponse"; - victim: IResponseSettings; - killer: IResponseSettings; + kind: "aki-pmcchatresponse" + victim: IResponseSettings + killer: IResponseSettings } export interface IResponseSettings { - responseChancePercent: number; - responseTypeWeights: Record; - stripCapitalisationChancePercent: number; - allCapsChancePercent: number; - appendBroToMessageEndChancePercent: number; + responseChancePercent: number + responseTypeWeights: Record + stripCapitalisationChancePercent: number + allCapsChancePercent: number + appendBroToMessageEndChancePercent: number } diff --git a/project/src/models/spt/config/IPmcConfig.ts b/project/src/models/spt/config/IPmcConfig.ts index 90f2238d..71632591 100644 --- a/project/src/models/spt/config/IPmcConfig.ts +++ b/project/src/models/spt/config/IPmcConfig.ts @@ -4,63 +4,63 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IPmcConfig extends IBaseConfig { - kind: "aki-pmc"; + kind: "aki-pmc" /** What game version should the PMC have */ - gameVersionWeight: Record; + gameVersionWeight: Record /** What account type should the PMC have */ - accountTypeWeight: Record; + accountTypeWeight: Record /** Global whitelist/blacklist of vest loot for PMCs */ - vestLoot: SlotLootSettings; + vestLoot: SlotLootSettings /** Global whitelist/blacklist of pocket loot for PMCs */ - pocketLoot: SlotLootSettings; + pocketLoot: SlotLootSettings /** Global whitelist/blacklist of backpack loot for PMCs */ - backpackLoot: SlotLootSettings; + backpackLoot: SlotLootSettings /** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */ - useDifficultyOverride: boolean; + useDifficultyOverride: boolean /** Difficulty override e.g. "AsOnline/Hard" */ - difficulty: string; + difficulty: string /** Chance out of 100 to have a complete gun in backpack */ - looseWeaponInBackpackChancePercent: number; + looseWeaponInBackpackChancePercent: number /** Chance out of 100 to have an enhancement applied to PMC weapon */ - weaponHasEnhancementChancePercent: number; + weaponHasEnhancementChancePercent: number /** MinMax count of weapons to have in backpack */ - looseWeaponInBackpackLootMinMax: MinMax; + looseWeaponInBackpackLootMinMax: MinMax /** Percentage chance PMC will be USEC */ - isUsec: number; + isUsec: number /** WildSpawnType enum value USEC PMCs use */ - usecType: string; + usecType: string /** WildSpawnType enum value BEAR PMCs use */ - bearType: string; - chanceSameSideIsHostilePercent: number; + bearType: string + chanceSameSideIsHostilePercent: number /** What 'brain' does a PMC use, keyed by map and side (USEC/BEAR) key: map location, value: type for usec/bear */ - pmcType: Record>>; - maxBackpackLootTotalRub: number; - maxPocketLootTotalRub: number; - maxVestLootTotalRub: number; + pmcType: Record>> + maxBackpackLootTotalRub: number + maxPocketLootTotalRub: number + maxVestLootTotalRub: number /** Percentage chance a bot from a wave is converted into a PMC, key = bot wildspawn tpye (assault/exusec), value: min+max chance to be converted */ - convertIntoPmcChance: Record; + convertIntoPmcChance: Record /** WildSpawnType bots PMCs should see as hostile */ - enemyTypes: string[]; + enemyTypes: string[] /** How many levels above player level can a PMC be */ - botRelativeLevelDeltaMax: number; + botRelativeLevelDeltaMax: number /** How many levels below player level can a PMC be */ - botRelativeLevelDeltaMin: number; + botRelativeLevelDeltaMin: number /** Force a number of healing items into PMCs secure container to ensure they can heal */ - forceHealingItemsIntoSecure: boolean; - allPMCsHavePlayerNameWithRandomPrefixChance: number; - locationSpecificPmcLevelOverride: Record; + forceHealingItemsIntoSecure: boolean + allPMCsHavePlayerNameWithRandomPrefixChance: number + locationSpecificPmcLevelOverride: Record /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ - addSecureContainerLootFromBotConfig: boolean; + addSecureContainerLootFromBotConfig: boolean } export interface PmcTypes { - usec: string; - bear: string; + usec: string + bear: string } export interface SlotLootSettings { - whitelist: string[]; - blacklist: string[]; + whitelist: string[] + blacklist: string[] } diff --git a/project/src/models/spt/config/IQuestConfig.ts b/project/src/models/spt/config/IQuestConfig.ts index 3dc95f90..1e6fa308 100644 --- a/project/src/models/spt/config/IQuestConfig.ts +++ b/project/src/models/spt/config/IQuestConfig.ts @@ -5,178 +5,178 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IQuestConfig extends IBaseConfig { - kind: "aki-quest"; + kind: "aki-quest" // Hours to get/redeem items from quest mail - redeemTime: number; - questTemplateIds: IPlayerTypeQuestIds; + redeemTime: number + questTemplateIds: IPlayerTypeQuestIds /** Show non-seasonal quests be shown to player */ - showNonSeasonalEventQuests: boolean; - eventQuests: Record; - repeatableQuests: IRepeatableQuestConfig[]; - locationIdMap: Record; - bearOnlyQuests: string[]; - usecOnlyQuests: string[]; + showNonSeasonalEventQuests: boolean + eventQuests: Record + repeatableQuests: IRepeatableQuestConfig[] + locationIdMap: Record + bearOnlyQuests: string[] + usecOnlyQuests: string[] } export interface IPlayerTypeQuestIds { - pmc: IQuestTypeIds; - scav: IQuestTypeIds; + pmc: IQuestTypeIds + scav: IQuestTypeIds } export interface IQuestTypeIds { - Elimination: string; - Completion: string; - Exploration: string; + Elimination: string + Completion: string + Exploration: string } export interface IEventQuestData { - name: string; - season: SeasonalEventType; - startTimestamp: number; - endTimestamp: number; - yearly: boolean; + name: string + season: SeasonalEventType + startTimestamp: number + endTimestamp: number + yearly: boolean } export interface IRepeatableQuestConfig { - id: string; - name: string; - side: string; - types: string[]; - resetTime: number; - numQuests: number; - minPlayerLevel: number; - rewardScaling: IRewardScaling; - locations: Record; - traderWhitelist: ITraderWhitelist[]; - questConfig: IRepeatableQuestTypesConfig; + id: string + name: string + side: string + types: string[] + resetTime: number + numQuests: number + minPlayerLevel: number + rewardScaling: IRewardScaling + locations: Record + traderWhitelist: ITraderWhitelist[] + questConfig: IRepeatableQuestTypesConfig /** Item base types to block when generating rewards */ - rewardBaseTypeBlacklist: string[]; + rewardBaseTypeBlacklist: string[] /** Item tplIds to ignore when generating rewards */ - rewardBlacklist: string[]; - rewardAmmoStackMinSize: number; + rewardBlacklist: string[] + rewardAmmoStackMinSize: number } export interface IRewardScaling { - levels: number[]; - experience: number[]; - roubles: number[]; - items: number[]; - reputation: number[]; - rewardSpread: number; - skillRewardChance: number[]; - skillPointReward: number[]; + levels: number[] + experience: number[] + roubles: number[] + items: number[] + reputation: number[] + rewardSpread: number + skillRewardChance: number[] + skillPointReward: number[] } export interface ITraderWhitelist { - traderId: string; - questTypes: string[]; - rewardBaseWhitelist: string[]; - rewardCanBeWeapon: boolean; - weaponRewardChancePercent: number; + traderId: string + questTypes: string[] + rewardBaseWhitelist: string[] + rewardCanBeWeapon: boolean + weaponRewardChancePercent: number } export interface IRepeatableQuestTypesConfig { - Exploration: IExploration; - Completion: ICompletion; - Pickup: IPickup; - Elimination: IEliminationConfig[]; + Exploration: IExploration + Completion: ICompletion + Pickup: IPickup + Elimination: IEliminationConfig[] } export interface IExploration extends IBaseQuestConfig { - maxExtracts: number; - maxExtractsWithSpecificExit: number; - specificExits: ISpecificExits; + maxExtracts: number + maxExtractsWithSpecificExit: number + specificExits: ISpecificExits } export interface ISpecificExits { - probability: number; - passageRequirementWhitelist: string[]; + probability: number + passageRequirementWhitelist: string[] } export interface ICompletion extends IBaseQuestConfig { - minRequestedAmount: number; - maxRequestedAmount: number; - uniqueItemCount: number; - minRequestedBulletAmount: number; - maxRequestedBulletAmount: number; - useWhitelist: boolean; - useBlacklist: boolean; + minRequestedAmount: number + maxRequestedAmount: number + uniqueItemCount: number + minRequestedBulletAmount: number + maxRequestedBulletAmount: number + useWhitelist: boolean + useBlacklist: boolean } export interface IPickup extends IBaseQuestConfig { - ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[]; + ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[] } export interface IPickupTypeWithMaxCount { - itemType: string; - maxPickupCount: number; - minPickupCount: number; + itemType: string + maxPickupCount: number + minPickupCount: number } export interface IEliminationConfig extends IBaseQuestConfig { - levelRange: MinMax; - targets: ITarget[]; - bodyPartProb: number; - bodyParts: IBodyPart[]; - specificLocationProb: number; - distLocationBlacklist: string[]; - distProb: number; - maxDist: number; - minDist: number; - maxKills: number; - minKills: number; - minBossKills: number; - maxBossKills: number; - minPmcKills: number; - maxPmcKills: number; - weaponCategoryRequirementProb: number; - weaponCategoryRequirements: IWeaponRequirement[]; - weaponRequirementProb: number; - weaponRequirements: IWeaponRequirement[]; + levelRange: MinMax + targets: ITarget[] + bodyPartProb: number + bodyParts: IBodyPart[] + specificLocationProb: number + distLocationBlacklist: string[] + distProb: number + maxDist: number + minDist: number + maxKills: number + minKills: number + minBossKills: number + maxBossKills: number + minPmcKills: number + maxPmcKills: number + weaponCategoryRequirementProb: number + weaponCategoryRequirements: IWeaponRequirement[] + weaponRequirementProb: number + weaponRequirements: IWeaponRequirement[] } export interface IBaseQuestConfig { - possibleSkillRewards: string[]; + possibleSkillRewards: string[] } export interface ITarget extends IProbabilityObject { - data: IBossInfo; + data: IBossInfo } export interface IBossInfo { - isBoss: boolean; - isPmc: boolean; + isBoss: boolean + isPmc: boolean } export interface IBodyPart extends IProbabilityObject { - data: string[]; + data: string[] } export interface IWeaponRequirement extends IProbabilityObject { - data: string[]; + data: string[] } export interface IProbabilityObject { - key: string; - relativeProbability: number; - data?: any; + key: string + relativeProbability: number + data?: any } diff --git a/project/src/models/spt/config/IRagfairConfig.ts b/project/src/models/spt/config/IRagfairConfig.ts index a08a8532..99df9af0 100644 --- a/project/src/models/spt/config/IRagfairConfig.ts +++ b/project/src/models/spt/config/IRagfairConfig.ts @@ -3,183 +3,183 @@ import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBas export interface IRagfairConfig extends IBaseConfig { - kind: "aki-ragfair"; + kind: "aki-ragfair" /** How many seconds should pass before expired offers and procesed + player offers checked if sold */ - runIntervalSeconds: number; + runIntervalSeconds: number /** Default values used to hydrate `runIntervalSeconds` with */ - runIntervalValues: IRunIntervalValues; + runIntervalValues: IRunIntervalValues /** Player listing settings */ - sell: Sell; - /** Trader ids + should their assorts be listed on flea*/ - traders: Record; - dynamic: Dynamic; + sell: Sell + /** Trader ids + should their assorts be listed on flea */ + traders: Record + dynamic: Dynamic } export interface Sell { /** Should a fee be deducted from player when liting an item for sale */ - fees: boolean; + fees: boolean /** Settings to control chances of offer being sold */ - chance: Chance; + chance: Chance /** Settings to control how long it takes for a player offer to sell */ - time: MinMax; - /**Seconds from clicking remove to remove offer from market */ - expireSeconds: number; + time: MinMax + /** Seconds from clicking remove to remove offer from market */ + expireSeconds: number } export interface Chance { /** Base chance percent to sell an item */ - base: number; + base: number /** Value to multiply the sell chance by */ - sellMultiplier: number; + sellMultiplier: number /** Max possible sell chance % for a player listed offer */ - maxSellChancePercent: number; + maxSellChancePercent: number /** Min possible sell chance % for a player listed offer */ - minSellChancePercent: number; + minSellChancePercent: number } export interface Dynamic { // Should a purchased dynamic offers items be flagged as found in raid - purchasesAreFoundInRaid: boolean; + purchasesAreFoundInRaid: boolean /** Use the highest trader price for an offer if its greater than the price in templates/prices.json */ - useTraderPriceForOffersIfHigher: boolean; + useTraderPriceForOffersIfHigher: boolean /** Barter offer specific settings */ - barter: IBarterDetails; - pack: IPackDetails; + barter: IBarterDetails + pack: IPackDetails /** Dynamic offer price below handbook adjustment values */ - offerAdjustment: OfferAdjustment; + offerAdjustment: OfferAdjustment /** How many offers should expire before an offer regeneration occurs */ - expiredOfferThreshold: number; + expiredOfferThreshold: number /** How many offers should be listed */ - offerItemCount: MinMax; + offerItemCount: MinMax /** How much should the price of an offer vary by (percent 0.8 = 80%, 1.2 = 120%) */ - priceRanges: IPriceRanges; + priceRanges: IPriceRanges /** Should default presets to listed only or should non-standard presets found in globals.json be listed too */ - showDefaultPresetsOnly: boolean; - endTimeSeconds: MinMax; + showDefaultPresetsOnly: boolean + endTimeSeconds: MinMax /** Settings to control the durability range of item items listed on flea */ - condition: Condition; + condition: Condition /** Size stackable items should be listed for in percent of max stack size */ - stackablePercent: MinMax; + stackablePercent: MinMax /** Items that cannot be stacked can have multiples sold in one offer, what range of values can be listed */ - nonStackableCount: MinMax; + nonStackableCount: MinMax /** Range of rating offers for items being listed */ - rating: MinMax; + rating: MinMax /** Armor specific flea settings */ - armor: IArmorSettings; + armor: IArmorSettings /** A multipler to apply to individual tpls price just prior to item quality adjustment */ - itemPriceMultiplier: Record; + itemPriceMultiplier: Record /** Percentages to sell offers in each currency */ - currencies: Record; + currencies: Record /** Item tpls that should be forced to sell as a single item */ - showAsSingleStack: string[]; + showAsSingleStack: string[] /** Should christmas/halloween items be removed from flea when not within the seasonal bounds */ - removeSeasonalItemsWhenNotInEvent: boolean; + removeSeasonalItemsWhenNotInEvent: boolean /** Flea blacklist settings */ - blacklist: Blacklist; + blacklist: Blacklist /** Dict of price limits keyed by item type */ - unreasonableModPrices: Record; + unreasonableModPrices: Record } export interface IPriceRanges { - default: MinMax; - preset: MinMax; - pack: MinMax; + default: MinMax + preset: MinMax + pack: MinMax } export interface IBarterDetails { /** Percentage change an offer is listed as a barter */ - chancePercent: number; + chancePercent: number /** Min number of required items for a barter requirement */ - itemCountMin: number; + itemCountMin: number /** Max number of required items for a barter requirement */ - itemCountMax: number; + itemCountMax: number /** How much can the total price of requested items vary from the item offered */ - priceRangeVariancePercent: number; + priceRangeVariancePercent: number /** Min rouble price for an offer to be considered for turning into a barter */ - minRoubleCostToBecomeBarter: number; + minRoubleCostToBecomeBarter: number /** Item Tpls to never be turned into a barter */ - itemTypeBlacklist: string[]; + itemTypeBlacklist: string[] } export interface IPackDetails { /** Percentage change an offer is listed as a pack */ - chancePercent: number; + chancePercent: number /** Min number of required items for a pack */ - itemCountMin: number; + itemCountMin: number /** Max number of required items for a pack */ - itemCountMax: number; + itemCountMax: number /** item types to allow being a pack */ - itemTypeWhitelist: string[]; + itemTypeWhitelist: string[] } export interface OfferAdjustment { /** Shuld offer price be adjusted when below handbook price */ - adjustPriceWhenBelowHandbookPrice: boolean; + adjustPriceWhenBelowHandbookPrice: boolean /** How big a percentage difference does price need to vary from handbook to be considered for adjustment */ - maxPriceDifferenceBelowHandbookPercent: number; + maxPriceDifferenceBelowHandbookPercent: number /** How much to multiply the handbook price to get the new price */ - handbookPriceMultipier: number; + handbookPriceMultipier: number /** What is the minimum rouble price to consider adjusting price of item */ - priceThreshholdRub: number; + priceThreshholdRub: number } export interface Condition { /** Percentage change durability is altered */ - conditionChance: number; - current: MinMax; - max: MinMax; + conditionChance: number + current: MinMax + max: MinMax } export interface Blacklist { /** Damaged ammo packs */ - damagedAmmoPacks: boolean; + damagedAmmoPacks: boolean /** Custom blacklist for item Tpls */ - custom: string[]; + custom: string[] /** BSG blacklist a large number of items from flea, true = use blacklist */ - enableBsgList: boolean; + enableBsgList: boolean /** Should quest items be blacklisted from flea */ - enableQuestList: boolean; + enableQuestList: boolean /** Should trader items that are blacklisted by bsg be listed on flea */ - traderItems: boolean; + traderItems: boolean /** Maximum level an armor plate can be found in a flea-listed armor item */ - armorPlate: IArmorPlateBlacklistSettings; + armorPlate: IArmorPlateBlacklistSettings /** Should specific categories be blacklisted from the flea, true = use blacklist */ - enableCustomItemCategoryList: boolean; + enableCustomItemCategoryList: boolean /** Custom category blacklist for parent Ids */ - customItemCategoryList: string[]; + customItemCategoryList: string[] } export interface IArmorPlateBlacklistSettings { /** Max level of plates an armor can have without being removed */ - maxProtectionLevel: number; + maxProtectionLevel: number /** Item slots to NOT remove from items on flea */ - ignoreSlots: string[]; + ignoreSlots: string[] } export interface IUnreasonableModPrices { /** Enable a system that adjusts very high ragfair prices to be below a max multiple of items the handbook values */ - enabled: boolean; + enabled: boolean /** Multipler to start adjusting item values from, e.g. a value of 10 means any value over 10x the handbook price gets adjusted */ - handbookPriceOverMultiplier: number; + handbookPriceOverMultiplier: number /** The new multiplier for items found using above property, e.g. a value of 4 means set items price to 4x handbook price */ - newPriceHandbookMultiplier: number; + newPriceHandbookMultiplier: number } export interface IArmorSettings { /** % chance / 100 that armor plates will be removed from an offer before listing */ - removeRemovablePlateChance: number; + removeRemovablePlateChance: number /** What slots are to be removed when removeRemovablePlateChance is true */ - plateSlotIdToRemovePool: string[]; + plateSlotIdToRemovePool: string[] } diff --git a/project/src/models/spt/config/IRepairConfig.ts b/project/src/models/spt/config/IRepairConfig.ts index d004147f..b8a7a2e7 100644 --- a/project/src/models/spt/config/IRepairConfig.ts +++ b/project/src/models/spt/config/IRepairConfig.ts @@ -3,60 +3,60 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IRepairConfig extends IBaseConfig { - kind: "aki-repair"; - priceMultiplier: number; - applyRandomizeDurabilityLoss: boolean; - weaponSkillRepairGain: number; - armorKitSkillPointGainPerRepairPointMultiplier: number; + kind: "aki-repair" + priceMultiplier: number + applyRandomizeDurabilityLoss: boolean + weaponSkillRepairGain: number + armorKitSkillPointGainPerRepairPointMultiplier: number /** INT gain multiplier per repaired item type */ - repairKitIntellectGainMultiplier: IIntellectGainValues; + repairKitIntellectGainMultiplier: IIntellectGainValues // ** How much INT can be given to player per repair action */ - maxIntellectGainPerRepair: IMaxIntellectGainValues; - weaponTreatment: IWeaponTreatmentRepairValues; - repairKit: RepairKit; + maxIntellectGainPerRepair: IMaxIntellectGainValues + weaponTreatment: IWeaponTreatmentRepairValues + repairKit: RepairKit } export interface IIntellectGainValues { - weapon: number; - armor: number; + weapon: number + armor: number } export interface IMaxIntellectGainValues { - kit: number; - trader: number; + kit: number + trader: number } export interface IWeaponTreatmentRepairValues { /** The chance to gain more weapon maintenance skill */ - critSuccessChance: number; - critSuccessAmount: number; + critSuccessChance: number + critSuccessAmount: number /** The chance to gain less weapon maintenance skill */ - critFailureChance: number; - critFailureAmount: number; + critFailureChance: number + critFailureAmount: number /** The multiplier used for calculating weapon maintenance XP */ - pointGainMultiplier: number; + pointGainMultiplier: number } export interface RepairKit { - armor: BonusSettings; - weapon: BonusSettings; + armor: BonusSettings + weapon: BonusSettings } export interface BonusSettings { - rarityWeight: Record; - bonusTypeWeight: Record; - common: Record; - rare: Record; + rarityWeight: Record + bonusTypeWeight: Record + common: Record + rare: Record } export interface BonusValues { - valuesMinMax: MinMax; + valuesMinMax: MinMax /** What dura is buff active between (min max of current max) */ - activeDurabilityPercentMinMax: MinMax; + activeDurabilityPercentMinMax: MinMax } diff --git a/project/src/models/spt/config/IScavCaseConfig.ts b/project/src/models/spt/config/IScavCaseConfig.ts index 0d3c8265..81e9fc6f 100644 --- a/project/src/models/spt/config/IScavCaseConfig.ts +++ b/project/src/models/spt/config/IScavCaseConfig.ts @@ -3,36 +3,36 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IScavCaseConfig extends IBaseConfig { - kind: "aki-scavcase"; - rewardItemValueRangeRub: Record; - moneyRewards: MoneyRewards; - ammoRewards: AmmoRewards; - rewardItemParentBlacklist: string[]; - rewardItemBlacklist: string[]; - allowMultipleMoneyRewardsPerRarity: boolean; - allowMultipleAmmoRewardsPerRarity: boolean; - allowBossItemsAsRewards: boolean; + kind: "aki-scavcase" + rewardItemValueRangeRub: Record + moneyRewards: MoneyRewards + ammoRewards: AmmoRewards + rewardItemParentBlacklist: string[] + rewardItemBlacklist: string[] + allowMultipleMoneyRewardsPerRarity: boolean + allowMultipleAmmoRewardsPerRarity: boolean + allowBossItemsAsRewards: boolean } export interface MoneyRewards { - moneyRewardChancePercent: number; - rubCount: MoneyLevels; - usdCount: MoneyLevels; - eurCount: MoneyLevels; + moneyRewardChancePercent: number + rubCount: MoneyLevels + usdCount: MoneyLevels + eurCount: MoneyLevels } export interface MoneyLevels { - common: MinMax; - rare: MinMax; - superrare: MinMax; + common: MinMax + rare: MinMax + superrare: MinMax } export interface AmmoRewards { - ammoRewardChancePercent: number; - ammoRewardBlacklist: Record; - ammoRewardValueRangeRub: Record; - minStackSize: number; + ammoRewardChancePercent: number + ammoRewardBlacklist: Record + ammoRewardValueRangeRub: Record + minStackSize: number } diff --git a/project/src/models/spt/config/ISeasonalEventConfig.ts b/project/src/models/spt/config/ISeasonalEventConfig.ts index 925a8b8a..ac05df15 100644 --- a/project/src/models/spt/config/ISeasonalEventConfig.ts +++ b/project/src/models/spt/config/ISeasonalEventConfig.ts @@ -4,29 +4,29 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { - kind: "aki-seasonalevents"; - enableSeasonalEventDetection: boolean; + kind: "aki-seasonalevents" + enableSeasonalEventDetection: boolean /** event / botType / equipSlot / itemid */ - eventGear: Record>>>; - events: ISeasonalEvent[]; - eventBotMapping: Record; - eventBossSpawns: Record>; - gifterSettings: GifterSetting[]; + eventGear: Record>>> + events: ISeasonalEvent[] + eventBotMapping: Record + eventBossSpawns: Record> + gifterSettings: GifterSetting[] } export interface ISeasonalEvent { - name: string; - type: SeasonalEventType; - startDay: number; - startMonth: number; - endDay: number; - endMonth: number; + name: string + type: SeasonalEventType + startDay: number + startMonth: number + endDay: number + endMonth: number } export interface GifterSetting { - map: string; - zones: string; - spawnChance: number; + map: string + zones: string + spawnChance: number } diff --git a/project/src/models/spt/config/ITraderConfig.ts b/project/src/models/spt/config/ITraderConfig.ts index a4e98cb2..f5bba0a5 100644 --- a/project/src/models/spt/config/ITraderConfig.ts +++ b/project/src/models/spt/config/ITraderConfig.ts @@ -4,73 +4,73 @@ import { LootRequest } from "@spt-aki/models/spt/services/LootRequest"; export interface ITraderConfig extends IBaseConfig { - kind: "aki-trader"; - updateTime: UpdateTime[]; - purchasesAreFoundInRaid: boolean; + kind: "aki-trader" + updateTime: UpdateTime[] + purchasesAreFoundInRaid: boolean /** Should trader reset times be set based on server start time (false = bsg time - on the hour) */ - tradersResetFromServerStart: boolean; - updateTimeDefault: number; - traderPriceMultipler: number; - fence: FenceConfig; + tradersResetFromServerStart: boolean + updateTimeDefault: number + traderPriceMultipler: number + fence: FenceConfig } export interface UpdateTime { - traderId: string; + traderId: string /** Seconds between trader resets */ - seconds: MinMax; + seconds: MinMax } export interface FenceConfig { - discountOptions: DiscountOptions; - partialRefreshTimeSeconds: number; - partialRefreshChangePercent: number; - assortSize: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; - itemPriceMult: number; - presetPriceMult: number; - armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax; - weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax; - chancePlateExistsInArmorPercent: number; + discountOptions: DiscountOptions + partialRefreshTimeSeconds: number + partialRefreshChangePercent: number + assortSize: number + weaponPresetMinMax: MinMax + equipmentPresetMinMax: MinMax + itemPriceMult: number + presetPriceMult: number + armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax + weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax + chancePlateExistsInArmorPercent: number /** Key: item tpl */ - itemStackSizeOverrideMinMax: Record; - itemTypeLimits: Record; - /** Prevent duplicate offers of items of specific categories by parentId*/ - preventDuplicateOffersOfCategory: string[]; - regenerateAssortsOnRefresh: boolean; + itemStackSizeOverrideMinMax: Record + itemTypeLimits: Record + /** Prevent duplicate offers of items of specific categories by parentId */ + preventDuplicateOffersOfCategory: string[] + regenerateAssortsOnRefresh: boolean /** Max rouble price before item is not listed on flea */ - itemCategoryRoublePriceLimit: Record; + itemCategoryRoublePriceLimit: Record /** Each slotid with % to be removed prior to listing on fence */ - presetSlotsToRemoveChancePercent: Record; + presetSlotsToRemoveChancePercent: Record /** Block seasonal items from appearing when season is inactive */ - blacklistSeasonalItems: boolean; + blacklistSeasonalItems: boolean /** Max pen value allowed to be listed on flea - affects ammo + ammo boxes */ - ammoMaxPenLimit: number; - blacklist: string[]; - coopExtractGift: CoopExtractReward; - btrDeliveryExpireHours: number; + ammoMaxPenLimit: number + blacklist: string[] + coopExtractGift: CoopExtractReward + btrDeliveryExpireHours: number } export interface IItemDurabilityCurrentMax { - current: MinMax; - max: MinMax; + current: MinMax + max: MinMax } export interface CoopExtractReward extends LootRequest { - sendGift: boolean; - messageLocaleIds: string[]; - giftExpiryHours: number; + sendGift: boolean + messageLocaleIds: string[] + giftExpiryHours: number } export interface DiscountOptions { - assortSize: number; - itemPriceMult: number; - presetPriceMult: number; - weaponPresetMinMax: MinMax; - equipmentPresetMinMax: MinMax; + assortSize: number + itemPriceMult: number + presetPriceMult: number + weaponPresetMinMax: MinMax + equipmentPresetMinMax: MinMax } diff --git a/project/src/models/spt/config/IWeatherConfig.ts b/project/src/models/spt/config/IWeatherConfig.ts index a818fbb8..e27c1469 100644 --- a/project/src/models/spt/config/IWeatherConfig.ts +++ b/project/src/models/spt/config/IWeatherConfig.ts @@ -5,38 +5,38 @@ import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { - kind: "aki-weather"; - acceleration: number; - weather: Weather; - seasonDates: ISeasonDateTimes[]; - overrideSeason?: Season; + kind: "aki-weather" + acceleration: number + weather: Weather + seasonDates: ISeasonDateTimes[] + overrideSeason?: Season } export interface ISeasonDateTimes { - seasonType: Season; - name: string; - startDay: number; - startMonth: number; - endDay: number; - endMonth: number; + seasonType: Season + name: string + startDay: number + startMonth: number + endDay: number + endMonth: number } export interface Weather { - clouds: WeatherSettings; - windSpeed: WeatherSettings; - windDirection: WeatherSettings; - windGustiness: MinMax; - rain: WeatherSettings; - rainIntensity: MinMax; - fog: WeatherSettings; - temp: MinMax; - pressure: MinMax; + clouds: WeatherSettings + windSpeed: WeatherSettings + windDirection: WeatherSettings + windGustiness: MinMax + rain: WeatherSettings + rainIntensity: MinMax + fog: WeatherSettings + temp: MinMax + pressure: MinMax } export interface WeatherSettings { - values: T[]; - weights: number[]; + values: T[] + weights: number[] } diff --git a/project/src/models/spt/controllers/IBotController.ts b/project/src/models/spt/controllers/IBotController.ts index 0d8dc3e3..55e85698 100644 --- a/project/src/models/spt/controllers/IBotController.ts +++ b/project/src/models/spt/controllers/IBotController.ts @@ -5,11 +5,11 @@ import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; export interface IBotController { - getBotLimit(type: string): number; - getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty; - isBotPmc(botRole: string): boolean; - isBotBoss(botRole: string): boolean; - isBotFollower(botRole: string): boolean; - generate(info: IGenerateBotsRequestData, playerScav: boolean): IBotBase[]; - getBotCap(): number; + getBotLimit(type: string): number + getBotDifficulty(type: string, difficulty: string): IBotCore | Difficulty + isBotPmc(botRole: string): boolean + isBotBoss(botRole: string): boolean + isBotFollower(botRole: string): boolean + generate(info: IGenerateBotsRequestData, playerScav: boolean): IBotBase[] + getBotCap(): number } diff --git a/project/src/models/spt/dialog/ISendMessageDetails.ts b/project/src/models/spt/dialog/ISendMessageDetails.ts index 13d8957e..ee90a621 100644 --- a/project/src/models/spt/dialog/ISendMessageDetails.ts +++ b/project/src/models/spt/dialog/ISendMessageDetails.ts @@ -6,37 +6,37 @@ import { Traders } from "@spt-aki/models/enums/Traders"; export interface ISendMessageDetails { /** Player id */ - recipientId: string; + recipientId: string /** Who is sending this message */ - sender: MessageType; + sender: MessageType /** Optional - leave blank to use sender value */ - dialogType?: MessageType; + dialogType?: MessageType /** Optional - if sender is USER these details are used */ - senderDetails?: IUserDialogInfo; + senderDetails?: IUserDialogInfo /** Optional - the trader sending the message */ - trader?: Traders; + trader?: Traders /** Optional - used in player/system messages, otherwise templateId is used */ - messageText?: string; + messageText?: string /** Optinal - Items to send to player */ - items?: Item[]; + items?: Item[] /** Optional - How long items will be stored in mail before expiry */ - itemsMaxStorageLifetimeSeconds?: number; + itemsMaxStorageLifetimeSeconds?: number /** Optional - Used when sending messages from traders who send text from locale json */ - templateId?: string; + templateId?: string /** Optional - ragfair related */ - systemData?: ISystemData; + systemData?: ISystemData /** Optional - Used by ragfair messages */ - ragfairDetails?: MessageContentRagfair; + ragfairDetails?: MessageContentRagfair /** OPTIONAL - allows modification of profile settings via mail */ - profileChangeEvents?: IProfileChangeEvent[]; + profileChangeEvents?: IProfileChangeEvent[] } export interface IProfileChangeEvent { - _id: string; - Type: ProfileChangeEventType; - value: number; - entity?: string; + _id: string + Type: ProfileChangeEventType + value: number + entity?: string } export enum ProfileChangeEventType diff --git a/project/src/models/spt/fence/ICreateFenceAssortsResult.ts b/project/src/models/spt/fence/ICreateFenceAssortsResult.ts index b81fd1cb..fc6a4350 100644 --- a/project/src/models/spt/fence/ICreateFenceAssortsResult.ts +++ b/project/src/models/spt/fence/ICreateFenceAssortsResult.ts @@ -3,7 +3,7 @@ import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader"; export interface ICreateFenceAssortsResult { - sptItems: Item[][]; - barter_scheme: Record; - loyal_level_items: Record; + sptItems: Item[][] + barter_scheme: Record + loyal_level_items: Record } diff --git a/project/src/models/spt/fence/IFenceAssortGenerationValues.ts b/project/src/models/spt/fence/IFenceAssortGenerationValues.ts index 05e3cfd6..cfb9474a 100644 --- a/project/src/models/spt/fence/IFenceAssortGenerationValues.ts +++ b/project/src/models/spt/fence/IFenceAssortGenerationValues.ts @@ -1,12 +1,12 @@ export interface IFenceAssortGenerationValues { - normal: IGenerationAssortValues; - discount: IGenerationAssortValues; + normal: IGenerationAssortValues + discount: IGenerationAssortValues } export interface IGenerationAssortValues { - item: number; - weaponPreset: number; - equipmentPreset: number; + item: number + weaponPreset: number + equipmentPreset: number } diff --git a/project/src/models/spt/generators/IBotGenerator.ts b/project/src/models/spt/generators/IBotGenerator.ts index f8704707..7a12b84d 100644 --- a/project/src/models/spt/generators/IBotGenerator.ts +++ b/project/src/models/spt/generators/IBotGenerator.ts @@ -9,5 +9,5 @@ export interface IBotGenerator generation: Generation, botRole: string, isPmc: boolean, - ): PmcInventory; + ): PmcInventory } diff --git a/project/src/models/spt/generators/ILocationGenerator.ts b/project/src/models/spt/generators/ILocationGenerator.ts index 6f0f4892..5b5c1734 100644 --- a/project/src/models/spt/generators/ILocationGenerator.ts +++ b/project/src/models/spt/generators/ILocationGenerator.ts @@ -14,10 +14,10 @@ export interface ILocationGenerator staticLootDist: Record, staticAmmoDist: Record, locationName: string, - ): IStaticContainerProps; + ): IStaticContainerProps generateDynamicLoot( dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string, - ): SpawnpointTemplate[]; + ): SpawnpointTemplate[] } diff --git a/project/src/models/spt/generators/IPMCLootGenerator.ts b/project/src/models/spt/generators/IPMCLootGenerator.ts index c8e34713..60a5126d 100644 --- a/project/src/models/spt/generators/IPMCLootGenerator.ts +++ b/project/src/models/spt/generators/IPMCLootGenerator.ts @@ -1,5 +1,5 @@ export interface IPMCLootGenerator { - generatePMCPocketLootPool(): string[]; - generatePMCBackpackLootPool(): string[]; + generatePMCPocketLootPool(): string[] + generatePMCBackpackLootPool(): string[] } diff --git a/project/src/models/spt/generators/IRagfairAssortGenerator.ts b/project/src/models/spt/generators/IRagfairAssortGenerator.ts index a472b38c..64f23a48 100644 --- a/project/src/models/spt/generators/IRagfairAssortGenerator.ts +++ b/project/src/models/spt/generators/IRagfairAssortGenerator.ts @@ -2,5 +2,5 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IRagfairAssortGenerator { - getAssortItems(): Item[]; + getAssortItems(): Item[] } diff --git a/project/src/models/spt/generators/IRagfairOfferGenerator.ts b/project/src/models/spt/generators/IRagfairOfferGenerator.ts index a6aa2906..f1b208be 100644 --- a/project/src/models/spt/generators/IRagfairOfferGenerator.ts +++ b/project/src/models/spt/generators/IRagfairOfferGenerator.ts @@ -12,5 +12,5 @@ export interface IRagfairOfferGenerator loyalLevel: number, price: number, sellInOnePiece: boolean, - ): IRagfairOffer; + ): IRagfairOffer } diff --git a/project/src/models/spt/hideout/ScavCaseRewardCountsAndPrices.ts b/project/src/models/spt/hideout/ScavCaseRewardCountsAndPrices.ts index 8a25efa0..a8647713 100644 --- a/project/src/models/spt/hideout/ScavCaseRewardCountsAndPrices.ts +++ b/project/src/models/spt/hideout/ScavCaseRewardCountsAndPrices.ts @@ -1,14 +1,14 @@ export interface ScavCaseRewardCountsAndPrices { - Common: RewardCountAndPriceDetails; - Rare: RewardCountAndPriceDetails; - Superrare: RewardCountAndPriceDetails; + Common: RewardCountAndPriceDetails + Rare: RewardCountAndPriceDetails + Superrare: RewardCountAndPriceDetails } export interface RewardCountAndPriceDetails { - minCount: number; - maxCount: number; - minPriceRub: number; - maxPriceRub: number; + minCount: number + maxCount: number + minPriceRub: number + maxPriceRub: number } diff --git a/project/src/models/spt/location/IRaidChanges.ts b/project/src/models/spt/location/IRaidChanges.ts index da32fe1e..bc06c304 100644 --- a/project/src/models/spt/location/IRaidChanges.ts +++ b/project/src/models/spt/location/IRaidChanges.ts @@ -1,9 +1,9 @@ export interface IRaidChanges { /** What percentage of dynamic loot should the map contain */ - dynamicLootPercent: number; + dynamicLootPercent: number /** What percentage of static loot should the map contain */ - staticLootPercent: number; + staticLootPercent: number /** How many seconds into the raid is the player simulated to spawn in at */ - simulatedRaidStartSeconds: number; + simulatedRaidStartSeconds: number } diff --git a/project/src/models/spt/logging/IClientLogRequest.ts b/project/src/models/spt/logging/IClientLogRequest.ts index 7fe31dc1..fa8b82af 100644 --- a/project/src/models/spt/logging/IClientLogRequest.ts +++ b/project/src/models/spt/logging/IClientLogRequest.ts @@ -2,9 +2,9 @@ import { LogLevel } from "@spt-aki/models/spt/logging/LogLevel"; export interface IClientLogRequest { - Source: string; - Level: LogLevel | string; - Message: string; - Color?: string; - BackgroundColor?: string; + Source: string + Level: LogLevel | string + Message: string + Color?: string + BackgroundColor?: string } diff --git a/project/src/models/spt/logging/SptLogger.ts b/project/src/models/spt/logging/SptLogger.ts index 34bf845b..85bf4ad0 100644 --- a/project/src/models/spt/logging/SptLogger.ts +++ b/project/src/models/spt/logging/SptLogger.ts @@ -1,8 +1,8 @@ export interface SptLogger { - error: (msg: string | Record) => void; - warn: (msg: string | Record) => void; - succ?: (msg: string | Record) => void; - info: (msg: string | Record) => void; - debug: (msg: string | Record) => void; + error: (msg: string | Record) => void + warn: (msg: string | Record) => void + succ?: (msg: string | Record) => void + info: (msg: string | Record) => void + debug: (msg: string | Record) => void } diff --git a/project/src/models/spt/mod/IModLoader.ts b/project/src/models/spt/mod/IModLoader.ts index 786bdd2e..5636e91a 100644 --- a/project/src/models/spt/mod/IModLoader.ts +++ b/project/src/models/spt/mod/IModLoader.ts @@ -2,7 +2,7 @@ import { DependencyContainer } from "tsyringe"; export interface IModLoader { - load(container: DependencyContainer): void; + load(container: DependencyContainer): void - getModPath(mod: string): string; + getModPath(mod: string): string } diff --git a/project/src/models/spt/mod/IPackageJsonData.ts b/project/src/models/spt/mod/IPackageJsonData.ts index 208b3c4f..dd6a8ca8 100644 --- a/project/src/models/spt/mod/IPackageJsonData.ts +++ b/project/src/models/spt/mod/IPackageJsonData.ts @@ -1,20 +1,20 @@ export interface IPackageJsonData { - incompatibilities?: string[]; - loadBefore?: string[]; - loadAfter?: string[]; - dependencies?: Record; - modDependencies?: Record; - name: string; - url: string; - author: string; - version: string; - akiVersion: string; + incompatibilities?: string[] + loadBefore?: string[] + loadAfter?: string[] + dependencies?: Record + modDependencies?: Record + name: string + url: string + author: string + version: string + akiVersion: string /** We deliberately purge this data */ - scripts: Record; - devDependencies: Record; - licence: string; - main: string; - isBundleMod: boolean; - contributors: string[]; + scripts: Record + devDependencies: Record + licence: string + main: string + isBundleMod: boolean + contributors: string[] } diff --git a/project/src/models/spt/ragfair/IRagfairServerPrices.ts b/project/src/models/spt/ragfair/IRagfairServerPrices.ts index aa385dc3..31d45fe3 100644 --- a/project/src/models/spt/ragfair/IRagfairServerPrices.ts +++ b/project/src/models/spt/ragfair/IRagfairServerPrices.ts @@ -1,5 +1,5 @@ export interface IRagfairServerPrices { - static: Record; - dynamic: Record; + static: Record + dynamic: Record } diff --git a/project/src/models/spt/repeatable/IQuestTypePool.ts b/project/src/models/spt/repeatable/IQuestTypePool.ts index 185fbcd9..51d4f3e5 100644 --- a/project/src/models/spt/repeatable/IQuestTypePool.ts +++ b/project/src/models/spt/repeatable/IQuestTypePool.ts @@ -2,43 +2,43 @@ import { ELocationName } from "@spt-aki/models/enums/ELocationName"; export interface IQuestTypePool { - types: string[]; - pool: IQuestPool; + types: string[] + pool: IQuestPool } export interface IQuestPool { - Exploration: IExplorationPool; - Elimination: IEliminationPool; - Pickup: IExplorationPool; + Exploration: IExplorationPool + Elimination: IEliminationPool + Pickup: IExplorationPool } export interface IExplorationPool { - locations: Partial>; + locations: Partial> } export interface IEliminationPool { - targets: IEliminationTargetPool; + targets: IEliminationTargetPool } export interface IEliminationTargetPool { - Savage?: ITargetLocation; - AnyPmc?: ITargetLocation; - bossBully?: ITargetLocation; - bossGluhar?: ITargetLocation; - bossKilla?: ITargetLocation; - bossSanitar?: ITargetLocation; - bossTagilla?: ITargetLocation; - bossKnight?: ITargetLocation; - bossZryachiy?: ITargetLocation; - bossBoar?: ITargetLocation; - bossBoarSniper?: ITargetLocation; + Savage?: ITargetLocation + AnyPmc?: ITargetLocation + bossBully?: ITargetLocation + bossGluhar?: ITargetLocation + bossKilla?: ITargetLocation + bossSanitar?: ITargetLocation + bossTagilla?: ITargetLocation + bossKnight?: ITargetLocation + bossZryachiy?: ITargetLocation + bossBoar?: ITargetLocation + bossBoarSniper?: ITargetLocation } export interface ITargetLocation { - locations: string[]; + locations: string[] } diff --git a/project/src/models/spt/server/ExhaustableArray.ts b/project/src/models/spt/server/ExhaustableArray.ts index 16bdc100..f8277234 100644 --- a/project/src/models/spt/server/ExhaustableArray.ts +++ b/project/src/models/spt/server/ExhaustableArray.ts @@ -48,7 +48,7 @@ export class ExhaustableArray implements IExhaustableArray export interface IExhaustableArray { - getRandomValue(): T; - getFirstValue(): T; - hasValues(): boolean; + getRandomValue(): T + getFirstValue(): T + hasValues(): boolean } diff --git a/project/src/models/spt/server/IDatabaseTables.ts b/project/src/models/spt/server/IDatabaseTables.ts index 0c1a0b69..bb0cf980 100644 --- a/project/src/models/spt/server/IDatabaseTables.ts +++ b/project/src/models/spt/server/IDatabaseTables.ts @@ -24,40 +24,40 @@ import { ISettingsBase } from "@spt-aki/models/spt/server/ISettingsBase"; export interface IDatabaseTables { - bots?: { types: Record; base: IBotBase; core: IBotCore; }; + bots?: { types: Record, base: IBotBase, core: IBotCore } hideout?: { - areas: IHideoutArea[]; - production: IHideoutProduction[]; - scavcase: IHideoutScavCase[]; - settings: IHideoutSettingsBase; - qte: IQteData[]; - }; - locales?: ILocaleBase; - locations?: ILocations; - match?: IMatch; + areas: IHideoutArea[] + production: IHideoutProduction[] + scavcase: IHideoutScavCase[] + settings: IHideoutSettingsBase + qte: IQteData[] + } + locales?: ILocaleBase + locations?: ILocations + match?: IMatch templates?: { - character: string[]; - items: Record; - quests: Record; - repeatableQuests: IRepeatableQuestDatabase; - handbook: IHandbookBase; - customization: Record; + character: string[] + items: Record + quests: Record + repeatableQuests: IRepeatableQuestDatabase + handbook: IHandbookBase + customization: Record /** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */ - profiles: IProfileTemplates; + profiles: IProfileTemplates /** Flea prices of items - gathered from online flea market dump */ - prices: Record; + prices: Record /** Default equipment loadouts that show on main inventory screen */ - defaultEquipmentPresets: IDefaultEquipmentPreset[]; + defaultEquipmentPresets: IDefaultEquipmentPreset[] /** Achievements */ - achievements: IAchievement[]; - }; - traders?: Record; + achievements: IAchievement[] + } + traders?: Record - globals?: IGlobals; - server?: IServerBase; - settings?: ISettingsBase; + globals?: IGlobals + server?: IServerBase + settings?: ISettingsBase } diff --git a/project/src/models/spt/server/ILocaleBase.ts b/project/src/models/spt/server/ILocaleBase.ts index 46498aec..960f5ded 100644 --- a/project/src/models/spt/server/ILocaleBase.ts +++ b/project/src/models/spt/server/ILocaleBase.ts @@ -1,7 +1,7 @@ export interface ILocaleBase { - global: Record>; - menu: Record; - languages: Record; - server: Record>; + global: Record> + menu: Record + languages: Record + server: Record> } diff --git a/project/src/models/spt/server/ILocations.ts b/project/src/models/spt/server/ILocations.ts index 7a6035d0..c5933fe6 100644 --- a/project/src/models/spt/server/ILocations.ts +++ b/project/src/models/spt/server/ILocations.ts @@ -4,24 +4,24 @@ import { ILocationsBase } from "@spt-aki/models/eft/common/tables/ILocationsBase export interface ILocations { - bigmap?: ILocation; - develop?: ILocation; - factory4_day?: ILocation; - factory4_night?: ILocation; - hideout?: ILocation; - interchange?: ILocation; - laboratory?: ILocation; - lighthouse?: ILocation; - privatearea?: ILocation; - rezervbase?: ILocation; - shoreline?: ILocation; - suburbs?: ILocation; - tarkovstreets?: ILocation; - terminal?: ILocation; - town?: ILocation; - woods?: ILocation; - sandbox?: ILocation; - sandbox_high?: ILocation; + bigmap?: ILocation + develop?: ILocation + factory4_day?: ILocation + factory4_night?: ILocation + hideout?: ILocation + interchange?: ILocation + laboratory?: ILocation + lighthouse?: ILocation + privatearea?: ILocation + rezervbase?: ILocation + shoreline?: ILocation + suburbs?: ILocation + tarkovstreets?: ILocation + terminal?: ILocation + town?: ILocation + woods?: ILocation + sandbox?: ILocation + sandbox_high?: ILocation /** Holds a mapping of the linkages between locations on the UI */ - base?: ILocationsBase; + base?: ILocationsBase } diff --git a/project/src/models/spt/server/IServerBase.ts b/project/src/models/spt/server/IServerBase.ts index ebaf84ad..80ba5603 100644 --- a/project/src/models/spt/server/IServerBase.ts +++ b/project/src/models/spt/server/IServerBase.ts @@ -1,5 +1,5 @@ export interface IServerBase { - ip: string; - port: number; + ip: string + port: number } diff --git a/project/src/models/spt/server/ISettingsBase.ts b/project/src/models/spt/server/ISettingsBase.ts index 0fd27a0d..a0df9324 100644 --- a/project/src/models/spt/server/ISettingsBase.ts +++ b/project/src/models/spt/server/ISettingsBase.ts @@ -1,64 +1,64 @@ export interface ISettingsBase { - config: Config; + config: Config } export interface Config { - AFKTimeoutSeconds: number; - AdditionalRandomDelaySeconds: number; - ClientSendRateLimit: number; - CriticalRetriesCount: number; - DefaultRetriesCount: number; - FirstCycleDelaySeconds: number; - FramerateLimit: FramerateLimit; - GroupStatusInterval: number; - GroupStatusButtonInterval: number; - KeepAliveInterval: number; - LobbyKeepAliveInterval: number; - Mark502and504AsNonImportant: boolean; - MemoryManagementSettings: MemoryManagementSettings; - NVidiaHighlights: boolean; - NextCycleDelaySeconds: number; - PingServerResultSendInterval: number; - PingServersInterval: number; - ReleaseProfiler: ReleaseProfiler; - RequestConfirmationTimeouts: number[]; - RequestsMadeThroughLobby: string[]; - SecondCycleDelaySeconds: number; - ShouldEstablishLobbyConnection: boolean; - TurnOffLogging: boolean; - WeaponOverlapDistanceCulling: number; - WebDiagnosticsEnabled: boolean; - NetworkStateView: INetworkStateView; + AFKTimeoutSeconds: number + AdditionalRandomDelaySeconds: number + ClientSendRateLimit: number + CriticalRetriesCount: number + DefaultRetriesCount: number + FirstCycleDelaySeconds: number + FramerateLimit: FramerateLimit + GroupStatusInterval: number + GroupStatusButtonInterval: number + KeepAliveInterval: number + LobbyKeepAliveInterval: number + Mark502and504AsNonImportant: boolean + MemoryManagementSettings: MemoryManagementSettings + NVidiaHighlights: boolean + NextCycleDelaySeconds: number + PingServerResultSendInterval: number + PingServersInterval: number + ReleaseProfiler: ReleaseProfiler + RequestConfirmationTimeouts: number[] + RequestsMadeThroughLobby: string[] + SecondCycleDelaySeconds: number + ShouldEstablishLobbyConnection: boolean + TurnOffLogging: boolean + WeaponOverlapDistanceCulling: number + WebDiagnosticsEnabled: boolean + NetworkStateView: INetworkStateView } export interface FramerateLimit { - MaxFramerateGameLimit: number; - MaxFramerateLobbyLimit: number; - MinFramerateLimit: number; + MaxFramerateGameLimit: number + MaxFramerateLobbyLimit: number + MinFramerateLimit: number } export interface MemoryManagementSettings { - AggressiveGC: boolean; - GigabytesRequiredToDisableGCDuringRaid: number; - HeapPreAllocationEnabled: boolean; - HeapPreAllocationMB: number; - OverrideRamCleanerSettings: boolean; - RamCleanerEnabled: boolean; + AggressiveGC: boolean + GigabytesRequiredToDisableGCDuringRaid: number + HeapPreAllocationEnabled: boolean + HeapPreAllocationMB: number + OverrideRamCleanerSettings: boolean + RamCleanerEnabled: boolean } export interface ReleaseProfiler { - Enabled: boolean; - MaxRecords: number; - RecordTriggerValue: number; + Enabled: boolean + MaxRecords: number + RecordTriggerValue: number } export interface INetworkStateView { - LossThreshold: number; - RttThreshold: number; + LossThreshold: number + RttThreshold: number } diff --git a/project/src/models/spt/services/CustomPreset.ts b/project/src/models/spt/services/CustomPreset.ts index b385f928..276e18a4 100644 --- a/project/src/models/spt/services/CustomPreset.ts +++ b/project/src/models/spt/services/CustomPreset.ts @@ -2,6 +2,6 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; export interface CustomPreset { - key: string; - preset: IPreset; + key: string + preset: IPreset } diff --git a/project/src/models/spt/services/CustomTraderAssortData.ts b/project/src/models/spt/services/CustomTraderAssortData.ts index 19ecc32c..935a3be8 100644 --- a/project/src/models/spt/services/CustomTraderAssortData.ts +++ b/project/src/models/spt/services/CustomTraderAssortData.ts @@ -3,6 +3,6 @@ import { Traders } from "@spt-aki/models/enums/Traders"; export interface CustomTraderAssortData { - traderId: Traders; - assorts: ITraderAssort; + traderId: Traders + assorts: ITraderAssort } diff --git a/project/src/models/spt/services/IInsuranceEquipmentPkg.ts b/project/src/models/spt/services/IInsuranceEquipmentPkg.ts index 8bfd63c4..c902a686 100644 --- a/project/src/models/spt/services/IInsuranceEquipmentPkg.ts +++ b/project/src/models/spt/services/IInsuranceEquipmentPkg.ts @@ -3,8 +3,8 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; export interface IInsuranceEquipmentPkg { - sessionID: string; - pmcData: IPmcData; - itemToReturnToPlayer: Item; - traderId: string; + sessionID: string + pmcData: IPmcData + itemToReturnToPlayer: Item + traderId: string } diff --git a/project/src/models/spt/services/ITraderServiceModel.ts b/project/src/models/spt/services/ITraderServiceModel.ts index dcaecc88..489af54b 100644 --- a/project/src/models/spt/services/ITraderServiceModel.ts +++ b/project/src/models/spt/services/ITraderServiceModel.ts @@ -2,15 +2,15 @@ import { TraderServiceType } from "@spt-aki/models/enums/TraderServiceType"; export interface ITraderServiceModel { - serviceType: TraderServiceType; - itemsToPay?: { [key: string]: number; }; - itemsToReceive?: string[]; - subServices?: { [key: string]: number; }; - requirements?: ITraderServiceRequirementsModel; + serviceType: TraderServiceType + itemsToPay?: { [key: string]: number } + itemsToReceive?: string[] + subServices?: { [key: string]: number } + requirements?: ITraderServiceRequirementsModel } export interface ITraderServiceRequirementsModel { - completedQuests?: string[]; - standings?: { [key: string]: number; }; + completedQuests?: string[] + standings?: { [key: string]: number } } diff --git a/project/src/models/spt/services/LootRequest.ts b/project/src/models/spt/services/LootRequest.ts index eb27ce26..8bb33b0e 100644 --- a/project/src/models/spt/services/LootRequest.ts +++ b/project/src/models/spt/services/LootRequest.ts @@ -2,15 +2,15 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; export interface LootRequest { - weaponPresetCount: MinMax; - armorPresetCount: MinMax; - itemCount: MinMax; - weaponCrateCount: MinMax; - itemBlacklist: string[]; - itemTypeWhitelist: string[]; + weaponPresetCount: MinMax + armorPresetCount: MinMax + itemCount: MinMax + weaponCrateCount: MinMax + itemBlacklist: string[] + itemTypeWhitelist: string[] /** key: item base type: value: max count */ - itemLimits: Record; - itemStackLimits: Record; - armorLevelWhitelist: number[]; - allowBossItems: boolean; + itemLimits: Record + itemStackLimits: Record + armorLevelWhitelist: number[] + allowBossItems: boolean } diff --git a/project/src/models/spt/utils/IAsyncQueue.ts b/project/src/models/spt/utils/IAsyncQueue.ts index c962f3cf..1ea0824e 100644 --- a/project/src/models/spt/utils/IAsyncQueue.ts +++ b/project/src/models/spt/utils/IAsyncQueue.ts @@ -2,5 +2,5 @@ import { ICommand } from "@spt-aki/models/spt/utils/ICommand"; export interface IAsyncQueue { - waitFor(command: ICommand): Promise; + waitFor(command: ICommand): Promise } diff --git a/project/src/models/spt/utils/ICommand.ts b/project/src/models/spt/utils/ICommand.ts index 87c7692f..efe231da 100644 --- a/project/src/models/spt/utils/ICommand.ts +++ b/project/src/models/spt/utils/ICommand.ts @@ -1,5 +1,5 @@ export interface ICommand { - uuid: string; - cmd: () => Promise; + uuid: string + cmd: () => Promise } diff --git a/project/src/models/spt/utils/ILogger.ts b/project/src/models/spt/utils/ILogger.ts index f41acb17..78153231 100644 --- a/project/src/models/spt/utils/ILogger.ts +++ b/project/src/models/spt/utils/ILogger.ts @@ -4,19 +4,19 @@ import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; export interface ILogger { - writeToLogFile(data: string | Daum): void; - log(data: string | Record | Error, color: string, backgroundColor?: string): void; + writeToLogFile(data: string | Daum): void + log(data: string | Record | Error, color: string, backgroundColor?: string): void logWithColor( data: string | Record, textColor: LogTextColor, backgroundColor?: LogBackgroundColor, - ): void; + ): void - error(data: string): void; + error(data: string): void - warning(data: string): void; - success(data: string): void; + warning(data: string): void + success(data: string): void - info(data: string): void; - debug(data: string | Record, onlyShowInConsole?: boolean): void; + info(data: string): void + debug(data: string | Record, onlyShowInConsole?: boolean): void } diff --git a/project/src/routers/EventOutputHolder.ts b/project/src/routers/EventOutputHolder.ts index 2ee581ac..d21eb795 100644 --- a/project/src/routers/EventOutputHolder.ts +++ b/project/src/routers/EventOutputHolder.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; @@ -12,7 +11,7 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export class EventOutputHolder { /** What has client been informed of this game session */ - protected clientActiveSessionStorage: Record = {}; + protected clientActiveSessionStorage: Record = {}; constructor( @inject("JsonUtil") protected jsonUtil: JsonUtil, @@ -184,7 +183,7 @@ export class EventOutputHolder } // Return null if there's no crafts to send to client to match live behaviour - return (Object.keys(productions).length > 0) ? productions : null; + return Object.keys(productions).length > 0 ? productions : null; } /** diff --git a/project/src/routers/HttpRouter.ts b/project/src/routers/HttpRouter.ts index 5259d9be..15bd76cc 100644 --- a/project/src/routers/HttpRouter.ts +++ b/project/src/routers/HttpRouter.ts @@ -1,6 +1,5 @@ import { IncomingMessage } from "node:http"; import { injectAll, injectable } from "tsyringe"; - import { DynamicRouter, Router, StaticRouter } from "@spt-aki/di/Router"; @injectable() diff --git a/project/src/routers/ImageRouter.ts b/project/src/routers/ImageRouter.ts index b6814c15..da4bbdd4 100644 --- a/project/src/routers/ImageRouter.ts +++ b/project/src/routers/ImageRouter.ts @@ -1,6 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { inject, injectable } from "tsyringe"; - import { ImageRouteService } from "@spt-aki/services/mod/image/ImageRouteService"; import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil"; import { VFS } from "@spt-aki/utils/VFS"; diff --git a/project/src/routers/ItemEventRouter.ts b/project/src/routers/ItemEventRouter.ts index ebad666e..bb09afb8 100644 --- a/project/src/routers/ItemEventRouter.ts +++ b/project/src/routers/ItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectAll, injectable } from "tsyringe"; - import { ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IItemEventRouterRequest } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; @@ -35,7 +34,7 @@ export class ItemEventRouter { const pmcData = this.profileHelper.getPmcProfile(sessionID); - const eventRouter = this.itemEventRouters.find((r) => r.canHandle(body.Action)); + const eventRouter = this.itemEventRouters.find(r => r.canHandle(body.Action)); if (eventRouter) { this.logger.debug(`event: ${body.Action}`); diff --git a/project/src/routers/dynamic/BotDynamicRouter.ts b/project/src/routers/dynamic/BotDynamicRouter.ts index 92abf614..e6574245 100644 --- a/project/src/routers/dynamic/BotDynamicRouter.ts +++ b/project/src/routers/dynamic/BotDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { Difficulties } from "@spt-aki/models/eft/common/tables/IBotType"; diff --git a/project/src/routers/dynamic/BundleDynamicRouter.ts b/project/src/routers/dynamic/BundleDynamicRouter.ts index a3605901..d2bd2899 100644 --- a/project/src/routers/dynamic/BundleDynamicRouter.ts +++ b/project/src/routers/dynamic/BundleDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; diff --git a/project/src/routers/dynamic/CustomizationDynamicRouter.ts b/project/src/routers/dynamic/CustomizationDynamicRouter.ts index 62946364..493d7469 100644 --- a/project/src/routers/dynamic/CustomizationDynamicRouter.ts +++ b/project/src/routers/dynamic/CustomizationDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { ISuit } from "@spt-aki/models/eft/common/tables/ITrader"; diff --git a/project/src/routers/dynamic/DataDynamicRouter.ts b/project/src/routers/dynamic/DataDynamicRouter.ts index ff7c7ac7..046d9acb 100644 --- a/project/src/routers/dynamic/DataDynamicRouter.ts +++ b/project/src/routers/dynamic/DataDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { IGetItemPricesResponse } from "@spt-aki/models/eft/game/IGetItemPricesResponse"; diff --git a/project/src/routers/dynamic/HttpDynamicRouter.ts b/project/src/routers/dynamic/HttpDynamicRouter.ts index 0f07e089..9a7b117f 100644 --- a/project/src/routers/dynamic/HttpDynamicRouter.ts +++ b/project/src/routers/dynamic/HttpDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { ImageRouter } from "@spt-aki/routers/ImageRouter"; diff --git a/project/src/routers/dynamic/InraidDynamicRouter.ts b/project/src/routers/dynamic/InraidDynamicRouter.ts index 6b943645..72f0c9da 100644 --- a/project/src/routers/dynamic/InraidDynamicRouter.ts +++ b/project/src/routers/dynamic/InraidDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; diff --git a/project/src/routers/dynamic/LocationDynamicRouter.ts b/project/src/routers/dynamic/LocationDynamicRouter.ts index aa2d6bbf..71497b66 100644 --- a/project/src/routers/dynamic/LocationDynamicRouter.ts +++ b/project/src/routers/dynamic/LocationDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; diff --git a/project/src/routers/dynamic/NotifierDynamicRouter.ts b/project/src/routers/dynamic/NotifierDynamicRouter.ts index b91c4c70..1a32834d 100644 --- a/project/src/routers/dynamic/NotifierDynamicRouter.ts +++ b/project/src/routers/dynamic/NotifierDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/dynamic/TraderDynamicRouter.ts b/project/src/routers/dynamic/TraderDynamicRouter.ts index 61b68d22..8593aac0 100644 --- a/project/src/routers/dynamic/TraderDynamicRouter.ts +++ b/project/src/routers/dynamic/TraderDynamicRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; import { DynamicRouter, RouteAction } from "@spt-aki/di/Router"; import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; diff --git a/project/src/routers/item_events/CustomizationItemEventRouter.ts b/project/src/routers/item_events/CustomizationItemEventRouter.ts index 8ace1743..7fcd2b3f 100644 --- a/project/src/routers/item_events/CustomizationItemEventRouter.ts +++ b/project/src/routers/item_events/CustomizationItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/HealthItemEventRouter.ts b/project/src/routers/item_events/HealthItemEventRouter.ts index b0c5cb1b..ecddee69 100644 --- a/project/src/routers/item_events/HealthItemEventRouter.ts +++ b/project/src/routers/item_events/HealthItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/HideoutItemEventRouter.ts b/project/src/routers/item_events/HideoutItemEventRouter.ts index 6424097f..d3dd877a 100644 --- a/project/src/routers/item_events/HideoutItemEventRouter.ts +++ b/project/src/routers/item_events/HideoutItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/InsuranceItemEventRouter.ts b/project/src/routers/item_events/InsuranceItemEventRouter.ts index 8a598c97..0996d8f6 100644 --- a/project/src/routers/item_events/InsuranceItemEventRouter.ts +++ b/project/src/routers/item_events/InsuranceItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/InventoryItemEventRouter.ts b/project/src/routers/item_events/InventoryItemEventRouter.ts index d27e7324..1f08afe4 100644 --- a/project/src/routers/item_events/InventoryItemEventRouter.ts +++ b/project/src/routers/item_events/InventoryItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HideoutCallbacks } from "@spt-aki/callbacks/HideoutCallbacks"; import { InventoryCallbacks } from "@spt-aki/callbacks/InventoryCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; diff --git a/project/src/routers/item_events/NoteItemEventRouter.ts b/project/src/routers/item_events/NoteItemEventRouter.ts index 06de379e..a363aaf2 100644 --- a/project/src/routers/item_events/NoteItemEventRouter.ts +++ b/project/src/routers/item_events/NoteItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { NoteCallbacks } from "@spt-aki/callbacks/NoteCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/QuestItemEventRouter.ts b/project/src/routers/item_events/QuestItemEventRouter.ts index 23664eb4..f5373f4c 100644 --- a/project/src/routers/item_events/QuestItemEventRouter.ts +++ b/project/src/routers/item_events/QuestItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/RagfairItemEventRouter.ts b/project/src/routers/item_events/RagfairItemEventRouter.ts index 229cb908..713fe81b 100644 --- a/project/src/routers/item_events/RagfairItemEventRouter.ts +++ b/project/src/routers/item_events/RagfairItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/RepairItemEventRouter.ts b/project/src/routers/item_events/RepairItemEventRouter.ts index 769a399c..0aa0f7fb 100644 --- a/project/src/routers/item_events/RepairItemEventRouter.ts +++ b/project/src/routers/item_events/RepairItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RepairCallbacks } from "@spt-aki/callbacks/RepairCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/TradeItemEventRouter.ts b/project/src/routers/item_events/TradeItemEventRouter.ts index 4e164dcf..a6065b39 100644 --- a/project/src/routers/item_events/TradeItemEventRouter.ts +++ b/project/src/routers/item_events/TradeItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { TradeCallbacks } from "@spt-aki/callbacks/TradeCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/item_events/WishlistItemEventRouter.ts b/project/src/routers/item_events/WishlistItemEventRouter.ts index 5744e4b1..dc012afc 100644 --- a/project/src/routers/item_events/WishlistItemEventRouter.ts +++ b/project/src/routers/item_events/WishlistItemEventRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { WishlistCallbacks } from "@spt-aki/callbacks/WishlistCallbacks"; import { HandledRoute, ItemEventRouterDefinition } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/save_load/HealthSaveLoadRouter.ts b/project/src/routers/save_load/HealthSaveLoadRouter.ts index b32f49ce..9ef8d50f 100644 --- a/project/src/routers/save_load/HealthSaveLoadRouter.ts +++ b/project/src/routers/save_load/HealthSaveLoadRouter.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; diff --git a/project/src/routers/save_load/InraidSaveLoadRouter.ts b/project/src/routers/save_load/InraidSaveLoadRouter.ts index 241300dd..32c8e1fd 100644 --- a/project/src/routers/save_load/InraidSaveLoadRouter.ts +++ b/project/src/routers/save_load/InraidSaveLoadRouter.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; diff --git a/project/src/routers/save_load/InsuranceSaveLoadRouter.ts b/project/src/routers/save_load/InsuranceSaveLoadRouter.ts index 433b8a49..bac149dd 100644 --- a/project/src/routers/save_load/InsuranceSaveLoadRouter.ts +++ b/project/src/routers/save_load/InsuranceSaveLoadRouter.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; diff --git a/project/src/routers/save_load/ProfileSaveLoadRouter.ts b/project/src/routers/save_load/ProfileSaveLoadRouter.ts index 97d1309f..a50ec171 100644 --- a/project/src/routers/save_load/ProfileSaveLoadRouter.ts +++ b/project/src/routers/save_load/ProfileSaveLoadRouter.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { HandledRoute, SaveLoadRouter } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; diff --git a/project/src/routers/serializers/BundleSerializer.ts b/project/src/routers/serializers/BundleSerializer.ts index a12c51e3..b6a5da13 100644 --- a/project/src/routers/serializers/BundleSerializer.ts +++ b/project/src/routers/serializers/BundleSerializer.ts @@ -1,6 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { inject, injectable } from "tsyringe"; - import { Serializer } from "@spt-aki/di/Serializer"; import { BundleLoader } from "@spt-aki/loaders/BundleLoader"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; diff --git a/project/src/routers/serializers/ImageSerializer.ts b/project/src/routers/serializers/ImageSerializer.ts index 90a0ccec..3b70e504 100644 --- a/project/src/routers/serializers/ImageSerializer.ts +++ b/project/src/routers/serializers/ImageSerializer.ts @@ -1,6 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { inject, injectable } from "tsyringe"; - import { Serializer } from "@spt-aki/di/Serializer"; import { ImageRouter } from "@spt-aki/routers/ImageRouter"; diff --git a/project/src/routers/serializers/NotifySerializer.ts b/project/src/routers/serializers/NotifySerializer.ts index 5ff48468..10c1420f 100644 --- a/project/src/routers/serializers/NotifySerializer.ts +++ b/project/src/routers/serializers/NotifySerializer.ts @@ -1,6 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { inject, injectable } from "tsyringe"; - import { NotifierController } from "@spt-aki/controllers/NotifierController"; import { Serializer } from "@spt-aki/di/Serializer"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; @@ -28,8 +27,8 @@ export class NotifySerializer extends Serializer * be sent to client as NEWLINE separated strings... yup. */ this.notifierController.notifyAsync(tmpSessionID).then((messages: any) => - messages.map((message: any) => this.jsonUtil.serialize(message)).join("\n") - ).then((text) => this.httpServerHelper.sendTextJson(resp, text)); + messages.map((message: any) => this.jsonUtil.serialize(message)).join("\n"), + ).then(text => this.httpServerHelper.sendTextJson(resp, text)); } public override canHandle(route: string): boolean diff --git a/project/src/routers/static/AchievementStaticRouter.ts b/project/src/routers/static/AchievementStaticRouter.ts index bed39502..9e191f56 100644 --- a/project/src/routers/static/AchievementStaticRouter.ts +++ b/project/src/routers/static/AchievementStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { AchievementCallbacks } from "@spt-aki/callbacks/AchievementCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/BotStaticRouter.ts b/project/src/routers/static/BotStaticRouter.ts index 1f6f42b0..73d96ccd 100644 --- a/project/src/routers/static/BotStaticRouter.ts +++ b/project/src/routers/static/BotStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotCallbacks } from "@spt-aki/callbacks/BotCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; diff --git a/project/src/routers/static/BuildStaticRouter.ts b/project/src/routers/static/BuildStaticRouter.ts index 52585c9a..6c1404d4 100644 --- a/project/src/routers/static/BuildStaticRouter.ts +++ b/project/src/routers/static/BuildStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BuildsCallbacks } from "@spt-aki/callbacks/BuildsCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/BundleStaticRouter.ts b/project/src/routers/static/BundleStaticRouter.ts index d2cb8426..25de6072 100644 --- a/project/src/routers/static/BundleStaticRouter.ts +++ b/project/src/routers/static/BundleStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; diff --git a/project/src/routers/static/ClientLogStaticRouter.ts b/project/src/routers/static/ClientLogStaticRouter.ts index c4de8db3..fc2564c5 100644 --- a/project/src/routers/static/ClientLogStaticRouter.ts +++ b/project/src/routers/static/ClientLogStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ClientLogCallbacks } from "@spt-aki/callbacks/ClientLogCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; diff --git a/project/src/routers/static/CustomizationStaticRouter.ts b/project/src/routers/static/CustomizationStaticRouter.ts index 1bb414ae..2acea017 100644 --- a/project/src/routers/static/CustomizationStaticRouter.ts +++ b/project/src/routers/static/CustomizationStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { CustomizationCallbacks } from "@spt-aki/callbacks/CustomizationCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetSuitsResponse } from "@spt-aki/models/eft/customization/IGetSuitsResponse"; diff --git a/project/src/routers/static/DataStaticRouter.ts b/project/src/routers/static/DataStaticRouter.ts index 4a0ef961..7ee611fb 100644 --- a/project/src/routers/static/DataStaticRouter.ts +++ b/project/src/routers/static/DataStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DataCallbacks } from "@spt-aki/callbacks/DataCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGlobals } from "@spt-aki/models/eft/common/IGlobals"; diff --git a/project/src/routers/static/DialogStaticRouter.ts b/project/src/routers/static/DialogStaticRouter.ts index b7c8b3bd..23230592 100644 --- a/project/src/routers/static/DialogStaticRouter.ts +++ b/project/src/routers/static/DialogStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueCallbacks } from "@spt-aki/callbacks/DialogueCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; diff --git a/project/src/routers/static/GameStaticRouter.ts b/project/src/routers/static/GameStaticRouter.ts index 329cab8e..26342edd 100644 --- a/project/src/routers/static/GameStaticRouter.ts +++ b/project/src/routers/static/GameStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { GameCallbacks } from "@spt-aki/callbacks/GameCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse"; diff --git a/project/src/routers/static/HealthStaticRouter.ts b/project/src/routers/static/HealthStaticRouter.ts index 0e804f3d..6faaedb0 100644 --- a/project/src/routers/static/HealthStaticRouter.ts +++ b/project/src/routers/static/HealthStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HealthCallbacks } from "@spt-aki/callbacks/HealthCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/InraidStaticRouter.ts b/project/src/routers/static/InraidStaticRouter.ts index 8a97439e..563a956f 100644 --- a/project/src/routers/static/InraidStaticRouter.ts +++ b/project/src/routers/static/InraidStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InraidCallbacks } from "@spt-aki/callbacks/InraidCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; diff --git a/project/src/routers/static/InsuranceStaticRouter.ts b/project/src/routers/static/InsuranceStaticRouter.ts index 0bf83738..6a750887 100644 --- a/project/src/routers/static/InsuranceStaticRouter.ts +++ b/project/src/routers/static/InsuranceStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { InsuranceCallbacks } from "@spt-aki/callbacks/InsuranceCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/ItemEventStaticRouter.ts b/project/src/routers/static/ItemEventStaticRouter.ts index 4c7d9ef2..ab0fc68d 100644 --- a/project/src/routers/static/ItemEventStaticRouter.ts +++ b/project/src/routers/static/ItemEventStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemEventCallbacks } from "@spt-aki/callbacks/ItemEventCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/LauncherStaticRouter.ts b/project/src/routers/static/LauncherStaticRouter.ts index 2bd353cf..c4147c09 100644 --- a/project/src/routers/static/LauncherStaticRouter.ts +++ b/project/src/routers/static/LauncherStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; diff --git a/project/src/routers/static/LocationStaticRouter.ts b/project/src/routers/static/LocationStaticRouter.ts index a3b98f7c..867291ca 100644 --- a/project/src/routers/static/LocationStaticRouter.ts +++ b/project/src/routers/static/LocationStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { ILocationsGenerateAllResponse } from "@spt-aki/models/eft/common/ILocationsSourceDestinationBase"; diff --git a/project/src/routers/static/MatchStaticRouter.ts b/project/src/routers/static/MatchStaticRouter.ts index d0629498..63223310 100644 --- a/project/src/routers/static/MatchStaticRouter.ts +++ b/project/src/routers/static/MatchStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { MatchCallbacks } from "@spt-aki/callbacks/MatchCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; diff --git a/project/src/routers/static/NotifierStaticRouter.ts b/project/src/routers/static/NotifierStaticRouter.ts index 7003a582..d0d0e4ae 100644 --- a/project/src/routers/static/NotifierStaticRouter.ts +++ b/project/src/routers/static/NotifierStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { NotifierCallbacks } from "@spt-aki/callbacks/NotifierCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/ProfileStaticRouter.ts b/project/src/routers/static/ProfileStaticRouter.ts index f83dfaa1..4b564139 100644 --- a/project/src/routers/static/ProfileStaticRouter.ts +++ b/project/src/routers/static/ProfileStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileCallbacks } from "@spt-aki/callbacks/ProfileCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; diff --git a/project/src/routers/static/QuestStaticRouter.ts b/project/src/routers/static/QuestStaticRouter.ts index ad2b7868..71e8ed91 100644 --- a/project/src/routers/static/QuestStaticRouter.ts +++ b/project/src/routers/static/QuestStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; diff --git a/project/src/routers/static/RagfairStaticRouter.ts b/project/src/routers/static/RagfairStaticRouter.ts index 87577853..b532ff5d 100644 --- a/project/src/routers/static/RagfairStaticRouter.ts +++ b/project/src/routers/static/RagfairStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairCallbacks } from "@spt-aki/callbacks/RagfairCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/routers/static/TraderStaticRouter.ts b/project/src/routers/static/TraderStaticRouter.ts index 69864a4e..8298a486 100644 --- a/project/src/routers/static/TraderStaticRouter.ts +++ b/project/src/routers/static/TraderStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { TraderCallbacks } from "@spt-aki/callbacks/TraderCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader"; diff --git a/project/src/routers/static/WeatherStaticRouter.ts b/project/src/routers/static/WeatherStaticRouter.ts index 8ed17478..5f93a205 100644 --- a/project/src/routers/static/WeatherStaticRouter.ts +++ b/project/src/routers/static/WeatherStaticRouter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { WeatherCallbacks } from "@spt-aki/callbacks/WeatherCallbacks"; import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; diff --git a/project/src/servers/ConfigServer.ts b/project/src/servers/ConfigServer.ts index ccd67d62..27e39806 100644 --- a/project/src/servers/ConfigServer.ts +++ b/project/src/servers/ConfigServer.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -36,7 +35,7 @@ export class ConfigServer this.logger.debug("Importing configs..."); // Get all filepaths - const filepath = (globalThis.G_RELEASE_CONFIGURATION) ? "Aki_Data/Server/configs/" : "./assets/configs/"; + const filepath = globalThis.G_RELEASE_CONFIGURATION ? "Aki_Data/Server/configs/" : "./assets/configs/"; const files = this.vfs.getFiles(filepath); // Add file content to result diff --git a/project/src/servers/DatabaseServer.ts b/project/src/servers/DatabaseServer.ts index 5a53ed91..29eb9620 100644 --- a/project/src/servers/DatabaseServer.ts +++ b/project/src/servers/DatabaseServer.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; @injectable() diff --git a/project/src/servers/HttpServer.ts b/project/src/servers/HttpServer.ts index ac371cd5..d03443b6 100644 --- a/project/src/servers/HttpServer.ts +++ b/project/src/servers/HttpServer.ts @@ -1,6 +1,5 @@ import http, { IncomingMessage, ServerResponse, Server } from "node:http"; import { inject, injectAll, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; @@ -9,8 +8,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; +import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; @injectable() @@ -122,8 +121,8 @@ export class HttpServer } return remoteAddress.startsWith("127.0.0") - || remoteAddress.startsWith("192.168.") - || remoteAddress.startsWith("localhost"); + || remoteAddress.startsWith("192.168.") + || remoteAddress.startsWith("localhost"); } protected getCookies(req: IncomingMessage): Record diff --git a/project/src/servers/RagfairServer.ts b/project/src/servers/RagfairServer.ts index 606bcb67..829563a8 100644 --- a/project/src/servers/RagfairServer.ts +++ b/project/src/servers/RagfairServer.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { RagfairOfferGenerator } from "@spt-aki/generators/RagfairOfferGenerator"; import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; @@ -80,7 +79,7 @@ export class RagfairServer */ public getUpdateableTraders(): string[] { - return Object.keys(this.ragfairConfig.traders).filter((x) => this.ragfairConfig.traders[x]); + return Object.keys(this.ragfairConfig.traders).filter(x => this.ragfairConfig.traders[x]); } public getAllActiveCategories( @@ -99,7 +98,7 @@ export class RagfairServer public hideOffer(offerId: string): void { const offers = this.ragfairOfferService.getOffers(); - const offer = offers.find((x) => x._id === offerId); + const offer = offers.find(x => x._id === offerId); if (!offer) { diff --git a/project/src/servers/SaveServer.ts b/project/src/servers/SaveServer.ts index d3b2d3a3..73e3941c 100644 --- a/project/src/servers/SaveServer.ts +++ b/project/src/servers/SaveServer.ts @@ -1,5 +1,4 @@ import { inject, injectAll, injectable } from "tsyringe"; - import { SaveLoadRouter } from "@spt-aki/di/Router"; import { IAkiProfile, Info } from "@spt-aki/models/eft/profile/IAkiProfile"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; @@ -219,7 +218,7 @@ export class SaveServer !this.configServer.getConfig(ConfigTypes.CORE).features.compressProfile, ); const fmd5 = this.hashUtil.generateMd5ForData(jsonProfile); - if (typeof (this.saveMd5[sessionID]) !== "string" || this.saveMd5[sessionID] !== fmd5) + if (typeof this.saveMd5[sessionID] !== "string" || this.saveMd5[sessionID] !== fmd5) { this.saveMd5[sessionID] = String(fmd5); // save profile to disk diff --git a/project/src/servers/WebSocketServer.ts b/project/src/servers/WebSocketServer.ts index 03b05769..8a96922d 100644 --- a/project/src/servers/WebSocketServer.ts +++ b/project/src/servers/WebSocketServer.ts @@ -1,7 +1,6 @@ import http, { IncomingMessage } from "node:http"; import { inject, injectable } from "tsyringe"; import WebSocket from "ws"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { INotification, NotificationType } from "@spt-aki/models/eft/notifier/INotifier"; @@ -90,7 +89,7 @@ export class WebSocketServer return this.localisationService.getRandomTextThatMatchesPartialKey("server_start_meme_"); } - return (globalThis.G_RELEASE_CONFIGURATION) + return globalThis.G_RELEASE_CONFIGURATION ? `${this.localisationService.getText("server_start_success")}!` : this.localisationService.getText("server_start_success"); } diff --git a/project/src/servers/http/AkiHttpListener.ts b/project/src/servers/http/AkiHttpListener.ts index e99b29b2..a3ba3138 100644 --- a/project/src/servers/http/AkiHttpListener.ts +++ b/project/src/servers/http/AkiHttpListener.ts @@ -1,7 +1,6 @@ import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "node:http"; import zlib from "node:zlib"; import { inject, injectAll, injectable } from "tsyringe"; - import { Serializer } from "@spt-aki/di/Serializer"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { HttpRouter } from "@spt-aki/routers/HttpRouter"; @@ -142,7 +141,7 @@ export class AkiHttpListener implements IHttpListener if (globalThis.G_LOG_REQUESTS) { // Parse quest info into object - const data = (typeof info === "object") ? info : this.jsonUtil.deserialize(info); + const data = typeof info === "object" ? info : this.jsonUtil.deserialize(info); const log = new Request(req.method, new RequestData(req.url, req.headers, data)); this.requestsLogger.info(`REQUEST=${this.jsonUtil.serialize(log)}`); @@ -154,7 +153,7 @@ export class AkiHttpListener implements IHttpListener { this.logger.error(this.localisationService.getText("unhandled_response", req.url)); this.logger.info(info); - output = this.httpResponse.getBody(null, 404, `UNHANDLED RESPONSE: ${req.url}`); + output = this.httpResponse.getBody(null, 404, `UNHANDLED RESPONSE: ${req.url}`); } return output; } diff --git a/project/src/servers/http/IHttpListener.ts b/project/src/servers/http/IHttpListener.ts index 27b0093f..9699f4d5 100644 --- a/project/src/servers/http/IHttpListener.ts +++ b/project/src/servers/http/IHttpListener.ts @@ -2,6 +2,6 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { - canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; + canHandle(sessionId: string, req: IncomingMessage): boolean + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise } diff --git a/project/src/services/BotEquipmentFilterService.ts b/project/src/services/BotEquipmentFilterService.ts index f2d5a199..f4c0619c 100644 --- a/project/src/services/BotEquipmentFilterService.ts +++ b/project/src/services/BotEquipmentFilterService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { @@ -54,7 +53,7 @@ export class BotEquipmentFilterService { const pmcProfile = this.profileHelper.getPmcProfile(sessionId); - const botRole = (botGenerationDetails.isPmc) ? "pmc" : botGenerationDetails.role; + const botRole = botGenerationDetails.isPmc ? "pmc" : botGenerationDetails.role; const botEquipmentBlacklist = this.getBotEquipmentBlacklist(botRole, botLevel); const botEquipmentWhitelist = this.getBotEquipmentWhitelist(botRole, botLevel); const botWeightingAdjustments = this.getBotWeightingAdjustments(botRole, botLevel); @@ -181,8 +180,8 @@ export class BotEquipmentFilterService return null; } - return blacklistDetailsForBot.blacklist.find((x) => - playerLevel >= x.levelRange.min && playerLevel <= x.levelRange.max + return blacklistDetailsForBot.blacklist.find(x => + playerLevel >= x.levelRange.min && playerLevel <= x.levelRange.max, ); } @@ -202,8 +201,8 @@ export class BotEquipmentFilterService return null; } - return botEquipmentConfig.whitelist.find((x) => - playerLevel >= x.levelRange.min && playerLevel <= x.levelRange.max + return botEquipmentConfig.whitelist.find(x => + playerLevel >= x.levelRange.min && playerLevel <= x.levelRange.max, ); } @@ -226,8 +225,8 @@ export class BotEquipmentFilterService return null; } - return botEquipmentConfig.weightingAdjustmentsByBotLevel.find((x) => - botLevel >= x.levelRange.min && botLevel <= x.levelRange.max + return botEquipmentConfig.weightingAdjustmentsByBotLevel.find(x => + botLevel >= x.levelRange.min && botLevel <= x.levelRange.max, ); } @@ -250,8 +249,8 @@ export class BotEquipmentFilterService return null; } - return botEquipmentConfig.weightingAdjustmentsByPlayerLevel.find((x) => - playerlevel >= x.levelRange.min && playerlevel <= x.levelRange.max + return botEquipmentConfig.weightingAdjustmentsByPlayerLevel.find(x => + playerlevel >= x.levelRange.min && playerlevel <= x.levelRange.max, ); } diff --git a/project/src/services/BotEquipmentModPoolService.ts b/project/src/services/BotEquipmentModPoolService.ts index 318823a3..4195c3d9 100644 --- a/project/src/services/BotEquipmentModPoolService.ts +++ b/project/src/services/BotEquipmentModPoolService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { Mods } from "@spt-aki/models/eft/common/tables/IBotType"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; @@ -92,7 +91,7 @@ export class BotEquipmentModPoolService } // only add item to pool if it doesnt already exist - if (!pool[item._id][slot._name].some((x) => x === itemToAdd)) + if (!pool[item._id][slot._name].some(x => x === itemToAdd)) { pool[item._id][slot._name].push(itemToAdd); @@ -186,8 +185,8 @@ export class BotEquipmentModPoolService */ protected generateWeaponPool(): void { - const weapons = Object.values(this.databaseServer.getTables().templates.items).filter((x) => - x._type === "Item" && this.itemHelper.isOfBaseclass(x._id, BaseClasses.WEAPON) + const weapons = Object.values(this.databaseServer.getTables().templates.items).filter(x => + x._type === "Item" && this.itemHelper.isOfBaseclass(x._id, BaseClasses.WEAPON), ); this.generatePool(weapons, "weapon"); @@ -200,14 +199,14 @@ export class BotEquipmentModPoolService */ protected generateGearPool(): void { - const gear = Object.values(this.databaseServer.getTables().templates.items).filter((x) => + const gear = Object.values(this.databaseServer.getTables().templates.items).filter(x => x._type === "Item" && this.itemHelper.isOfBaseclasses(x._id, [ BaseClasses.ARMORED_EQUIPMENT, BaseClasses.VEST, BaseClasses.ARMOR, BaseClasses.HEADWEAR, - ]) + ]), ); this.generatePool(gear, "gear"); diff --git a/project/src/services/BotGenerationCacheService.ts b/project/src/services/BotGenerationCacheService.ts index 76486f4e..956a9122 100644 --- a/project/src/services/BotGenerationCacheService.ts +++ b/project/src/services/BotGenerationCacheService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -82,7 +81,7 @@ export class BotGenerationCacheService */ public getUsedBot(profileId: string): IBotBase { - return this.activeBotsInRaid.find((x) => x._id === profileId); + return this.activeBotsInRaid.find(x => x._id === profileId); } /** diff --git a/project/src/services/BotLootCacheService.ts b/project/src/services/BotLootCacheService.ts index f64ca5d4..175adbb3 100644 --- a/project/src/services/BotLootCacheService.ts +++ b/project/src/services/BotLootCacheService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PMCLootGenerator } from "@spt-aki/generators/PMCLootGenerator"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; @@ -181,8 +180,8 @@ export class BotLootCacheService } // Assign whitelisted special items to bot if any exist - const specialLootItems: Record = - (Object.keys(botJsonTemplate.generation.items.specialItems.whitelist)?.length > 0) + const specialLootItems: Record + = Object.keys(botJsonTemplate.generation.items.specialItems.whitelist)?.length > 0 ? botJsonTemplate.generation.items.specialItems.whitelist : {}; @@ -200,8 +199,8 @@ export class BotLootCacheService } // Assign whitelisted healing items to bot if any exist - const healingItems: Record = - (Object.keys(botJsonTemplate.generation.items.healing.whitelist)?.length > 0) + const healingItems: Record + = Object.keys(botJsonTemplate.generation.items.healing.whitelist)?.length > 0 ? botJsonTemplate.generation.items.healing.whitelist : {}; @@ -223,8 +222,8 @@ export class BotLootCacheService } // Assign whitelisted drugs to bot if any exist - const drugItems: Record = - (Object.keys(botJsonTemplate.generation.items.drugs.whitelist)?.length > 0) + const drugItems: Record + = Object.keys(botJsonTemplate.generation.items.drugs.whitelist)?.length > 0 ? botJsonTemplate.generation.items.drugs.whitelist : {}; @@ -242,8 +241,8 @@ export class BotLootCacheService } // Assign whitelisted food to bot if any exist - const foodItems: Record = - (Object.keys(botJsonTemplate.generation.items.food.whitelist)?.length > 0) + const foodItems: Record + = Object.keys(botJsonTemplate.generation.items.food.whitelist)?.length > 0 ? botJsonTemplate.generation.items.food.whitelist : {}; @@ -261,8 +260,8 @@ export class BotLootCacheService } // Assign whitelisted drink to bot if any exist - const drinkItems: Record = - (Object.keys(botJsonTemplate.generation.items.food.whitelist)?.length > 0) + const drinkItems: Record + = Object.keys(botJsonTemplate.generation.items.food.whitelist)?.length > 0 ? botJsonTemplate.generation.items.food.whitelist : {}; @@ -280,8 +279,8 @@ export class BotLootCacheService } // Assign whitelisted currency to bot if any exist - const currencyItems: Record = - (Object.keys(botJsonTemplate.generation.items.currency.whitelist)?.length > 0) + const currencyItems: Record + = Object.keys(botJsonTemplate.generation.items.currency.whitelist)?.length > 0 ? botJsonTemplate.generation.items.currency.whitelist : {}; @@ -299,8 +298,8 @@ export class BotLootCacheService } // Assign whitelisted stims to bot if any exist - const stimItems: Record = - (Object.keys(botJsonTemplate.generation.items.stims.whitelist)?.length > 0) + const stimItems: Record + = Object.keys(botJsonTemplate.generation.items.stims.whitelist)?.length > 0 ? botJsonTemplate.generation.items.stims.whitelist : {}; @@ -318,8 +317,8 @@ export class BotLootCacheService } // Assign whitelisted grenades to bot if any exist - const grenadeItems: Record = - (Object.keys(botJsonTemplate.generation.items.grenades.whitelist)?.length > 0) + const grenadeItems: Record + = Object.keys(botJsonTemplate.generation.items.grenades.whitelist)?.length > 0 ? botJsonTemplate.generation.items.grenades.whitelist : {}; @@ -474,7 +473,7 @@ export class BotLootCacheService */ protected isBulletOrGrenade(props: Props): boolean { - return ("ammoType" in props); + return "ammoType" in props; } /** @@ -484,7 +483,7 @@ export class BotLootCacheService */ protected isMagazine(props: Props): boolean { - return ("ReloadMagType" in props); + return "ReloadMagType" in props; } /** @@ -494,7 +493,7 @@ export class BotLootCacheService */ protected isMedicalItem(props: Props): boolean { - return ("medUseTime" in props); + return "medUseTime" in props; } /** @@ -504,7 +503,7 @@ export class BotLootCacheService */ protected isGrenade(props: Props): boolean { - return ("ThrowType" in props); + return "ThrowType" in props; } protected isFood(tpl: string): boolean diff --git a/project/src/services/BotWeaponModLimitService.ts b/project/src/services/BotWeaponModLimitService.ts index 6fbf9f35..00d2c036 100644 --- a/project/src/services/BotWeaponModLimitService.ts +++ b/project/src/services/BotWeaponModLimitService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; @@ -91,12 +90,12 @@ export class BotWeaponModLimitService { // If weapon already has a longer ranged scope on it, allow ncstar to be spawned if ( - weapon.some((x) => + weapon.some(x => this.itemHelper.isOfBaseclasses(x._tpl, [ BaseClasses.ASSAULT_SCOPE, BaseClasses.OPTIC_SCOPE, BaseClasses.SPECIAL_SCOPE, - ]) + ]), ) ) { @@ -122,7 +121,7 @@ export class BotWeaponModLimitService // Mod is a mount that can hold only scopes and limit is reached (dont want to add empty mounts if limit is reached) if ( this.itemHelper.isOfBaseclass(modTemplate._id, BaseClasses.MOUNT) - && modTemplate._props.Slots.some((x) => x._name === "mod_scope") + && modTemplate._props.Slots.some(x => x._name === "mod_scope") && modTemplate._props.Slots.length === 1 && modLimits.scope.count >= modLimits.scopeMax ) @@ -145,7 +144,7 @@ export class BotWeaponModLimitService // Mod is a mount that can hold only flashlights ad limit is reached (dont want to add empty mounts if limit is reached) if ( this.itemHelper.isOfBaseclass(modTemplate._id, BaseClasses.MOUNT) - && modTemplate._props.Slots.some((x) => x._name === "mod_flashlight") + && modTemplate._props.Slots.some(x => x._name === "mod_flashlight") && modTemplate._props.Slots.length === 1 && modLimits.scope.count >= modLimits.scopeMax ) @@ -166,7 +165,7 @@ export class BotWeaponModLimitService */ protected weaponModLimitReached( modTpl: string, - currentCount: { count: number; }, + currentCount: { count: number }, maxLimit: number, botRole: string, ): boolean diff --git a/project/src/services/CustomLocationWaveService.ts b/project/src/services/CustomLocationWaveService.ts index 28d77df8..d8a143d3 100644 --- a/project/src/services/CustomLocationWaveService.ts +++ b/project/src/services/CustomLocationWaveService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BossLocationSpawn, ILocationBase, Wave } from "@spt-aki/models/eft/common/ILocationBase"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; @@ -76,7 +75,7 @@ export class CustomLocationWaveService const location: ILocationBase = this.databaseServer.getTables().locations[mapKey].base; for (const bossWave of bossWavesToApply[mapKey]) { - if (location.BossLocationSpawn.find((x) => x.sptId === bossWave.sptId)) + if (location.BossLocationSpawn.find(x => x.sptId === bossWave.sptId)) { // Already exists, skip continue; @@ -93,7 +92,7 @@ export class CustomLocationWaveService const location: ILocationBase = this.databaseServer.getTables().locations[mapKey].base; for (const normalWave of normalWavesToApply[mapKey]) { - if (location.waves.find((x) => x.sptId === normalWave.sptId)) + if (location.waves.find(x => x.sptId === normalWave.sptId)) { // Already exists, skip continue; diff --git a/project/src/services/FenceService.ts b/project/src/services/FenceService.ts index 413c6c9d..e3d46214 100644 --- a/project/src/services/FenceService.ts +++ b/project/src/services/FenceService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; @@ -376,8 +375,8 @@ export class FenceService // Add loyalty items to fence discount assorts loyalty object for (const loyaltyItemKey in newDiscountItems.loyal_level_items) { - this.fenceDiscountAssort.loyal_level_items[loyaltyItemKey] = - newDiscountItems.loyal_level_items[loyaltyItemKey]; + this.fenceDiscountAssort.loyal_level_items[loyaltyItemKey] + = newDiscountItems.loyal_level_items[loyaltyItemKey]; } // Reset the clock @@ -394,11 +393,11 @@ export class FenceService for (const itemWithChildren of newFenceAssorts.sptItems) { // Find the root item - const newRootItem = itemWithChildren.find((item) => item.slotId === "hideout"); + const newRootItem = itemWithChildren.find(item => item.slotId === "hideout"); // Find a matching root item with same tpl in existing assort - const existingRootItem = existingFenceAssorts.items.find((item) => - item._tpl === newRootItem._tpl && item.slotId === "hideout" + const existingRootItem = existingFenceAssorts.items.find(item => + item._tpl === newRootItem._tpl && item.slotId === "hideout", ); // Check if same type of item exists + its on list of item types to always stack @@ -437,8 +436,8 @@ export class FenceService // New assort to be added to existing assorts existingFenceAssorts.items.push(...itemWithChildren); existingFenceAssorts.barter_scheme[newRootItem._id] = newFenceAssorts.barter_scheme[newRootItem._id]; - existingFenceAssorts.loyal_level_items[newRootItem._id] = - newFenceAssorts.loyal_level_items[newRootItem._id]; + existingFenceAssorts.loyal_level_items[newRootItem._id] + = newFenceAssorts.loyal_level_items[newRootItem._id]; } } @@ -448,7 +447,7 @@ export class FenceService protected incrementPartialRefreshTime(): void { this.nextPartialRefreshTimestamp = this.timeUtil.getTimestamp() - + this.traderConfig.fence.partialRefreshTimeSeconds; + + this.traderConfig.fence.partialRefreshTimeSeconds; } /** @@ -462,8 +461,8 @@ export class FenceService generationValues: IGenerationAssortValues, ): IGenerationAssortValues { - const allRootItems = assortItems.filter((item) => item.slotId === "hideout"); - const rootPresetItems = allRootItems.filter((item) => item?.upd?.sptPresetId); + const allRootItems = assortItems.filter(item => item.slotId === "hideout"); + const rootPresetItems = allRootItems.filter(item => item?.upd?.sptPresetId); // Get count of weapons const currentWeaponPresetCount = rootPresetItems.reduce((count, item) => @@ -501,7 +500,7 @@ export class FenceService { if (assort?.items?.length > 0) { - const rootItems = assort.items.filter((item) => item.slotId === "hideout"); + const rootItems = assort.items.filter(item => item.slotId === "hideout"); for (let index = 0; index < itemCountToReplace; index++) { this.removeRandomItemFromAssorts(assort, rootItems); @@ -724,13 +723,13 @@ export class FenceService assortCount: number, assorts: ICreateFenceAssortsResult, baseFenceAssortClone: ITraderAssort, - itemTypeLimits: Record, + itemTypeLimits: Record, loyaltyLevel: number, ): void { const priceLimits = this.traderConfig.fence.itemCategoryRoublePriceLimit; - const assortRootItems = baseFenceAssortClone.items.filter((item) => - item.parentId === "hideout" && !item.upd?.sptPresetId + const assortRootItems = baseFenceAssortClone.items.filter(item => + item.parentId === "hideout" && !item.upd?.sptPresetId, ); for (let i = 0; i < assortCount; i++) @@ -760,7 +759,7 @@ export class FenceService const itemIsPreset = this.presetHelper.isPreset(chosenBaseAssortRoot._id); const price = baseFenceAssortClone.barter_scheme[chosenBaseAssortRoot._id][0][0].count; - if (price === 0 || (price === 1 && !itemIsPreset) || price === 100) + if (price === 0 || price === 1 && !itemIsPreset || price === 100) { // Don't allow "special" items / presets i--; @@ -840,9 +839,9 @@ export class FenceService protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, itemsWithChildren: Item[][]): Item { // Get matching root items - const matchingItems = itemsWithChildren.filter((itemWithChildren) => - itemWithChildren.find((item) => item._tpl === rootItemBeingAdded._tpl && item.parentId === "hideout") - ).flatMap((x) => x); + const matchingItems = itemsWithChildren.filter(itemWithChildren => + itemWithChildren.find(item => item._tpl === rootItemBeingAdded._tpl && item.parentId === "hideout"), + ).flatMap(x => x); if (matchingItems.length === 0) { // Nothing matches by tpl and is root item, exit early @@ -853,14 +852,14 @@ export class FenceService BaseClasses.MEDICAL, BaseClasses.MEDKIT, ]); - const isGearAndHasSlots = - this.itemHelper.isOfBaseclasses(rootItemBeingAdded._tpl, [ + const isGearAndHasSlots + = this.itemHelper.isOfBaseclasses(rootItemBeingAdded._tpl, [ BaseClasses.ARMORED_EQUIPMENT, BaseClasses.SEARCHABLE_ITEM, ]) && itemDbDetails._props.Slots.length > 0; // Only one match and its not medical or armored gear - if (matchingItems.length === 1 && (!(isMedical || isGearAndHasSlots))) + if (matchingItems.length === 1 && !(isMedical || isGearAndHasSlots)) { return matchingItems[0]; } @@ -961,9 +960,9 @@ export class FenceService } protected getMatchingItemLimit( - itemTypeLimits: Record, + itemTypeLimits: Record, itemTpl: string, - ): { current: number; max: number; } + ): { current: number, max: number } { for (const baseTypeKey in itemTypeLimits) { @@ -992,8 +991,8 @@ export class FenceService let weaponPresetsAddedCount = 0; if (desiredWeaponPresetsCount > 0) { - const weaponPresetRootItems = baseFenceAssort.items.filter((item) => - item.upd?.sptPresetId && this.itemHelper.isOfBaseclass(item._tpl, BaseClasses.WEAPON) + const weaponPresetRootItems = baseFenceAssort.items.filter(item => + item.upd?.sptPresetId && this.itemHelper.isOfBaseclass(item._tpl, BaseClasses.WEAPON), ); while (weaponPresetsAddedCount < desiredWeaponPresetsCount) { @@ -1016,7 +1015,7 @@ export class FenceService // Check chosen item is below price cap const priceLimitRouble = this.traderConfig.fence.itemCategoryRoublePriceLimit[rootItemDb._parent]; const itemPrice = this.handbookHelper.getTemplatePriceForItems(presetWithChildrenClone) - * this.itemHelper.getItemQualityModifierForOfferItems(presetWithChildrenClone); + * this.itemHelper.getItemQualityModifierForOfferItems(presetWithChildrenClone); if (priceLimitRouble) { if (itemPrice > priceLimitRouble) @@ -1053,8 +1052,8 @@ export class FenceService return; } - const equipmentPresetRootItems = baseFenceAssort.items.filter((item) => - item.upd?.sptPresetId && this.itemHelper.armorItemCanHoldMods(item._tpl) + const equipmentPresetRootItems = baseFenceAssort.items.filter(item => + item.upd?.sptPresetId && this.itemHelper.armorItemCanHoldMods(item._tpl), ); while (equipmentPresetsAddedCount < desiredEquipmentPresetsCount) { @@ -1076,7 +1075,7 @@ export class FenceService // Check chosen item is below price cap const priceLimitRouble = this.traderConfig.fence.itemCategoryRoublePriceLimit[rootItemDb._parent]; const itemPrice = this.handbookHelper.getTemplatePriceForItems(presetWithChildrenClone) - * this.itemHelper.getItemQualityModifierForOfferItems(presetWithChildrenClone); + * this.itemHelper.getItemQualityModifierForOfferItems(presetWithChildrenClone); if (priceLimitRouble) { if (itemPrice > priceLimitRouble) @@ -1122,7 +1121,7 @@ export class FenceService } // Check for and adjust soft insert durability values - const requiredSlots = itemDbDetails._props.Slots.filter((slot) => slot._required); + const requiredSlots = itemDbDetails._props.Slots.filter(slot => slot._required); const hasRequiredSlots = requiredSlots.length > 0; if (hasRequiredSlots) { @@ -1141,8 +1140,8 @@ export class FenceService } // Find items mod to apply dura changes to - const modItemToAdjust = armor.find((mod) => - mod.slotId.toLowerCase() === requiredSlot._name.toLowerCase() + const modItemToAdjust = armor.find(mod => + mod.slotId.toLowerCase() === requiredSlot._name.toLowerCase(), ); this.itemHelper.addUpdObjectToItem(modItemToAdjust); @@ -1171,8 +1170,8 @@ export class FenceService } // Check for and adjust plate durability values - const plateSlots = itemDbDetails._props.Slots.filter((slot) => - this.itemHelper.isRemovablePlateSlot(slot._name) + const plateSlots = itemDbDetails._props.Slots.filter(slot => + this.itemHelper.isRemovablePlateSlot(slot._name), ); if (plateSlots.length > 0) { @@ -1197,7 +1196,7 @@ export class FenceService ); // Find items mod to apply dura changes to - const modItemToAdjust = armor.find((mod) => mod.slotId.toLowerCase() === plateSlot._name.toLowerCase()); + const modItemToAdjust = armor.find(mod => mod.slotId.toLowerCase() === plateSlot._name.toLowerCase()); this.itemHelper.addUpdObjectToItem(modItemToAdjust); if (!modItemToAdjust.upd.Repairable) @@ -1334,8 +1333,8 @@ export class FenceService // Randomise armor durability if ( (itemDetails._parent === BaseClasses.ARMORED_EQUIPMENT - || itemDetails._parent === BaseClasses.FACECOVER - || itemDetails._parent === BaseClasses.ARMOR_PLATE) && itemDetails._props.MaxDurability > 0 + || itemDetails._parent === BaseClasses.FACECOVER + || itemDetails._parent === BaseClasses.ARMOR_PLATE) && itemDetails._props.MaxDurability > 0 ) { const values = this.getRandomisedArmorDurabilityValues( @@ -1427,9 +1426,9 @@ export class FenceService * @param limits limits as defined in config * @returns record, key: item tplId, value: current/max item count allowed */ - protected initItemLimitCounter(limits: Record): Record + protected initItemLimitCounter(limits: Record): Record { - const itemTypeCounts: Record = {}; + const itemTypeCounts: Record = {}; for (const x in limits) { @@ -1456,7 +1455,7 @@ export class FenceService */ protected getFenceRefreshTime(): number { - const fence = this.traderConfig.updateTime.find((x) => x.traderId === Traders.FENCE).seconds; + const fence = this.traderConfig.updateTime.find(x => x.traderId === Traders.FENCE).seconds; return this.randomUtil.getInt(fence.min, fence.max); } @@ -1476,7 +1475,7 @@ export class FenceService return fenceSettings.Levels["0"]; } - const fenceLevels = (Object.keys(fenceSettings.Levels)).map((value) => Number.parseInt(value)); + const fenceLevels = Object.keys(fenceSettings.Levels).map(value => Number.parseInt(value)); const minLevel = Math.min(...fenceLevels); const maxLevel = Math.max(...fenceLevels); const pmcFenceLevel = Math.floor(pmcFenceInfo.standing); @@ -1502,11 +1501,11 @@ export class FenceService public amendOrRemoveFenceOffer(assortId: string, buyCount: number): void { let isNormalAssort = true; - let fenceAssortItem = this.fenceAssort.items.find((item) => item._id === assortId); + let fenceAssortItem = this.fenceAssort.items.find(item => item._id === assortId); if (!fenceAssortItem) { // Not in main assorts, check secondary section - fenceAssortItem = this.fenceDiscountAssort.items.find((item) => item._id === assortId); + fenceAssortItem = this.fenceDiscountAssort.items.find(item => item._id === assortId); if (!fenceAssortItem) { this.logger.error(`Offer with id: ${assortId} not found`); @@ -1534,12 +1533,12 @@ export class FenceService const itemWithChildrenToRemove = this.itemHelper.findAndReturnChildrenAsItems(assorts, assortId); for (const itemToRemove of itemWithChildrenToRemove) { - let indexToRemove = assorts.findIndex((item) => item._id === itemToRemove._id); + let indexToRemove = assorts.findIndex(item => item._id === itemToRemove._id); // No offer found in main assort, check discount items if (indexToRemove === -1) { - indexToRemove = this.fenceDiscountAssort.items.findIndex((item) => item._id === itemToRemove._id); + indexToRemove = this.fenceDiscountAssort.items.findIndex(item => item._id === itemToRemove._id); this.fenceDiscountAssort.items.splice(indexToRemove, 1); if (indexToRemove === -1) diff --git a/project/src/services/GiftService.ts b/project/src/services/GiftService.ts index 6e1834f9..71a0aa89 100644 --- a/project/src/services/GiftService.ts +++ b/project/src/services/GiftService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { GiftSenderType } from "@spt-aki/models/enums/GiftSenderType"; diff --git a/project/src/services/InsuranceService.ts b/project/src/services/InsuranceService.ts index f7b7c678..70882349 100644 --- a/project/src/services/InsuranceService.ts +++ b/project/src/services/InsuranceService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -153,7 +152,7 @@ export class InsuranceService for (const insuredItem of this.getInsurance(sessionId)[traderId]) { // Find insured items parent - const insuredItemsParent = insuredItems.find((x) => x._id === insuredItem.parentId); + const insuredItemsParent = insuredItems.find(x => x._id === insuredItem.parentId); if (!insuredItemsParent) { // Remove location + set slotId of insured items parent @@ -181,16 +180,16 @@ export class InsuranceService return this.timeUtil.getTimestamp() + this.insuranceConfig.returnTimeOverrideSeconds; } - const insuranceReturnTimeBonus = pmcData.Bonuses.find((b) => b.type === BonusType.INSURANCE_RETURN_TIME); + const insuranceReturnTimeBonus = pmcData.Bonuses.find(b => b.type === BonusType.INSURANCE_RETURN_TIME); const insuranceReturnTimeBonusPercent = 1.0 - - (insuranceReturnTimeBonus ? Math.abs(insuranceReturnTimeBonus.value) : 0) / 100; + - (insuranceReturnTimeBonus ? Math.abs(insuranceReturnTimeBonus.value) : 0) / 100; const traderMinReturnAsSeconds = trader.insurance.min_return_hour * TimeUtil.ONE_HOUR_AS_SECONDS; const traderMaxReturnAsSeconds = trader.insurance.max_return_hour * TimeUtil.ONE_HOUR_AS_SECONDS; const randomisedReturnTimeSeconds = this.randomUtil.getInt(traderMinReturnAsSeconds, traderMaxReturnAsSeconds); // Current time + randomised time calculated above - return this.timeUtil.getTimestamp() + (randomisedReturnTimeSeconds * insuranceReturnTimeBonusPercent); + return this.timeUtil.getTimestamp() + randomisedReturnTimeSeconds * insuranceReturnTimeBonusPercent; } /** @@ -251,14 +250,14 @@ export class InsuranceService // Check if item missing in post-raid gear OR player died + item slot flagged as lost on death // Catches both events: player died with item on + player survived but dropped item in raid - if (!itemOnPlayerPostRaid || (playerDied && itemShouldBeLostOnDeath)) + if (!itemOnPlayerPostRaid || playerDied && itemShouldBeLostOnDeath) { equipmentPkg.push({ pmcData: pmcData, itemToReturnToPlayer: this.getInsuredItemDetails( pmcData, preRaidItem, - offraidData.insurance?.find((insuranceItem) => insuranceItem.id === insuredItem.itemId), + offraidData.insurance?.find(insuranceItem => insuranceItem.id === insuredItem.itemId), ), traderId: insuredItem.tid, sessionID: sessionID, @@ -270,10 +269,10 @@ export class InsuranceService if (this.itemHelper.itemHasSlots(preRaidItem._tpl)) { // Get IDs of all soft insert child items on armor from pre raid gear data - const softInsertChildIds = preRaidGear.filter((item) => + const softInsertChildIds = preRaidGear.filter(item => item.parentId === preRaidItem._id - && this.itemHelper.getSoftInsertSlotIds().includes(item.slotId.toLowerCase()) - ).map((x) => x._id); + && this.itemHelper.getSoftInsertSlotIds().includes(item.slotId.toLowerCase()), + ).map(x => x._id); // Add all items found above to return data for (const softInsertChildModId of softInsertChildIds) @@ -282,9 +281,9 @@ export class InsuranceService pmcData: pmcData, itemToReturnToPlayer: this.getInsuredItemDetails( pmcData, - preRaidGear.find((item) => item._id === softInsertChildModId), - offraidData.insurance?.find((insuranceItem) => - insuranceItem.id === softInsertChildModId + preRaidGear.find(item => item._id === softInsertChildModId), + offraidData.insurance?.find(insuranceItem => + insuranceItem.id === softInsertChildModId, ), ), traderId: insuredItem.tid, diff --git a/project/src/services/ItemBaseClassService.ts b/project/src/services/ItemBaseClassService.ts index 94259cea..597cffed 100644 --- a/project/src/services/ItemBaseClassService.ts +++ b/project/src/services/ItemBaseClassService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -40,7 +39,7 @@ export class ItemBaseClassService return; } - const filteredDbItems = Object.values(this.items).filter((x) => x._type === "Item"); + const filteredDbItems = Object.values(this.items).filter(x => x._type === "Item"); for (const item of filteredDbItems) { const itemIdToUpdate = item._id; @@ -112,7 +111,7 @@ export class ItemBaseClassService } } - return this.itemBaseClassesCache[itemTpl].some((x) => baseClasses.includes(x)); + return this.itemBaseClassesCache[itemTpl].some(x => baseClasses.includes(x)); } /** diff --git a/project/src/services/ItemFilterService.ts b/project/src/services/ItemFilterService.ts index 059724aa..15238801 100644 --- a/project/src/services/ItemFilterService.ts +++ b/project/src/services/ItemFilterService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; diff --git a/project/src/services/LocaleService.ts b/project/src/services/LocaleService.ts index 685b3d26..06b67d51 100644 --- a/project/src/services/LocaleService.ts +++ b/project/src/services/LocaleService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ILocaleConfig } from "@spt-aki/models/spt/config/ILocaleConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -85,7 +84,7 @@ export class LocaleService * Get array of languages supported for localisation * @returns array of locales e.g. en/fr/cn */ - public getLocaleFallbacks(): { [locale: string]: string; } + public getLocaleFallbacks(): { [locale: string]: string } { return this.localeConfig.fallbacks; } diff --git a/project/src/services/LocalisationService.ts b/project/src/services/LocalisationService.ts index b1c87a1d..3c4c579c 100644 --- a/project/src/services/LocalisationService.ts +++ b/project/src/services/LocalisationService.ts @@ -1,7 +1,6 @@ import path from "node:path"; import { I18n } from "i18n"; import { inject, injectable } from "tsyringe"; - import { ILocaleConfig } from "@spt-aki/models/spt/config/ILocaleConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -67,8 +66,8 @@ export class LocalisationService */ public getRandomTextThatMatchesPartialKey(partialKey: string): string { - const filteredKeys = Object.keys(this.databaseServer.getTables().locales.server.en).filter((x) => - x.startsWith(partialKey) + const filteredKeys = Object.keys(this.databaseServer.getTables().locales.server.en).filter(x => + x.startsWith(partialKey), ); const chosenKey = this.randomUtil.getArrayValue(filteredKeys); diff --git a/project/src/services/MailSendService.ts b/project/src/services/MailSendService.ts index 4fbc536a..e63551a6 100644 --- a/project/src/services/MailSendService.ts +++ b/project/src/services/MailSendService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; @@ -366,7 +365,7 @@ export class MailSendService hasRewards: false, // The default dialog message has no rewards, can be added later via addRewardItemsToMessage() rewardCollected: false, // The default dialog message has no rewards, can be added later via addRewardItemsToMessage() systemData: messageDetails.systemData ? messageDetails.systemData : undefined, // Used by ragfair / localised messages that need "location" or "time" - profileChangeEvents: (messageDetails.profileChangeEvents?.length === 0) + profileChangeEvents: messageDetails.profileChangeEvents?.length === 0 ? messageDetails.profileChangeEvents : undefined, // no one knows, its never been used in any dumps }; @@ -513,7 +512,7 @@ export class MailSendService } // Find first item with slotId that indicates its a 'base' item - let item = items.find((x) => ["hideout", "main"].includes(x.slotId)); + let item = items.find(x => ["hideout", "main"].includes(x.slotId)); if (item) { return item; @@ -521,7 +520,7 @@ export class MailSendService // Not a singlular item + no items have a hideout/main slotid // Look for first item without parent id - item = items.find((x) => !x.parentId); + item = items.find(x => !x.parentId); if (item) { return item; diff --git a/project/src/services/MatchBotDetailsCacheService.ts b/project/src/services/MatchBotDetailsCacheService.ts index 826f731b..04fa38b4 100644 --- a/project/src/services/MatchBotDetailsCacheService.ts +++ b/project/src/services/MatchBotDetailsCacheService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; diff --git a/project/src/services/MatchLocationService.ts b/project/src/services/MatchLocationService.ts index 3a407d5b..758c4fc0 100644 --- a/project/src/services/MatchLocationService.ts +++ b/project/src/services/MatchLocationService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; diff --git a/project/src/services/ModCompilerService.ts b/project/src/services/ModCompilerService.ts index 7968dea0..99cf9a53 100644 --- a/project/src/services/ModCompilerService.ts +++ b/project/src/services/ModCompilerService.ts @@ -3,7 +3,6 @@ import fs from "node:fs"; import path from "node:path"; import { inject, injectable } from "tsyringe"; import ts from "typescript"; - import type { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService"; import { VFS } from "@spt-aki/utils/VFS"; @@ -86,7 +85,8 @@ export class ModCompilerService protected async compile(fileNames: string[], options: ts.CompilerOptions): Promise { // C:/snapshot/project || /snapshot/project - const baseDir: string = __dirname.replace(/\\/g, "/").split("/").slice(0, 3).join("/"); + const baseDir: string = __dirname.replace(/\\/g, "/").split("/").slice(0, 3) + .join("/"); for (const filePath of fileNames) { @@ -140,7 +140,7 @@ export class ModCompilerService */ protected areFilesReady(fileNames: string[]): boolean { - return fileNames.filter((x) => !this.vfs.exists(x.replace(".ts", ".js"))).length === 0; + return fileNames.filter(x => !this.vfs.exists(x.replace(".ts", ".js"))).length === 0; } /** @@ -150,6 +150,6 @@ export class ModCompilerService */ protected delay(ms: number): Promise { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise(resolve => setTimeout(resolve, ms)); } } diff --git a/project/src/services/NotificationService.ts b/project/src/services/NotificationService.ts index 2439eba8..f26ad928 100644 --- a/project/src/services/NotificationService.ts +++ b/project/src/services/NotificationService.ts @@ -1,5 +1,4 @@ import { injectable } from "tsyringe"; - import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; @injectable() diff --git a/project/src/services/OpenZoneService.ts b/project/src/services/OpenZoneService.ts index 303d4f92..39d9d6c4 100644 --- a/project/src/services/OpenZoneService.ts +++ b/project/src/services/OpenZoneService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; diff --git a/project/src/services/PaymentService.ts b/project/src/services/PaymentService.ts index 300197a4..1314a126 100644 --- a/project/src/services/PaymentService.ts +++ b/project/src/services/PaymentService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -53,13 +52,13 @@ export class PaymentService const trader = this.traderHelper.getTrader(request.tid, sessionID); // Track the amounts of each type of currency involved in the trade. - const currencyAmounts: { [key: string]: number; } = {}; + const currencyAmounts: { [key: string]: number } = {}; // Delete barter items and track currencies for (const index in request.scheme_items) { // Find the corresponding item in the player's inventory. - const item = pmcData.Inventory.items.find((i) => i._id === request.scheme_items[index].id); + const item = pmcData.Inventory.items.find(i => i._id === request.scheme_items[index].id); if (item !== undefined) { if (!this.paymentHelper.isMoneyTpl(item._tpl)) @@ -397,7 +396,7 @@ export class PaymentService */ protected isInStash(itemId: string, inventoryItems: Item[], playerStashId: string): boolean { - const itemParent = inventoryItems.find((x) => x._id === itemId); + const itemParent = inventoryItems.find(x => x._id === itemId); if (itemParent) { diff --git a/project/src/services/PlayerService.ts b/project/src/services/PlayerService.ts index c416f7a8..d8fd5bf1 100644 --- a/project/src/services/PlayerService.ts +++ b/project/src/services/PlayerService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; diff --git a/project/src/services/PmcChatResponseService.ts b/project/src/services/PmcChatResponseService.ts index c0cdba66..f20fd972 100644 --- a/project/src/services/PmcChatResponseService.ts +++ b/project/src/services/PmcChatResponseService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; @@ -230,7 +229,7 @@ export class PmcChatResponseService const keyBase = isVictim ? "pmcresponse-victim_" : "pmcresponse-killer_"; const keys = this.localisationService.getKeys(); - return keys.filter((x) => x.startsWith(`${keyBase}${keyType}`)); + return keys.filter(x => x.startsWith(`${keyBase}${keyType}`)); } /** @@ -241,7 +240,7 @@ export class PmcChatResponseService { const keys = this.localisationService.getKeys(); - return keys.filter((x) => x.startsWith("pmcresponse-suffix")); + return keys.filter(x => x.startsWith("pmcresponse-suffix")); } /** diff --git a/project/src/services/ProfileActivityService.ts b/project/src/services/ProfileActivityService.ts index b9f7619e..1d939dda 100644 --- a/project/src/services/ProfileActivityService.ts +++ b/project/src/services/ProfileActivityService.ts @@ -22,7 +22,7 @@ export class ProfileActivityService } // True if difference since last timestamp to now is below desired amount - return (currentTimestamp - storedActivityTimestamp) < (minutes * 60); // convert minutes to seconds to compare + return currentTimestamp - storedActivityTimestamp < minutes * 60; // convert minutes to seconds to compare } /** @@ -44,7 +44,7 @@ export class ProfileActivityService } // Profile was active in last x minutes, add to return list - if ((currentTimestamp - lastActiveTimestamp) < (minutes * 60)) + if (currentTimestamp - lastActiveTimestamp < minutes * 60) { result.push(id); } diff --git a/project/src/services/ProfileFixerService.ts b/project/src/services/ProfileFixerService.ts index 28205ee0..d7207c49 100644 --- a/project/src/services/ProfileFixerService.ts +++ b/project/src/services/ProfileFixerService.ts @@ -1,13 +1,11 @@ import { inject, injectable } from "tsyringe"; - import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper"; import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; -import { Bonus, HideoutSlot, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase"; -import { IHideoutImprovement } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Bonus, HideoutSlot, IQuestStatus, IHideoutImprovement } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea"; @@ -87,70 +85,70 @@ export class ProfileFixerService this.reorderHideoutAreasWithResouceInputs(pmcProfile); if ( - pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.GENERATOR).slots.length - < (6 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .Generator.Slots) + pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.GENERATOR).slots.length + < 6 + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .Generator.Slots ) { this.logger.debug("Updating generator area slots to a size of 6 + hideout management skill"); this.addEmptyObjectsToHideoutAreaSlots( HideoutAreas.GENERATOR, 6 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .Generator.Slots, + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .Generator.Slots, pmcProfile, ); } if ( - pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WATER_COLLECTOR).slots.length - < (1 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .WaterCollector.Slots) + pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WATER_COLLECTOR).slots.length + < 1 + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .WaterCollector.Slots ) { this.logger.debug("Updating water collector area slots to a size of 1 + hideout management skill"); this.addEmptyObjectsToHideoutAreaSlots( HideoutAreas.WATER_COLLECTOR, 1 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .WaterCollector.Slots, + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .WaterCollector.Slots, pmcProfile, ); } if ( - pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.AIR_FILTERING).slots.length - < (3 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .AirFilteringUnit.Slots) + pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.AIR_FILTERING).slots.length + < 3 + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .AirFilteringUnit.Slots ) { this.logger.debug("Updating air filter area slots to a size of 3 + hideout management skill"); this.addEmptyObjectsToHideoutAreaSlots( HideoutAreas.AIR_FILTERING, 3 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .AirFilteringUnit.Slots, + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .AirFilteringUnit.Slots, pmcProfile, ); } // BTC Farm doesnt have extra slots for hideout management, but we still check for modded stuff!! if ( - pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.BITCOIN_FARM).slots.length - < (50 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .BitcoinFarm.Slots) + pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.BITCOIN_FARM).slots.length + < 50 + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .BitcoinFarm.Slots ) { this.logger.debug("Updating bitcoin farm area slots to a size of 50 + hideout management skill"); this.addEmptyObjectsToHideoutAreaSlots( HideoutAreas.BITCOIN_FARM, 50 - + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots - .BitcoinFarm.Slots, + + this.databaseServer.getTables().globals.config.SkillsSettings.HideoutManagement.EliteSlots + .BitcoinFarm.Slots, pmcProfile, ); } @@ -172,7 +170,7 @@ export class ProfileFixerService protected addMissingGunStandContainerImprovements(pmcProfile: IPmcData): void { - const weaponStandArea = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WEAPON_STAND); + const weaponStandArea = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WEAPON_STAND); if (!weaponStandArea || weaponStandArea.level === 0) { // No stand in profile or its level 0, skip @@ -180,8 +178,8 @@ export class ProfileFixerService } const db = this.databaseServer.getTables(); - const hideoutStandAreaDb = db.hideout.areas.find((x) => x.type === HideoutAreas.WEAPON_STAND); - const hideoutStandSecondaryAreaDb = db.hideout.areas.find((x) => x.parentArea === hideoutStandAreaDb._id); + const hideoutStandAreaDb = db.hideout.areas.find(x => x.type === HideoutAreas.WEAPON_STAND); + const hideoutStandSecondaryAreaDb = db.hideout.areas.find(x => x.parentArea === hideoutStandAreaDb._id); const stageCurrentAt = hideoutStandAreaDb.stages[weaponStandArea.level]; const hideoutStandStashId = pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.WEAPON_STAND]; const hideoutSecondaryStashId = pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.WEAPON_STAND_SECONDARY]; @@ -191,11 +189,11 @@ export class ProfileFixerService { // Value is missing, add it pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.WEAPON_STAND] = hideoutStandAreaDb._id; - pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.WEAPON_STAND_SECONDARY] = - hideoutStandSecondaryAreaDb._id; + pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.WEAPON_STAND_SECONDARY] + = hideoutStandSecondaryAreaDb._id; // Add stash item to profile - const gunStandStashItem = pmcProfile.Inventory.items.find((x) => x._id === hideoutStandAreaDb._id); + const gunStandStashItem = pmcProfile.Inventory.items.find(x => x._id === hideoutStandAreaDb._id); if (gunStandStashItem) { gunStandStashItem._tpl = stageCurrentAt.container; @@ -212,8 +210,8 @@ export class ProfileFixerService } // Add secondary stash item to profile - const gunStandStashSecondaryItem = pmcProfile.Inventory.items.find((x) => - x._id === hideoutStandSecondaryAreaDb._id + const gunStandStashSecondaryItem = pmcProfile.Inventory.items.find(x => + x._id === hideoutStandSecondaryAreaDb._id, ); if (gunStandStashItem) { @@ -236,12 +234,12 @@ export class ProfileFixerService return; } - let stashItem = pmcProfile.Inventory.items?.find((x) => x._id === hideoutStandAreaDb._id); + let stashItem = pmcProfile.Inventory.items?.find(x => x._id === hideoutStandAreaDb._id); if (!stashItem) { // Stand inventory stash item doesnt exist, add it pmcProfile.Inventory.items.push({ _id: hideoutStandAreaDb._id, _tpl: stageCurrentAt.container }); - stashItem = pmcProfile.Inventory.items?.find((x) => x._id === hideoutStandAreaDb._id); + stashItem = pmcProfile.Inventory.items?.find(x => x._id === hideoutStandAreaDb._id); } // `hideoutAreaStashes` has value related stash inventory items tpl doesnt match what's expected @@ -254,12 +252,12 @@ export class ProfileFixerService stashItem._tpl = stageCurrentAt.container; } - let stashSecondaryItem = pmcProfile.Inventory.items?.find((x) => x._id === hideoutStandSecondaryAreaDb._id); + let stashSecondaryItem = pmcProfile.Inventory.items?.find(x => x._id === hideoutStandSecondaryAreaDb._id); if (!stashSecondaryItem) { // Stand inventory stash item doesnt exist, add it pmcProfile.Inventory.items.push({ _id: hideoutStandSecondaryAreaDb._id, _tpl: stageCurrentAt.container }); - stashSecondaryItem = pmcProfile.Inventory.items?.find((x) => x._id === hideoutStandSecondaryAreaDb._id); + stashSecondaryItem = pmcProfile.Inventory.items?.find(x => x._id === hideoutStandSecondaryAreaDb._id); } // `hideoutAreaStashes` has value related stash inventory items tpl doesnt match what's expected @@ -275,7 +273,7 @@ export class ProfileFixerService protected addMissingHallOfFameContainerImprovements(pmcProfile: IPmcData): void { - const placeOfFameArea = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.PLACE_OF_FAME); + const placeOfFameArea = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.PLACE_OF_FAME); if (!placeOfFameArea || placeOfFameArea.level === 0) { // No place of fame in profile or its level 0, skip @@ -283,7 +281,7 @@ export class ProfileFixerService } const db = this.databaseServer.getTables(); - const placeOfFameAreaDb = db.hideout.areas.find((area) => area.type === HideoutAreas.PLACE_OF_FAME); + const placeOfFameAreaDb = db.hideout.areas.find(area => area.type === HideoutAreas.PLACE_OF_FAME); if (!placeOfFameAreaDb) { return; @@ -298,7 +296,7 @@ export class ProfileFixerService pmcProfile.Inventory.hideoutAreaStashes[HideoutAreas.PLACE_OF_FAME] = placeOfFameAreaDb._id; // Add stash item to profile - const placeOfFameStashItem = pmcProfile.Inventory.items.find((x) => x._id === placeOfFameAreaDb._id); + const placeOfFameStashItem = pmcProfile.Inventory.items.find(x => x._id === placeOfFameAreaDb._id); if (placeOfFameStashItem) { placeOfFameStashItem._tpl = stageCurrentlyAt.container; @@ -317,12 +315,12 @@ export class ProfileFixerService return; } - let stashItem = pmcProfile.Inventory.items?.find((x) => x._id === placeOfFameAreaDb._id); + let stashItem = pmcProfile.Inventory.items?.find(x => x._id === placeOfFameAreaDb._id); if (!stashItem) { // Stand inventory stash item doesnt exist, add it pmcProfile.Inventory.items.push({ _id: placeOfFameAreaDb._id, _tpl: stageCurrentlyAt.container }); - stashItem = pmcProfile.Inventory.items?.find((x) => x._id === placeOfFameAreaDb._id); + stashItem = pmcProfile.Inventory.items?.find(x => x._id === placeOfFameAreaDb._id); } // `hideoutAreaStashes` has value related stash inventory items tpl doesnt match what's expected @@ -339,10 +337,10 @@ export class ProfileFixerService protected ensureGunStandLevelsMatch(pmcProfile: IPmcData): void { // only proceed if stand is level 1 or above - const gunStandParent = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WEAPON_STAND); + const gunStandParent = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WEAPON_STAND); if (gunStandParent && gunStandParent.level > 0) { - const gunStandChild = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WEAPON_STAND_SECONDARY); + const gunStandChild = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WEAPON_STAND_SECONDARY); if (gunStandChild && gunStandParent.level !== gunStandChild.level) { this.logger.success("Upgraded gun stand levels to match"); @@ -362,7 +360,7 @@ export class ProfileFixerService protected addMissingHideoutWallAreas(pmcProfile: IPmcData): void { - if (!pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WEAPON_STAND)) + if (!pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WEAPON_STAND)) { pmcProfile.Hideout.Areas.push({ type: 24, @@ -376,7 +374,7 @@ export class ProfileFixerService }); } - if (!pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.WEAPON_STAND_SECONDARY)) + if (!pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.WEAPON_STAND_SECONDARY)) { pmcProfile.Hideout.Areas.push({ type: 25, @@ -473,14 +471,14 @@ export class ProfileFixerService // Only check if profile has repeatable quests if (pmcProfile.RepeatableQuests && activeRepeatableQuests.length > 0) { - const existsInActiveRepeatableQuests = activeRepeatableQuests.some((quest) => - quest._id === taskConditionCounter.sourceId + const existsInActiveRepeatableQuests = activeRepeatableQuests.some(quest => + quest._id === taskConditionCounter.sourceId, ); - const existsInQuests = pmcProfile.Quests.some((quest) => - quest.qid === taskConditionCounter.sourceId + const existsInQuests = pmcProfile.Quests.some(quest => + quest.qid === taskConditionCounter.sourceId, ); - const isAchievementTracker = achievements.some((quest) => - quest.id === taskConditionCounter.sourceId + const isAchievementTracker = achievements.some(quest => + quest.id === taskConditionCounter.sourceId, ); // If task conditions id is neither in activeQuests, quests or achievements - it's stale and should be cleaned up @@ -617,9 +615,7 @@ export class ProfileFixerService { if ( !(currentRepeatable.changeRequirement - && currentRepeatable.activeQuests.every(( - x, - ) => (typeof x.changeCost !== "undefined" && typeof x.changeStandingCost !== "undefined"))) + && currentRepeatable.activeQuests.every(x => typeof x.changeCost !== "undefined" && typeof x.changeStandingCost !== "undefined")) ) { repeatablesCompatible = false; @@ -644,9 +640,9 @@ export class ProfileFixerService */ protected addMissingWallImprovements(pmcProfile: IPmcData): void { - const profileWallArea = pmcProfile.Hideout.Areas.find((x) => x.type === HideoutAreas.EMERGENCY_WALL); - const wallDb = this.databaseServer.getTables().hideout.areas.find((x) => - x.type === HideoutAreas.EMERGENCY_WALL + const profileWallArea = pmcProfile.Hideout.Areas.find(x => x.type === HideoutAreas.EMERGENCY_WALL); + const wallDb = this.databaseServer.getTables().hideout.areas.find(x => + x.type === HideoutAreas.EMERGENCY_WALL, ); if (profileWallArea.level > 0) @@ -695,13 +691,13 @@ export class ProfileFixerService } // Only slots with location index - area.slots = area.slots.filter((x) => "locationIndex" in x); + area.slots = area.slots.filter(x => "locationIndex" in x); // Only slots that: // Have an item property and it has at least one item in it // Or // Have no item property - area.slots = area.slots.filter((x) => "item" in x && x.item?.length > 0 || !("item" in x)); + area.slots = area.slots.filter(x => "item" in x && x.item?.length > 0 || !("item" in x)); } } @@ -720,7 +716,7 @@ export class ProfileFixerService for (const areaId of areasToCheck) { - const area = pmcProfile.Hideout.Areas.find((area) => area.type === areaId); + const area = pmcProfile.Hideout.Areas.find(area => area.type === areaId); if (!area) { this.logger.debug(`unable to sort: ${area.type} (${areaId}) slots, no area found`); @@ -751,7 +747,7 @@ export class ProfileFixerService pmcProfile: IPmcData, ): void { - const area = pmcProfile.Hideout.Areas.find((x) => x.type === areaType); + const area = pmcProfile.Hideout.Areas.find(x => x.type === areaType); area.slots = this.addObjectsToArray(emptyItemCount, area.slots); } @@ -759,7 +755,7 @@ export class ProfileFixerService { for (let i = 0; i < count; i++) { - if (!slots.find((x) => x.locationIndex === i)) + if (!slots.find(x => x.locationIndex === i)) { slots.push({ locationIndex: i }); } @@ -797,7 +793,7 @@ export class ProfileFixerService } // Iterate over area levels, check for bonuses, add if needed - const dbArea = dbHideoutAreas.find((x) => x.type === areaType); + const dbArea = dbHideoutAreas.find(x => x.type === areaType); if (!dbArea) { continue; @@ -842,22 +838,22 @@ export class ProfileFixerService // match by id first, used by "TextBonus" bonuses if (bonus.id) { - return profileBonuses.find((x) => x.id === bonus.id); + return profileBonuses.find(x => x.id === bonus.id); } if (bonus.type === BonusType.STASH_SIZE) { - return profileBonuses.find((x) => x.type === bonus.type && x.templateId === bonus.templateId); + return profileBonuses.find(x => x.type === bonus.type && x.templateId === bonus.templateId); } if (bonus.type === BonusType.ADDITIONAL_SLOTS) { - return profileBonuses.find((x) => - x.type === bonus.type && x.value === bonus.value && x.visible === bonus.visible + return profileBonuses.find(x => + x.type === bonus.type && x.value === bonus.value && x.visible === bonus.visible, ); } - return profileBonuses.find((x) => x.type === bonus.type && x.value === bonus.value); + return profileBonuses.find(x => x.type === bonus.type && x.value === bonus.value); } /** @@ -872,8 +868,8 @@ export class ProfileFixerService // Get items placed in root of stash // TODO: extend to other areas / sub items - const inventoryItemsToCheck = pmcProfile.Inventory.items.filter((item) => - ["hideout", "main"].includes(item.slotId) + const inventoryItemsToCheck = pmcProfile.Inventory.items.filter(item => + ["hideout", "main"].includes(item.slotId), ); if (inventoryItemsToCheck) { @@ -897,24 +893,27 @@ export class ProfileFixerService } } - // Remove invalid builds from weapon, equipment and magazine build lists - const weaponBuilds = fullProfile.userbuilds?.weaponBuilds || []; - fullProfile.userbuilds.weaponBuilds = weaponBuilds.filter((weaponBuild) => + if (fullProfile.userbuilds) { - return !this.shouldRemoveWeaponEquipmentBuild("weapon", weaponBuild, itemsDb); - }); + // Remove invalid builds from weapon, equipment and magazine build lists + const weaponBuilds = fullProfile.userbuilds?.weaponBuilds || []; + fullProfile.userbuilds.weaponBuilds = weaponBuilds.filter((weaponBuild) => + { + return !this.shouldRemoveWeaponEquipmentBuild("weapon", weaponBuild, itemsDb); + }); - const equipmentBuilds = fullProfile.userbuilds?.equipmentBuilds || []; - fullProfile.userbuilds.equipmentBuilds = equipmentBuilds.filter((equipmentBuild) => - { - return !this.shouldRemoveWeaponEquipmentBuild("equipment", equipmentBuild, itemsDb); - }); + const equipmentBuilds = fullProfile.userbuilds?.equipmentBuilds || []; + fullProfile.userbuilds.equipmentBuilds = equipmentBuilds.filter((equipmentBuild) => + { + return !this.shouldRemoveWeaponEquipmentBuild("equipment", equipmentBuild, itemsDb); + }); - const magazineBuilds = fullProfile.userbuilds?.magazineBuilds || []; - fullProfile.userbuilds.magazineBuilds = magazineBuilds.filter((magazineBuild) => - { - return !this.shouldRemoveMagazineBuild(magazineBuild, itemsDb); - }); + const magazineBuilds = fullProfile.userbuilds?.magazineBuilds || []; + fullProfile.userbuilds.magazineBuilds = magazineBuilds.filter((magazineBuild) => + { + return !this.shouldRemoveMagazineBuild(magazineBuild, itemsDb); + }); + } // Iterate over dialogs, looking for messages with items not found in item db, remove message if item found for (const dialogId in fullProfile.dialogues) @@ -951,7 +950,7 @@ export class ProfileFixerService if (this.coreConfig.fixes.removeModItemsFromProfile) { - dialog.messages.splice(dialog.messages.findIndex((x) => x._id === message._id), 1); + dialog.messages.splice(dialog.messages.findIndex(x => x._id === message._id), 1); this.logger.warning( `Item: ${item._tpl} has resulted in the deletion of message: ${message._id} from dialog ${dialogId}`, ); @@ -990,7 +989,7 @@ export class ProfileFixerService `Non-default quest: ${activeQuest._id} from trader: ${activeQuest.traderId} removed from RepeatableQuests list in profile`, ); repeatable.activeQuests.splice( - repeatable.activeQuests.findIndex((x) => x._id === activeQuest._id), + repeatable.activeQuests.findIndex(x => x._id === activeQuest._id), 1, ); } @@ -1015,7 +1014,7 @@ export class ProfileFixerService `Non-default quest: ${activeQuest._id} from trader: ${activeQuest.traderId} removed from RepeatableQuests list in profile`, ); repeatable.activeQuests.splice( - repeatable.activeQuests.findIndex((x) => x._id === activeQuest._id), + repeatable.activeQuests.findIndex(x => x._id === activeQuest._id), 1, ); } @@ -1140,7 +1139,7 @@ export class ProfileFixerService if (itemAJson === itemBJson) { // Both items match, we can safely delete one - const indexOfItemToRemove = pmcProfile.Inventory.items.findIndex((x) => x._id === key); + const indexOfItemToRemove = pmcProfile.Inventory.items.findIndex(x => x._id === key); pmcProfile.Inventory.items.splice(indexOfItemToRemove, 1); this.logger.warning(`Deleted duplicate item: ${key}`); } @@ -1148,10 +1147,10 @@ export class ProfileFixerService { // Items are different, replace ID with unique value // Only replace ID if items have no children, we dont want orphaned children - const itemsHaveChildren = pmcProfile.Inventory.items.some((x) => x.parentId === key); + const itemsHaveChildren = pmcProfile.Inventory.items.some(x => x.parentId === key); if (!itemsHaveChildren) { - const itemToAdjustId = pmcProfile.Inventory.items.find((x) => x._id === key); + const itemToAdjustId = pmcProfile.Inventory.items.find(x => x._id === key); itemToAdjustId._id = this.hashUtil.generate(); this.logger.warning(`Replace duplicate item Id: ${key} with ${itemToAdjustId._id}`); } @@ -1159,7 +1158,7 @@ export class ProfileFixerService } // Iterate over all inventory items - for (const item of pmcProfile.Inventory.items.filter((x) => x.slotId)) + for (const item of pmcProfile.Inventory.items.filter(x => x.slotId)) { if (!item.upd) { @@ -1192,35 +1191,35 @@ export class ProfileFixerService if (!customizationDb[pmcProfile.Customization.Head]) { const defaultHead = playerIsUsec - ? customizationDbArray.find((x) => x._name === "DefaultUsecHead") - : customizationDbArray.find((x) => x._name === "DefaultBearHead"); + ? customizationDbArray.find(x => x._name === "DefaultUsecHead") + : customizationDbArray.find(x => x._name === "DefaultBearHead"); pmcProfile.Customization.Head = defaultHead._id; } // check Body if (!customizationDb[pmcProfile.Customization.Body]) { - const defaultBody = (pmcProfile.Info.Side.toLowerCase() === "usec") - ? customizationDbArray.find((x) => x._name === "DefaultUsecBody") - : customizationDbArray.find((x) => x._name === "DefaultBearBody"); + const defaultBody = pmcProfile.Info.Side.toLowerCase() === "usec" + ? customizationDbArray.find(x => x._name === "DefaultUsecBody") + : customizationDbArray.find(x => x._name === "DefaultBearBody"); pmcProfile.Customization.Body = defaultBody._id; } // check Hands if (!customizationDb[pmcProfile.Customization.Hands]) { - const defaultHands = (pmcProfile.Info.Side.toLowerCase() === "usec") - ? customizationDbArray.find((x) => x._name === "DefaultUsecHands") - : customizationDbArray.find((x) => x._name === "DefaultBearHands"); + const defaultHands = pmcProfile.Info.Side.toLowerCase() === "usec" + ? customizationDbArray.find(x => x._name === "DefaultUsecHands") + : customizationDbArray.find(x => x._name === "DefaultBearHands"); pmcProfile.Customization.Hands = defaultHands._id; } // check Hands if (!customizationDb[pmcProfile.Customization.Feet]) { - const defaultFeet = (pmcProfile.Info.Side.toLowerCase() === "usec") - ? customizationDbArray.find((x) => x._name === "DefaultUsecFeet") - : customizationDbArray.find((x) => x._name === "DefaultBearFeet"); + const defaultFeet = pmcProfile.Info.Side.toLowerCase() === "usec" + ? customizationDbArray.find(x => x._name === "DefaultUsecFeet") + : customizationDbArray.find(x => x._name === "DefaultBearFeet"); pmcProfile.Customization.Feet = defaultFeet._id; } } @@ -1265,7 +1264,7 @@ export class ProfileFixerService // Get all areas from templates/profiles.json for (const area of profileTemplate.character.Hideout.Areas) { - if (!pmcProfile.Hideout.Areas.find((x) => x.type === area.type)) + if (!pmcProfile.Hideout.Areas.find(x => x.type === area.type)) { pmcProfile.Hideout.Areas.push(area); this.logger.debug(`Added missing hideout area ${area.type} to profile`); @@ -1354,8 +1353,8 @@ export class ProfileFixerService for (const stageIndex in area.stages) { const stageInfo = area.stages[stageIndex]; - const matchingBonus = stageInfo.bonuses.find((x) => - x.templateId === bonus.templateId && x.type === bonus.type + const matchingBonus = stageInfo.bonuses.find(x => + x.templateId === bonus.templateId && x.type === bonus.type, ); if (matchingBonus) { @@ -1424,7 +1423,7 @@ export class ProfileFixerService for (let i = profileQuests.length - 1; i >= 0; i--) { - if (!(quests[profileQuests[i].qid] || repeatableQuests.find((x) => x._id === profileQuests[i].qid))) + if (!(quests[profileQuests[i].qid] || repeatableQuests.find(x => x._id === profileQuests[i].qid))) { profileQuests.splice(i, 1); this.logger.success("Successfully removed orphaned quest that doesnt exist in our quest data"); diff --git a/project/src/services/ProfileSnapshotService.ts b/project/src/services/ProfileSnapshotService.ts index f1ffe7c5..6d2da464 100644 --- a/project/src/services/ProfileSnapshotService.ts +++ b/project/src/services/ProfileSnapshotService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; diff --git a/project/src/services/RagfairCategoriesService.ts b/project/src/services/RagfairCategoriesService.ts index 1f0827dd..60fe6375 100644 --- a/project/src/services/RagfairCategoriesService.ts +++ b/project/src/services/RagfairCategoriesService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData, OfferOwnerType } from "@spt-aki/models/eft/ragfair/ISearchRequestData"; diff --git a/project/src/services/RagfairLinkedItemService.ts b/project/src/services/RagfairLinkedItemService.ts index b881cdc0..b9e1b10f 100644 --- a/project/src/services/RagfairLinkedItemService.ts +++ b/project/src/services/RagfairLinkedItemService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; @@ -95,7 +94,7 @@ export class RagfairLinkedItemService applyLinkedItems: (items: string[]) => void, ): void { - const cylinderMod = cylinder._props.Slots.find((x) => x._name === "mod_magazine"); + const cylinderMod = cylinder._props.Slots.find(x => x._name === "mod_magazine"); if (cylinderMod) { // Get the first cylinder filter tpl diff --git a/project/src/services/RagfairOfferService.ts b/project/src/services/RagfairOfferService.ts index ab8fda7d..2a8db32e 100644 --- a/project/src/services/RagfairOfferService.ts +++ b/project/src/services/RagfairOfferService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; @@ -252,7 +251,7 @@ export class RagfairOfferService const pmcId = String(playerOffer.user.id); const profile = this.profileHelper.getProfileByPmcId(pmcId); - const offerinProfileIndex = profile.RagfairInfo.offers.findIndex((o) => o._id === playerOffer._id); + const offerinProfileIndex = profile.RagfairInfo.offers.findIndex(o => o._id === playerOffer._id); if (offerinProfileIndex === -1) { this.logger.warning( diff --git a/project/src/services/RagfairPriceService.ts b/project/src/services/RagfairPriceService.ts index 6f1d4adb..889264f6 100644 --- a/project/src/services/RagfairPriceService.ts +++ b/project/src/services/RagfairPriceService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; @@ -75,8 +74,8 @@ export class RagfairPriceService implements OnLoad public generateStaticPrices(): void { for ( - const item of Object.values(this.databaseServer.getTables().templates.items).filter((x) => - x._type === "Item" + const item of Object.values(this.databaseServer.getTables().templates.items).filter(x => + x._type === "Item", ) ) { @@ -318,8 +317,8 @@ export class RagfairPriceService implements OnLoad if (this.itemHelper.isOfBaseclass(itemTemplateId, baseClassTemplateId)) { // Found an unreasonable price type. - const unreasonableModifier: IUnreasonableModPrices = - this.ragfairConfig.dynamic.unreasonableModPrices[baseClassTemplateId]; + const unreasonableModifier: IUnreasonableModPrices + = this.ragfairConfig.dynamic.unreasonableModPrices[baseClassTemplateId]; if (unreasonableModifier.enabled) { @@ -366,14 +365,14 @@ export class RagfairPriceService implements OnLoad price: number, ): number { - const itemHandbookPrice = handbookPrices.find((handbookItem) => handbookItem.Id === itemTpl); + const itemHandbookPrice = handbookPrices.find(handbookItem => handbookItem.Id === itemTpl); if (!itemHandbookPrice) { return price; } // Flea price is over handbook price - if (price > (itemHandbookPrice.Price * unreasonableItemChange.handbookPriceOverMultiplier)) + if (price > itemHandbookPrice.Price * unreasonableItemChange.handbookPriceOverMultiplier) { // Skip extreme values if (price <= 1) @@ -468,8 +467,8 @@ export class RagfairPriceService implements OnLoad } // Get mods on current gun not in default preset - const newOrReplacedModsInPresetVsDefault = weaponWithChildren.filter((x) => - !presetResult.preset._items.some((y) => y._tpl === x._tpl) + const newOrReplacedModsInPresetVsDefault = weaponWithChildren.filter(x => + !presetResult.preset._items.some(y => y._tpl === x._tpl), ); // Add up extra mods price @@ -484,8 +483,8 @@ export class RagfairPriceService implements OnLoad if (newOrReplacedModsInPresetVsDefault.length >= 1) { // Add up cost of mods replaced - const modsReplacedByNewMods = newOrReplacedModsInPresetVsDefault.filter((x) => - presetResult.preset._items.some((y) => y.slotId === x.slotId) + const modsReplacedByNewMods = newOrReplacedModsInPresetVsDefault.filter(x => + presetResult.preset._items.some(y => y.slotId === x.slotId), ); // Add up replaced mods price @@ -526,7 +525,7 @@ export class RagfairPriceService implements OnLoad * @param presets weapon presets to choose from * @returns Default preset object */ - protected getWeaponPreset(weapon: Item): { isDefault: boolean; preset: IPreset; } + protected getWeaponPreset(weapon: Item): { isDefault: boolean, preset: IPreset } { const defaultPreset = this.presetHelper.getDefaultPreset(weapon._tpl); if (defaultPreset) diff --git a/project/src/services/RagfairRequiredItemsService.ts b/project/src/services/RagfairRequiredItemsService.ts index d73c3c53..7040c99b 100644 --- a/project/src/services/RagfairRequiredItemsService.ts +++ b/project/src/services/RagfairRequiredItemsService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper"; import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; diff --git a/project/src/services/RagfairTaxService.ts b/project/src/services/RagfairTaxService.ts index b2f7b7fb..62b72a10 100644 --- a/project/src/services/RagfairTaxService.ts +++ b/project/src/services/RagfairTaxService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; @@ -72,7 +71,7 @@ export class RagfairTaxService const itemTaxMult = this.databaseServer.getTables().globals.config.RagFair.communityItemTax / 100.0; const requirementTaxMult = this.databaseServer.getTables().globals.config.RagFair.communityRequirementTax - / 100.0; + / 100.0; let itemPriceMult = Math.log10(itemWorth / requirementsPrice); let requirementPriceMult = Math.log10(requirementsPrice / itemWorth); @@ -89,11 +88,11 @@ export class RagfairTaxService itemPriceMult = 4 ** itemPriceMult; requirementPriceMult = 4 ** requirementPriceMult; - const hideoutFleaTaxDiscountBonus = pmcData.Bonuses.find((b) => b.type === BonusType.RAGFAIR_COMMISSION); + const hideoutFleaTaxDiscountBonus = pmcData.Bonuses.find(b => b.type === BonusType.RAGFAIR_COMMISSION); const taxDiscountPercent = hideoutFleaTaxDiscountBonus ? Math.abs(hideoutFleaTaxDiscountBonus.value) : 0; const tax = itemWorth * itemTaxMult * itemPriceMult - + requirementsPrice * requirementTaxMult * requirementPriceMult; + + requirementsPrice * requirementTaxMult * requirementPriceMult; const discountedTax = tax * (1.0 - taxDiscountPercent / 100.0); const itemComissionMult = itemTemplate._props.RagFairCommissionModifier ? itemTemplate._props.RagFairCommissionModifier @@ -154,7 +153,7 @@ export class RagfairTaxService if ("Key" in item.upd && itemTemplate._props.MaximumNumberOfUsage > 0) { worth = worth / itemTemplate._props.MaximumNumberOfUsage - * (itemTemplate._props.MaximumNumberOfUsage - item.upd.Key.NumberOfUsages); + * (itemTemplate._props.MaximumNumberOfUsage - item.upd.Key.NumberOfUsages); } if ("Resource" in item.upd && itemTemplate._props.MaxResource > 0) @@ -177,14 +176,14 @@ export class RagfairTaxService worth = worth / itemTemplate._props.MaxResource * item.upd.FoodDrink.HpPercent; } - if ("Repairable" in item.upd && itemTemplate._props.armorClass > 0) + if ("Repairable" in item.upd && itemTemplate._props.armorClass > 0) { - const num2 = 0.01 * (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), - ); + const num2 = 0.01 * 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), + ); } return worth * itemCount; diff --git a/project/src/services/RaidTimeAdjustmentService.ts b/project/src/services/RaidTimeAdjustmentService.ts index 38348adb..875a1e54 100644 --- a/project/src/services/RaidTimeAdjustmentService.ts +++ b/project/src/services/RaidTimeAdjustmentService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ApplicationContext } from "@spt-aki/context/ApplicationContext"; import { ContextVariableType } from "@spt-aki/context/ContextVariableType"; import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper"; @@ -81,7 +80,7 @@ export class RaidTimeAdjustmentService { // Remove waves that spawned before the player joined const originalWaveCount = mapBase.waves.length; - mapBase.waves = mapBase.waves.filter((x) => x.time_max > raidAdjustments.simulatedRaidStartSeconds); + mapBase.waves = mapBase.waves.filter(x => x.time_max > raidAdjustments.simulatedRaidStartSeconds); // Adjust wave min/max times to match new simulated start for (const wave of mapBase.waves) @@ -168,7 +167,7 @@ export class RaidTimeAdjustmentService // Calculate how long player needs to be in raid to get a `survived` extract status result.NewSurviveTimeSeconds = Math.max( - result.OriginalSurvivalTimeSeconds - ((baseEscapeTimeMinutes - newRaidTimeMinutes) * 60), + result.OriginalSurvivalTimeSeconds - (baseEscapeTimeMinutes - newRaidTimeMinutes) * 60, 0, ); @@ -238,12 +237,12 @@ export class RaidTimeAdjustmentService // // I added 2 seconds just to be safe... // - const trainArrivalDelaySeconds = - this.locationConfig.scavRaidTimeSettings.settings.trainArrivalDelayObservedSeconds; + const trainArrivalDelaySeconds + = this.locationConfig.scavRaidTimeSettings.settings.trainArrivalDelayObservedSeconds; // Determine the earliest possible time in the raid when the train would leave - const earliestPossibleDepartureMinutes = - (exit.MinTime + exit.Count + exit.ExfiltrationTime + trainArrivalDelaySeconds) / 60; + const earliestPossibleDepartureMinutes + = (exit.MinTime + exit.Count + exit.ExfiltrationTime + trainArrivalDelaySeconds) / 60; // If raid is after last moment train can leave, assume train has already left, disable extract const mostPossibleTimeRemainingAfterDeparture = mapBase.EscapeTimeLimit - earliestPossibleDepartureMinutes; diff --git a/project/src/services/RepairService.ts b/project/src/services/RepairService.ts index 47f369f8..214ebf04 100644 --- a/project/src/services/RepairService.ts +++ b/project/src/services/RepairService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { RepairHelper } from "@spt-aki/helpers/RepairHelper"; @@ -61,7 +60,7 @@ export class RepairService traderId: string, ): RepairDetails { - const itemToRepair = pmcData.Inventory.items.find((x) => x._id === repairItemDetails._id); + const itemToRepair = pmcData.Inventory.items.find(x => x._id === repairItemDetails._id); if (itemToRepair === undefined) { throw new Error(`Item ${repairItemDetails._id} not found in profile inventory, unable to repair`); @@ -70,7 +69,7 @@ export class RepairService const priceCoef = this.traderHelper.getLoyaltyLevel(traderId, pmcData).repair_price_coef; const traderRepairDetails = this.traderHelper.getTrader(traderId, sessionID).repair; const repairQualityMultiplier = Number(traderRepairDetails.quality); - const repairRate = (priceCoef <= 0) ? 1 : (priceCoef / 100 + 1); + const repairRate = priceCoef <= 0 ? 1 : priceCoef / 100 + 1; const itemToRepairDetails = this.databaseServer.getTables().templates.items[itemToRepair._tpl]; const repairItemIsArmor = !!itemToRepairDetails._props.ArmorMaterial; @@ -88,7 +87,7 @@ export class RepairService // get repair price const itemRepairCost = this.databaseServer.getTables().templates.items[itemToRepair._tpl]._props.RepairCost; const repairCost = Math.round( - (itemRepairCost * repairItemDetails.count * repairRate) * this.repairConfig.priceMultiplier, + itemRepairCost * repairItemDetails.count * repairRate * this.repairConfig.priceMultiplier, ); this.logger.debug(`item base repair cost: ${itemRepairCost}`, true); @@ -186,7 +185,7 @@ export class RepairService const isHeavyArmor = itemDetails[1]._props.ArmorType === "Heavy"; const vestSkillToLevel = isHeavyArmor ? SkillTypes.HEAVY_VESTS : SkillTypes.LIGHT_VESTS; const pointsToAddToVestSkill = repairDetails.repairPoints - * this.repairConfig.armorKitSkillPointGainPerRepairPointMultiplier; + * this.repairConfig.armorKitSkillPointGainPerRepairPointMultiplier; this.logger.debug(`Added: ${pointsToAddToVestSkill} ${vestSkillToLevel} skill`); this.profileHelper.addSkillPointsToPlayer(pmcData, vestSkillToLevel, pointsToAddToVestSkill); @@ -206,8 +205,8 @@ export class RepairService if (repairDetails.repairedByKit) { // Weapons/armor have different multipliers - const intRepairMultiplier = - (this.itemHelper.isOfBaseclass(repairDetails.repairedItem._tpl, BaseClasses.WEAPON)) + const intRepairMultiplier + = this.itemHelper.isOfBaseclass(repairDetails.repairedItem._tpl, BaseClasses.WEAPON) ? this.repairConfig.repairKitIntellectGainMultiplier.weapon : this.repairConfig.repairKitIntellectGainMultiplier.armor; @@ -275,7 +274,7 @@ export class RepairService ): RepairDetails { // Find item to repair in inventory - const itemToRepair = pmcData.Inventory.items.find((x: { _id: string; }) => x._id === itemToRepairId); + const itemToRepair = pmcData.Inventory.items.find((x: { _id: string }) => x._id === itemToRepairId); if (itemToRepair === undefined) { throw new Error(`Item ${itemToRepairId} not found, unable to repair`); @@ -303,7 +302,7 @@ export class RepairService // Find and use repair kit defined in body for (const repairKit of repairKits) { - const repairKitInInventory = pmcData.Inventory.items.find((x) => x._id === repairKit._id); + const repairKitInInventory = pmcData.Inventory.items.find(x => x._id === repairKit._id); const repairKitDetails = itemsDb[repairKitInInventory._tpl]; const repairKitReductionAmount = repairKit.count; @@ -338,7 +337,7 @@ export class RepairService const intellectRepairPointsPerLevel = globals.config.SkillsSettings.Intellect.RepairPointsCostReduction; const profileIntellectLevel = this.profileHelper.getSkillFromProfile(pmcData, SkillTypes.INTELLECT)?.Progress - ?? 0; + ?? 0; const intellectPointReduction = intellectRepairPointsPerLevel * Math.trunc(profileIntellectLevel / 100); if (isArmor) @@ -371,11 +370,11 @@ export class RepairService */ protected getBonusMultiplierValue(skillBonus: BonusType, pmcData: IPmcData): number { - const bonusesMatched = pmcData?.Bonuses?.filter((b) => b.type === skillBonus); + const bonusesMatched = pmcData?.Bonuses?.filter(b => b.type === skillBonus); let value = 1; if (bonusesMatched != null) { - const sumedPercentage = bonusesMatched.map((b) => b.value).reduce((v1, v2) => v1 + v2, 0); + const sumedPercentage = bonusesMatched.map(b => b.value).reduce((v1, v2) => v1 + v2, 0); value = 1 + sumedPercentage / 100; } @@ -521,19 +520,19 @@ export class RepairService // Skill < level 10 + repairing armor if ( - ([SkillTypes.LIGHT_VESTS, SkillTypes.HEAVY_VESTS].includes(itemSkillType)) + [SkillTypes.LIGHT_VESTS, SkillTypes.HEAVY_VESTS].includes(itemSkillType) && this.profileHelper.getSkillFromProfile(pmcData, itemSkillType)?.Progress < 1000 ) { return false; } - const commonBuffMinChanceValue = - globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffMinChanceValue; - const commonBuffChanceLevelBonus = - globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffChanceLevelBonus; - const receivedDurabilityMaxPercent = - globals.config.SkillsSettings[itemSkillType as string].BuffSettings.ReceivedDurabilityMaxPercent; + const commonBuffMinChanceValue + = globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffMinChanceValue; + const commonBuffChanceLevelBonus + = globals.config.SkillsSettings[itemSkillType as string].BuffSettings.CommonBuffChanceLevelBonus; + const receivedDurabilityMaxPercent + = globals.config.SkillsSettings[itemSkillType as string].BuffSettings.ReceivedDurabilityMaxPercent; const skillLevel = Math.trunc( (this.profileHelper.getSkillFromProfile(pmcData, itemSkillType)?.Progress ?? 0) / 100, diff --git a/project/src/services/SeasonalEventService.ts b/project/src/services/SeasonalEventService.ts index bcb9af3d..6982b06b 100644 --- a/project/src/services/SeasonalEventService.ts +++ b/project/src/services/SeasonalEventService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; @@ -343,7 +342,7 @@ export class SeasonalEventService } // Get non-christmas items - const nonChristmasTpls = Object.keys(containerItems).filter((tpl) => !christmasItems.includes(tpl)); + const nonChristmasTpls = Object.keys(containerItems).filter(tpl => !christmasItems.includes(tpl)); const intermediaryDict = {}; for (const tpl of nonChristmasTpls) @@ -369,7 +368,7 @@ export class SeasonalEventService switch (eventType.toLowerCase()) { case SeasonalEventType.HALLOWEEN.toLowerCase(): - globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None"); + globalConfig.EventType = globalConfig.EventType.filter(x => x !== "None"); globalConfig.EventType.push("Halloween"); globalConfig.EventType.push("HalloweenIllumination"); globalConfig.Health.ProfileHealthSettings.DefaultStimulatorBuff = "Buffs_Halloween"; @@ -381,7 +380,7 @@ export class SeasonalEventService this.adjustTraderIcons(eventType); break; case SeasonalEventType.CHRISTMAS.toLowerCase(): - globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None"); + globalConfig.EventType = globalConfig.EventType.filter(x => x !== "None"); globalConfig.EventType.push("Christmas"); this.addEventGearToBots(eventType); this.addGifterBotToMaps(); @@ -434,9 +433,9 @@ export class SeasonalEventService } for (const boss of bossesToAdd) { - const mapBosses: BossLocationSpawn[] = - this.databaseServer.getTables().locations[mapKey].base.BossLocationSpawn; - if (!mapBosses.find((x) => x.BossName === boss.BossName)) + const mapBosses: BossLocationSpawn[] + = this.databaseServer.getTables().locations[mapKey].base.BossLocationSpawn; + if (!mapBosses.find(x => x.BossName === boss.BossName)) { this.databaseServer.getTables().locations[mapKey].base.BossLocationSpawn.push(...bossesToAdd); } @@ -453,22 +452,22 @@ export class SeasonalEventService switch (eventType.toLowerCase()) { case SeasonalEventType.HALLOWEEN.toLowerCase(): - this.httpConfig.serverImagePathOverride["./assets/images/traders/5a7c2ebb86f7746e324a06ab.png"] = - "./assets/images/traders/halloween/5a7c2ebb86f7746e324a06ab.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/5ac3b86a86f77461491d1ad8.png"] = - "./assets/images/traders/halloween/5ac3b86a86f77461491d1ad8.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/5c06531a86f7746319710e1b.png"] = - "./assets/images/traders/halloween/5c06531a86f7746319710e1b.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91ca086f77469a81232e4.png"] = - "./assets/images/traders/halloween/59b91ca086f77469a81232e4.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cab86f77469aa5343ca.png"] = - "./assets/images/traders/halloween/59b91cab86f77469aa5343ca.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cb486f77469a81232e5.png"] = - "./assets/images/traders/halloween/59b91cb486f77469a81232e5.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cbd86f77469aa5343cb.png"] = - "./assets/images/traders/halloween/59b91cbd86f77469aa5343cb.png"; - this.httpConfig.serverImagePathOverride["./assets/images/traders/579dc571d53a0658a154fbec.png"] = - "./assets/images/traders/halloween/579dc571d53a0658a154fbec.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/5a7c2ebb86f7746e324a06ab.png"] + = "./assets/images/traders/halloween/5a7c2ebb86f7746e324a06ab.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/5ac3b86a86f77461491d1ad8.png"] + = "./assets/images/traders/halloween/5ac3b86a86f77461491d1ad8.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/5c06531a86f7746319710e1b.png"] + = "./assets/images/traders/halloween/5c06531a86f7746319710e1b.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91ca086f77469a81232e4.png"] + = "./assets/images/traders/halloween/59b91ca086f77469a81232e4.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cab86f77469aa5343ca.png"] + = "./assets/images/traders/halloween/59b91cab86f77469aa5343ca.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cb486f77469a81232e5.png"] + = "./assets/images/traders/halloween/59b91cb486f77469a81232e5.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/59b91cbd86f77469aa5343cb.png"] + = "./assets/images/traders/halloween/59b91cbd86f77469aa5343cb.png"; + this.httpConfig.serverImagePathOverride["./assets/images/traders/579dc571d53a0658a154fbec.png"] + = "./assets/images/traders/halloween/579dc571d53a0658a154fbec.png"; break; case SeasonalEventType.CHRISTMAS.toLowerCase(): // TODO: find christmas trader icons @@ -575,7 +574,7 @@ export class SeasonalEventService { const mapData: ILocation = maps[gifterMapSettings.map]; // Dont add gifter to map twice - if (mapData.base.BossLocationSpawn.some((boss) => boss.BossName === "gifter")) + if (mapData.base.BossLocationSpawn.some(boss => boss.BossName === "gifter")) { continue; } diff --git a/project/src/services/TraderPurchasePersisterService.ts b/project/src/services/TraderPurchasePersisterService.ts index f4ffe16f..690c6200 100644 --- a/project/src/services/TraderPurchasePersisterService.ts +++ b/project/src/services/TraderPurchasePersisterService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderPurchaseData } from "@spt-aki/models/eft/profile/IAkiProfile"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; @@ -122,7 +121,7 @@ export class TraderPurchasePersisterService for (const purchaseKey in profile.traderPurchases[traderId]) { - const traderUpdateDetails = this.traderConfig.updateTime.find((x) => x.traderId === traderId); + const traderUpdateDetails = this.traderConfig.updateTime.find(x => x.traderId === traderId); if (!traderUpdateDetails) { this.logger.error( @@ -137,7 +136,7 @@ export class TraderPurchasePersisterService const purchaseDetails = profile.traderPurchases[traderId][purchaseKey]; const resetTimeForItem = purchaseDetails.purchaseTimestamp - + this.randomUtil.getInt(traderUpdateDetails.seconds.min, traderUpdateDetails.seconds.max); + + this.randomUtil.getInt(traderUpdateDetails.seconds.min, traderUpdateDetails.seconds.max); if (resetTimeForItem < this.timeUtil.getTimestamp()) { // Item was purchased far enough in past a trader refresh would have occured, remove purchase record from profile diff --git a/project/src/services/TraderServicesService.ts b/project/src/services/TraderServicesService.ts index 38d5f659..a0932a76 100644 --- a/project/src/services/TraderServicesService.ts +++ b/project/src/services/TraderServicesService.ts @@ -1,10 +1,10 @@ +import { inject, injectable } from "tsyringe"; 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 { inject, injectable } from "tsyringe"; @injectable() export class TraderServicesService @@ -46,7 +46,7 @@ export class TraderServicesService { for (const questId of service.requirements.completedQuests) { - const quest = pmcData.Quests.find((x) => x.qid === questId); + const quest = pmcData.Quests.find(x => x.qid === questId); if (!quest || quest.status !== QuestStatus.Success) { servicesToDelete.push(service.serviceType); @@ -57,7 +57,7 @@ export class TraderServicesService } // Clear any unavailable services from the list - traderServices = traderServices.filter((x) => !servicesToDelete.includes(x.serviceType)); + traderServices = traderServices.filter(x => !servicesToDelete.includes(x.serviceType)); return traderServices; } diff --git a/project/src/services/cache/BundleHashCacheService.ts b/project/src/services/cache/BundleHashCacheService.ts index 82730244..034a97d4 100644 --- a/project/src/services/cache/BundleHashCacheService.ts +++ b/project/src/services/cache/BundleHashCacheService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; diff --git a/project/src/services/cache/ModHashCacheService.ts b/project/src/services/cache/ModHashCacheService.ts index 1edd6bba..3cbe2f15 100644 --- a/project/src/services/cache/ModHashCacheService.ts +++ b/project/src/services/cache/ModHashCacheService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; diff --git a/project/src/services/mod/CustomItemService.ts b/project/src/services/mod/CustomItemService.ts index 5018a0d9..ec391545 100644 --- a/project/src/services/mod/CustomItemService.ts +++ b/project/src/services/mod/CustomItemService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { ITemplateItem, Props } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; @@ -142,7 +141,7 @@ export class CustomItemService */ protected getOrGenerateIdForItem(newId: string): string { - return (newId === "") ? this.hashUtil.generate() : newId; + return newId === "" ? this.hashUtil.generate() : newId; } /** diff --git a/project/src/services/mod/dynamicRouter/DynamicRouterModService.ts b/project/src/services/mod/dynamicRouter/DynamicRouterModService.ts index 58675ee4..7c2b4839 100644 --- a/project/src/services/mod/dynamicRouter/DynamicRouterModService.ts +++ b/project/src/services/mod/dynamicRouter/DynamicRouterModService.ts @@ -1,5 +1,4 @@ import { DependencyContainer, injectable } from "tsyringe"; - import { RouteAction } from "@spt-aki/di/Router"; import { DynamicRouterMod } from "@spt-aki/services/mod/dynamicRouter/DynamicRouterMod"; @@ -8,6 +7,7 @@ export class DynamicRouterModService { constructor(private container: DependencyContainer) {} + public registerDynamicRouter(name: string, routes: RouteAction[], topLevelRoute: string): void { this.container.register(name, { useValue: new DynamicRouterMod(routes, topLevelRoute) }); diff --git a/project/src/services/mod/httpListener/HttpListenerMod.ts b/project/src/services/mod/httpListener/HttpListenerMod.ts index fd0456df..a7080dc8 100644 --- a/project/src/services/mod/httpListener/HttpListenerMod.ts +++ b/project/src/services/mod/httpListener/HttpListenerMod.ts @@ -1,5 +1,4 @@ import { IncomingMessage, ServerResponse } from "node:http"; - import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; export class HttpListenerMod implements IHttpListener diff --git a/project/src/services/mod/httpListener/HttpListenerModService.ts b/project/src/services/mod/httpListener/HttpListenerModService.ts index 40fbcd49..a5c72ef5 100644 --- a/project/src/services/mod/httpListener/HttpListenerModService.ts +++ b/project/src/services/mod/httpListener/HttpListenerModService.ts @@ -1,6 +1,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; import { DependencyContainer, injectable } from "tsyringe"; - import { IHttpListener } from "@spt-aki/servers/http/IHttpListener"; import { HttpListenerMod } from "@spt-aki/services/mod/httpListener/HttpListenerMod"; diff --git a/project/src/services/mod/image/ImageRouteService.ts b/project/src/services/mod/image/ImageRouteService.ts index de1ea20b..b5886b77 100644 --- a/project/src/services/mod/image/ImageRouteService.ts +++ b/project/src/services/mod/image/ImageRouteService.ts @@ -14,6 +14,6 @@ export class ImageRouteService public existsByKey(urlKey: string): boolean { - return (this.routes[urlKey] !== undefined); + return this.routes[urlKey] !== undefined; } } diff --git a/project/src/services/mod/onLoad/OnLoadModService.ts b/project/src/services/mod/onLoad/OnLoadModService.ts index f86887db..8d009c22 100644 --- a/project/src/services/mod/onLoad/OnLoadModService.ts +++ b/project/src/services/mod/onLoad/OnLoadModService.ts @@ -1,5 +1,4 @@ import { DependencyContainer, injectable } from "tsyringe"; - import { OnLoadMod } from "@spt-aki/services/mod/onLoad/OnLoadMod"; @injectable() diff --git a/project/src/services/mod/onUpdate/OnUpdateModService.ts b/project/src/services/mod/onUpdate/OnUpdateModService.ts index fdb384c5..fbf6ee79 100644 --- a/project/src/services/mod/onUpdate/OnUpdateModService.ts +++ b/project/src/services/mod/onUpdate/OnUpdateModService.ts @@ -1,5 +1,4 @@ import { DependencyContainer, injectable } from "tsyringe"; - import { OnUpdateMod } from "@spt-aki/services/mod/onUpdate/OnUpdateMod"; @injectable() diff --git a/project/src/services/mod/staticRouter/StaticRouterModService.ts b/project/src/services/mod/staticRouter/StaticRouterModService.ts index 7b3d1e65..0b7dfe70 100644 --- a/project/src/services/mod/staticRouter/StaticRouterModService.ts +++ b/project/src/services/mod/staticRouter/StaticRouterModService.ts @@ -1,5 +1,4 @@ import { DependencyContainer, injectable } from "tsyringe"; - import { RouteAction } from "@spt-aki/di/Router"; import { StaticRouterMod } from "@spt-aki/services/mod/staticRouter/StaticRouterMod"; @@ -8,6 +7,7 @@ export class StaticRouterModService { constructor(protected container: DependencyContainer) {} + public registerStaticRouter(name: string, routes: RouteAction[], topLevelRoute: string): void { this.container.register(name, { useValue: new StaticRouterMod(routes, topLevelRoute) }); diff --git a/project/src/utils/App.ts b/project/src/utils/App.ts index e3152ebb..27c984cf 100644 --- a/project/src/utils/App.ts +++ b/project/src/utils/App.ts @@ -1,6 +1,5 @@ import os from "node:os"; import { inject, injectAll, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; diff --git a/project/src/utils/CompareUtil.ts b/project/src/utils/CompareUtil.ts index 2bd62e74..8975a6f2 100644 --- a/project/src/utils/CompareUtil.ts +++ b/project/src/utils/CompareUtil.ts @@ -42,7 +42,7 @@ export class CompareUtil { return false; } - return arr1.every((vOf1) => arr2.find((vOf2) => this.recursiveCompare(vOf1, vOf2))); + return arr1.every(vOf1 => arr2.find(vOf2 => this.recursiveCompare(vOf1, vOf2))); } for (const propOf1 in v1) { diff --git a/project/src/utils/DatabaseImporter.ts b/project/src/utils/DatabaseImporter.ts index 699f04b9..d3f4da85 100644 --- a/project/src/utils/DatabaseImporter.ts +++ b/project/src/utils/DatabaseImporter.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { OnLoad } from "@spt-aki/di/OnLoad"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; @@ -45,7 +44,7 @@ export class DatabaseImporter implements OnLoad */ public getSptDataPath(): string { - return (globalThis.G_RELEASE_CONFIGURATION) ? "Aki_Data/Server/" : "./assets/"; + return globalThis.G_RELEASE_CONFIGURATION ? "Aki_Data/Server/" : "./assets/"; } public async onLoad(): Promise @@ -108,7 +107,7 @@ export class DatabaseImporter implements OnLoad (fileWithPath: string, data: string) => this.onReadValidate(fileWithPath, data), ); - const validation = (this.valid === VaildationResult.FAILED || this.valid === VaildationResult.NOT_FOUND) + const validation = this.valid === VaildationResult.FAILED || this.valid === VaildationResult.NOT_FOUND ? "." : ""; this.logger.info(`${this.localisationService.getText("importing_database_finish")}${validation}`); diff --git a/project/src/utils/HashUtil.ts b/project/src/utils/HashUtil.ts index 229ac816..a6e59a06 100644 --- a/project/src/utils/HashUtil.ts +++ b/project/src/utils/HashUtil.ts @@ -2,7 +2,6 @@ import crypto from "node:crypto"; import fs from "node:fs"; import crc32 from "buffer-crc32"; import { inject, injectable } from "tsyringe"; - import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @injectable() @@ -56,6 +55,6 @@ export class HashUtil { const min = 1000000; const max = 1999999; - return (max > min) ? Math.floor(Math.random() * (max - min + 1) + min) : min; + return max > min ? Math.floor(Math.random() * (max - min + 1) + min) : min; } } diff --git a/project/src/utils/HttpFileUtil.ts b/project/src/utils/HttpFileUtil.ts index 621aa134..11c02666 100644 --- a/project/src/utils/HttpFileUtil.ts +++ b/project/src/utils/HttpFileUtil.ts @@ -1,7 +1,6 @@ import fs from "node:fs"; import { ServerResponse } from "node:http"; import { inject, injectable } from "tsyringe"; - import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; @injectable() @@ -15,7 +14,7 @@ export class HttpFileUtil { const pathSlic = filePath.split("/"); const type = this.httpServerHelper.getMimeText(pathSlic[pathSlic.length - 1].split(".").at(-1)) - || this.httpServerHelper.getMimeText("txt"); + || this.httpServerHelper.getMimeText("txt"); const fileStream = fs.createReadStream(filePath); fileStream.on("open", () => diff --git a/project/src/utils/HttpResponseUtil.ts b/project/src/utils/HttpResponseUtil.ts index dbd90c07..40b298b9 100644 --- a/project/src/utils/HttpResponseUtil.ts +++ b/project/src/utils/HttpResponseUtil.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; @@ -18,10 +17,12 @@ export class HttpResponseUtil protected clearString(s: string): any { - return s.replace(/[\b]/g, "").replace(/[\f]/g, "").replace(/[\n]/g, "").replace(/[\r]/g, "").replace( - /[\t]/g, - "", - ); + return s.replace(/[\b]/g, "").replace(/[\f]/g, "").replace(/[\n]/g, "") + .replace(/[\r]/g, "") + .replace( + /[\t]/g, + "", + ); } /** diff --git a/project/src/utils/ImporterUtil.ts b/project/src/utils/ImporterUtil.ts index c90edfea..6c6ddcd5 100644 --- a/project/src/utils/ImporterUtil.ts +++ b/project/src/utils/ImporterUtil.ts @@ -1,8 +1,7 @@ import { inject, injectable } from "tsyringe"; - +import { Queue } from "@spt-aki/utils/collections/queue/Queue"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; -import { Queue } from "@spt-aki/utils/collections/queue/Queue"; /* eslint-disable @typescript-eslint/no-empty-function */ /* eslint-disable @typescript-eslint/brace-style */ @@ -56,7 +55,7 @@ export class ImporterUtil // set all loadRecursive to be executed asynchronously const resEntries = Object.entries(result); - const resResolved = await Promise.all(resEntries.map((ent) => ent[1])); + const resResolved = await Promise.all(resEntries.map(ent => ent[1])); for (let resIdx = 0; resIdx < resResolved.length; resIdx++) { resEntries[resIdx][1] = resResolved[resIdx]; @@ -124,14 +123,14 @@ export class ImporterUtil const files = this.vfs.getFiles(filepath); const directories = this.vfs.getDirs(filepath); - directoriesToRead.enqueueAll(directories.map((d) => `${filepath}${d}`)); - filesToProcess.enqueueAll(files.map((f) => new VisitNode(filepath, f))); + directoriesToRead.enqueueAll(directories.map(d => `${filepath}${d}`)); + filesToProcess.enqueueAll(files.map(f => new VisitNode(filepath, f))); while (directoriesToRead.length !== 0) { const directory = directoriesToRead.dequeue(); - filesToProcess.enqueueAll(this.vfs.getFiles(directory).map((f) => new VisitNode(`${directory}/`, f))); - directoriesToRead.enqueueAll(this.vfs.getDirs(directory).map((d) => `${directory}/${d}`)); + filesToProcess.enqueueAll(this.vfs.getFiles(directory).map(f => new VisitNode(`${directory}/`, f))); + directoriesToRead.enqueueAll(this.vfs.getDirs(directory).map(d => `${directory}/${d}`)); } while (filesToProcess.length !== 0) @@ -155,7 +154,7 @@ export class ImporterUtil } } - await Promise.all(promises).catch((e) => console.error(e)); + await Promise.all(promises).catch(e => console.error(e)); return result; } @@ -169,7 +168,7 @@ export class ImporterUtil { const property = propertiesToVisit[i]; - if (i === (propertiesToVisit.length - 1)) + if (i === propertiesToVisit.length - 1) { temp[property] = fileDeserialized; } diff --git a/project/src/utils/JsonUtil.ts b/project/src/utils/JsonUtil.ts index 9eb604dc..eb0a6807 100644 --- a/project/src/utils/JsonUtil.ts +++ b/project/src/utils/JsonUtil.ts @@ -3,7 +3,6 @@ import JSON5 from "json5"; import { jsonc } from "jsonc"; import { IParseOptions, IStringifyOptions, Reviver } from "jsonc/lib/interfaces"; import { inject, injectable } from "tsyringe"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { VFS } from "@spt-aki/utils/VFS"; diff --git a/project/src/utils/MathUtil.ts b/project/src/utils/MathUtil.ts index 448f07c1..bded169d 100644 --- a/project/src/utils/MathUtil.ts +++ b/project/src/utils/MathUtil.ts @@ -39,7 +39,7 @@ export class MathUtil */ public arrayProd(values: number[], factor: number): number[] { - return values.map((x) => x * factor); + return values.map(x => x * factor); } /** @@ -49,7 +49,7 @@ export class MathUtil */ public arrayAdd(values: number[], summand: number): number[] { - return values.map((x) => x + summand); + return values.map(x => x + summand); } /** diff --git a/project/src/utils/ObjectId.ts b/project/src/utils/ObjectId.ts index 270479bf..26153429 100644 --- a/project/src/utils/ObjectId.ts +++ b/project/src/utils/ObjectId.ts @@ -1,6 +1,5 @@ import crypto from "node:crypto"; import { inject, injectable } from "tsyringe"; - import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @injectable() @@ -26,7 +25,7 @@ export class ObjectId let hexString = ""; for (let i = 0; i < byteArray.length; i++) { - hexString += (`0${(byteArray[i] & 0xFF).toString(16)}`).slice(-2); + hexString += `0${(byteArray[i] & 0xFF).toString(16)}`.slice(-2); } return hexString; } @@ -43,16 +42,16 @@ export class ObjectId const objectIdBinary = Buffer.alloc(12); objectIdBinary[3] = time & 0xff; - objectIdBinary[2] = (time >> 8) & 0xff; - objectIdBinary[1] = (time >> 16) & 0xff; - objectIdBinary[0] = (time >> 24) & 0xff; + objectIdBinary[2] = time >> 8 & 0xff; + objectIdBinary[1] = time >> 16 & 0xff; + objectIdBinary[0] = time >> 24 & 0xff; objectIdBinary[4] = this.randomBytes[0]; objectIdBinary[5] = this.randomBytes[1]; objectIdBinary[6] = this.randomBytes[2]; objectIdBinary[7] = this.randomBytes[3]; objectIdBinary[8] = this.randomBytes[4]; - objectIdBinary[9] = (counter >> 16) & 0xff; - objectIdBinary[10] = (counter >> 8) & 0xff; + objectIdBinary[9] = counter >> 16 & 0xff; + objectIdBinary[10] = counter >> 8 & 0xff; objectIdBinary[11] = counter & 0xff; return this.toHexString(objectIdBinary); diff --git a/project/src/utils/RagfairOfferHolder.ts b/project/src/utils/RagfairOfferHolder.ts index aa806efa..7b712ab7 100644 --- a/project/src/utils/RagfairOfferHolder.ts +++ b/project/src/utils/RagfairOfferHolder.ts @@ -122,7 +122,7 @@ export class RagfairOfferHolder */ public getStaleOffers(time: number): Array { - return this.getOffers().filter((o) => this.isStale(o, time)); + return this.getOffers().filter(o => this.isStale(o, time)); } protected addOfferByTemplates(template: string, offer: IRagfairOffer): void diff --git a/project/src/utils/RandomUtil.ts b/project/src/utils/RandomUtil.ts index f200003b..f0d38abf 100644 --- a/project/src/utils/RandomUtil.ts +++ b/project/src/utils/RandomUtil.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; @@ -70,7 +69,7 @@ export class ProbabilityObjectArray extends Array { - return this.filter((r) => r.key !== key); + return this.filter(r => r.key !== key); } /** @@ -80,7 +79,7 @@ export class ProbabilityObjectArray extends Array r.key === key)[0]?.data; + return this.filter(r => r.key === key)[0]?.data; } /** @@ -95,7 +94,7 @@ export class ProbabilityObjectArray extends Array r.key === key)[0].relativeProbability; + return this.filter(r => r.key === key)[0].relativeProbability; } /** @@ -109,7 +108,7 @@ export class ProbabilityObjectArray extends Array x.relativeProbability)); + return Math.max(...this.map(x => x.relativeProbability)); } /** @@ -123,7 +122,7 @@ export class ProbabilityObjectArray extends Array x.relativeProbability)); + return Math.min(...this.map(x => x.relativeProbability)); } /** @@ -153,7 +152,7 @@ export class ProbabilityObjectArray extends Array x > rand); + const randomIndex = probCumsum.findIndex(x => x > rand); // We cannot put Math.random() directly in the findIndex because then it draws anew for each of its iteration if (replacement || locklist.includes(keyArray[randomIndex])) { @@ -213,12 +212,12 @@ export class RandomUtil { const minimum = Math.ceil(min); const maximum = Math.floor(max); - return (maximum > minimum) ? Math.floor(Math.random() * (maximum - minimum + 1) + minimum) : minimum; + return maximum > minimum ? Math.floor(Math.random() * (maximum - minimum + 1) + minimum) : minimum; } public getIntEx(max: number): number { - return (max > 1) ? Math.floor(Math.random() * (max - 2) + 1) : 1; + return max > 1 ? Math.floor(Math.random() * (max - 2) + 1) : 1; } public getFloat(min: number, max: number): number @@ -233,7 +232,7 @@ export class RandomUtil public getPercentOfValue(percent: number, number: number, toFixed = 2): number { - return Number.parseFloat(((percent * number) / 100).toFixed(toFixed)); + return Number.parseFloat((percent * number / 100).toFixed(toFixed)); } /** @@ -274,7 +273,7 @@ export class RandomUtil return this.getArrayValue(Object.keys(node)); } - public getKeyValue(node: { [x: string]: any; }): any + public getKeyValue(node: { [x: string]: any }): any { return node[this.getKey(node)]; } @@ -298,7 +297,7 @@ export class RandomUtil { v = Math.random(); } - const w = Math.sqrt(-2.0 * Math.log(u)) * Math.cos((2.0 * Math.PI) * v); + const w = Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v); const valueDrawn = mean + w * sigma; if (valueDrawn < 0) { @@ -410,7 +409,7 @@ export class RandomUtil return min; } - if (shift > (max - min)) + if (shift > max - min) { /* If a rolled number is out of bounds (due to bias being applied), we simply roll it again. * As the shifting increases, the chance of rolling a number within bounds decreases. @@ -432,7 +431,7 @@ export class RandomUtil rand += Math.random(); } - return (rand / n); + return rand / n; }; const boundedGaussian = (start: number, end: number, n: number) => diff --git a/project/src/utils/TimeUtil.ts b/project/src/utils/TimeUtil.ts index db03ac70..a9fab8af 100644 --- a/project/src/utils/TimeUtil.ts +++ b/project/src/utils/TimeUtil.ts @@ -113,7 +113,7 @@ export class TimeUtil { const now = new Date(); const millisecondsUntilNextHour = (60 - now.getMinutes()) * 60 * 1000 - now.getSeconds() * 1000 - - now.getMilliseconds(); + - now.getMilliseconds(); return (now.getTime() + millisecondsUntilNextHour) / 1000; } } diff --git a/project/src/utils/VFS.ts b/project/src/utils/VFS.ts index 8e44fc30..03bff09a 100644 --- a/project/src/utils/VFS.ts +++ b/project/src/utils/VFS.ts @@ -1,27 +1,28 @@ import "reflect-metadata"; -import { inject, injectable } from "tsyringe"; import crypto from "node:crypto"; import fs from "node:fs"; import path, { resolve } from "node:path"; import { promisify } from "node:util"; -import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; import { writeFileSync } from "atomically"; import lockfile from "proper-lockfile"; +import { inject, injectable } from "tsyringe"; +import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; @injectable() export class VFS { accessFilePromisify: (path: fs.PathLike, mode?: number) => Promise; copyFilePromisify: (src: fs.PathLike, dst: fs.PathLike, flags?: number) => Promise; - mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { recursive: true; }) => Promise; + mkdirPromisify: (path: fs.PathLike, options: fs.MakeDirectoryOptions & { recursive: true }) => Promise; readFilePromisify: (path: fs.PathLike) => Promise; writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; readdirPromisify: ( path: fs.PathLike, - options?: BufferEncoding | { encoding: BufferEncoding; withFileTypes?: false; }, + options?: BufferEncoding | { encoding: BufferEncoding, withFileTypes?: false }, ) => Promise; - statPromisify: (path: fs.PathLike, options?: fs.StatOptions & { bigint?: false; }) => Promise; + + statPromisify: (path: fs.PathLike, options?: fs.StatOptions & { bigint?: false }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; @@ -331,7 +332,7 @@ export class VFS public async minifyAllJsonInDirRecursive(filepath: string): Promise { - const files = this.getFiles(filepath).filter((item) => this.getFileExtension(item) === "json"); + const files = this.getFiles(filepath).filter(item => this.getFileExtension(item) === "json"); for (const file of files) { const filePathAndName = path.join(filepath, file); @@ -348,7 +349,7 @@ export class VFS public async minifyAllJsonInDirRecursiveAsync(filepath: string): Promise { - const files = this.getFiles(filepath).filter((item) => this.getFileExtension(item) === "json"); + const files = this.getFiles(filepath).filter(item => this.getFileExtension(item) === "json"); for (const file of files) { const filePathAndName = path.join(filepath, file); diff --git a/project/src/utils/Watermark.ts b/project/src/utils/Watermark.ts index b3a9f77e..b56e7f6b 100644 --- a/project/src/utils/Watermark.ts +++ b/project/src/utils/Watermark.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig"; import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; @@ -109,7 +108,7 @@ export class Watermark public getVersionTag(withEftVersion = false): string { const akiVersion = globalThis.G_AKIVERSION || this.akiConfig.akiVersion; - const versionTag = (globalThis.G_DEBUG_CONFIGURATION) + const versionTag = globalThis.G_DEBUG_CONFIGURATION ? `${akiVersion} - ${this.localisationService.getText("bleeding_edge_build")}` : akiVersion; @@ -130,7 +129,7 @@ export class Watermark public getInGameVersionLabel(): string { const akiVersion = globalThis.G_AKIVERSION || this.akiConfig.akiVersion; - const versionTag = (globalThis.G_DEBUG_CONFIGURATION) + const versionTag = globalThis.G_DEBUG_CONFIGURATION ? `${akiVersion} - BLEEDINGEDGE ${globalThis.G_COMMIT?.slice(0, 6) ?? ""}` : `${akiVersion} - ${globalThis.G_COMMIT?.slice(0, 6) ?? ""}`; diff --git a/project/src/utils/logging/AbstractWinstonLogger.ts b/project/src/utils/logging/AbstractWinstonLogger.ts index 86a6975b..e35ab0e9 100644 --- a/project/src/utils/logging/AbstractWinstonLogger.ts +++ b/project/src/utils/logging/AbstractWinstonLogger.ts @@ -4,7 +4,6 @@ import { promisify } from "node:util"; import winston, { createLogger, format, transports } from "winston"; // eslint-disable-next-line @typescript-eslint/naming-convention import DailyRotateFile from "winston-daily-rotate-file"; - import { Daum } from "@spt-aki/models/eft/itemEvent/IItemEventRouterRequest"; import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor"; import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor"; @@ -32,6 +31,7 @@ export abstract class AbstractWinstonLogger implements ILogger whiteBG: "whiteBG", }, }; + protected logger: winston.Logger & SptLogger; protected writeFilePromisify: (path: fs.PathLike, data: string, options?: any) => Promise; diff --git a/project/src/utils/logging/WinstonMainLogger.ts b/project/src/utils/logging/WinstonMainLogger.ts index 9b7ad449..d4c61e90 100644 --- a/project/src/utils/logging/WinstonMainLogger.ts +++ b/project/src/utils/logging/WinstonMainLogger.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger"; diff --git a/project/src/utils/logging/WinstonRequestLogger.ts b/project/src/utils/logging/WinstonRequestLogger.ts index b6812c2c..30ec7180 100644 --- a/project/src/utils/logging/WinstonRequestLogger.ts +++ b/project/src/utils/logging/WinstonRequestLogger.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; - import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue"; import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger";