Update example 5

This commit is contained in:
Chomp 2022-05-25 08:50:15 +01:00
parent 79d934cba0
commit 9f4a555c3a
403 changed files with 2095 additions and 973 deletions

View File

@ -0,0 +1,9 @@
# Exclude these folders from linting
node_modules
dist/
types/
# Exclude these filetypes from linting
*.json
*.txt
*.exe

View File

@ -0,0 +1,75 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/comma-dangle": 1,
"@typescript-eslint/func-call-spacing": 2,
"@typescript-eslint/quotes": 1,
"@typescript-eslint/brace-style": [
"warn",
"allman"
],
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "objectLiteralProperty",
"format": ["PascalCase", "camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeProperty",
"format": ["PascalCase", "camelCase"],
"leadingUnderscore": "allow"
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
}
],
"@typescript-eslint/indent": [
"warn",
4
],
"@typescript-eslint/no-unused-expressions": [
"warn",
{
"allowShortCircuit": false,
"allowTernary": false
}
],
"@typescript-eslint/keyword-spacing": [
"warn",
{
"before": true,
"after": true
}
],
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
{
"allowArgumentsExplicitlyTypedAsAny": true
}
]
}
}

View File

@ -0,0 +1,40 @@
This project was set up to automate most parts of building and setting up an environment.
NodeJS 14.15.3:
The first step would be to install nodejs on your pc, the version you NEED is 14.15.3
That version is the one that has been used to test the mod templates and build scripts.
It can be downloaded from here: https://nodejs.org/download/release/v14.15.3/
A system reboot may be needed after install.
IDE:
The second step is having an IDE ready. For the currect purpose we've setup a VSCodium workspace file.
You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium.
You can get VSCodium here: https://vscodium.com/#install
Workspace:
Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Worspace from File...).
Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended to be done.
Environment Setup:
There is a task that will automatically setup your environment to use typescript.
To run it, you just need to go to: Terminal->Run Task...->Show All Tasks...->npm: install
After running this task, your environment will be ready to start coding.
DO NOT remove the node_modules folder, this is an auto generated directory that has the required dependencies to be able to use typescript and more.
IMPORTANT:
Before starting to work on your mod, we suggest you read about Dependency Injection and Inversion of Control as this is the adopted architecture SPT-AKI has adopted.
It will be difficult to understand some of the problems you may be having if you dont understand the basics of it.
A guide explaining all the essentials will be available on the hub on release for you to read about.
Coding:
All your work should be centered around the mod.ts file as an entry point.
You can ONLY change the following properties from the package.json file: "name", "version", "license": "MIT", "author", "akiVersion".
If you have never used typescript before, you should read about it here: https://www.typescriptlang.org/docs/
Distributing your mod:
The project has been set up with an automatic task that will copy and zip ALL required files for your mod to work on SPT-AKI.
To run this task you just need to go to: Terminal->Run Task...->Show All Tasks...->npm: build:zip
The output will be a mod.zip file that will appear on the root of the project.
Always verify that all files were included into the zip file.

View File

@ -0,0 +1,12 @@
{
"folders": [
{
"path": "."
}
],
"extensions": {
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
}

View File

@ -1,17 +1,25 @@
{
"name": "ReplaceFunction",
"version": "1.0.0",
"main": "src/mod.js",
"license": "MIT",
"author": "Chomp",
"akiVersion": "3.0.0",
"scripts": {
"install": "npx handpick --target=devDependencies",
"build": "tsc"
},
"devDependencies": {
"@types/node": "^17.0.31",
"tsyringe": "^4.6.0",
"typescript": "^4.6.4"
}
"name": "ReplaceFunction",
"version": "1.0.0",
"main": "src/mod.js",
"license": "MIT",
"author": "Chomp",
"akiVersion": "3.0.0",
"scripts": {
"setup:environment": "npm i",
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" ./**/*.* ./dist",
"zip:files": "cd dist/ && bestzip ../mod.zip *",
"build:zip": "npm run clean:environment && npm run build:unzipped && npm run zip:files",
"clean:environment": "node -e \"require('fs').rm('mod.zip', ()=>{})\" && node -e \"require('fs').rmdir('./dist/',{recursive:true},()=>{})\""
},
"devDependencies": {
"@types/node": "^14.15.3",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"copyfiles": "2.4.1",
"eslint": "7.26.0",
"tsyringe": "4.6.0",
"typescript": "4.6.4",
"bestzip": "2.2.1"
}
}

View File

@ -1,37 +1,77 @@
import type { DependencyContainer } from "tsyringe";
import { IMod } from "../types/models/external/mod";
import type { WatermarkLocale } from "../types/utils/Watermark";
import type { IMod } from "../types/models/external/mod";
import type { LauncherController } from "../types/controllers/LauncherController";
import type { DatabaseServer } from "../types/servers/DatabaseServer";
import type { ILoginRequestData } from "../types/models/eft/launcher/ILoginRequestData";
import type { ILogger } from "../types/models/spt/utils/ILogger";
import type { SaveServer } from "../types/servers/SaveServer";
class Mod implements IMod
{
// DO NOT leave static references to ANY resolved dependency.
// ALWAYS use the container to resolve dependencies
// ****** ALWAYS *******
private static container: DependencyContainer;
// Perform these actions before server fully loads
public load(container: DependencyContainer): void
public load(container: DependencyContainer): void
{
// get watermarkLocale class from server
const watermarkLocale = container.resolve<WatermarkLocale>("WatermarkLocale");
// We will save a reference to the dependency container to resolve dependencies
// that we may need down the line
Mod.container = container;
// Approach #1
// Replace the getDescription() function with the one below called 'replacementFunction()'
watermarkLocale.getDescription = this.replacementFunction;
// Approach #2
// Wait until WatermarkLocale gets resolved by the server and run code afterwards to replace
// the getDescription() function with the one below called 'replacementFunction()
container.afterResolution("WatermarkLocale", (_t, result: WatermarkLocale) =>
container.afterResolution("LauncherController", (_t, result: LauncherController) =>
{
result.getDescription = this.replacementFunction;
// We want to replace the original method logic with something different
result.login = (info: ILoginRequestData) =>
{
// We are calling a replacement function, technically you could also do:
// result.login = this.replacementFunction;
return this.replacementFunction(info);
}
// The modifier Always makes sure this replacement method is ALWAYS replaced
}, {frequency: "Always"});
}
// not used for this example
public delayedLoad(container: DependencyContainer): void
{ return }
public delayedLoad(container: DependencyContainer): void
{
return
}
// our new replacement function, ready to be used
public replacementFunction(): string[]
public replacementFunction(info: ILoginRequestData): string
{
return ["SPT AKI, WOW VERY COOL"];
// The original method requires the save server to be loaded
const saveServer = Mod.container.resolve<SaveServer>("SaveServer");
// The logic below is the original login method logic
let originalReturn = "";
for (const sessionID in saveServer.getProfiles())
{
const account = saveServer.getProfile(sessionID).info;
if (info.username === account.username)
{
originalReturn = sessionID;
break;
}
}
// This is now extra stuff we want to add
// We resolve 2 more dependencies: The logger and the DatabaseServer
const logger = Mod.container.resolve<ILogger>("WinstonLogger");
const dbServer = Mod.container.resolve<DatabaseServer>("DatabaseServer");
// As an example Im counting the amount of loaded items on the DB
const loadedItems = Object.entries(dbServer.getTables().templates.items).length;
// Lets do a few informational messages
logger.success(`User ${info.username} logged in to SPT, there are ${loadedItems} items loaded into the database`);
logger.success(originalReturn.length > 0 ? `User session ID: ${originalReturn}` : "User not found");
// And finally return whatever we were supposed to return through this function
return originalReturn;
}
}

View File

@ -1,4 +1,5 @@
export declare class Program {
export declare class Program
{
constructor();
start(): void;
}

View File

@ -4,7 +4,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class BotCallbacks {
export declare class BotCallbacks
{
private botController;
private httpResponse;
constructor(botController: BotController, httpResponse: HttpResponseUtil);

View File

@ -3,7 +3,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { ILogger } from "../models/spt/utils/ILogger";
import { IHttpServer } from "../models/spt/server/IHttpServer";
export declare class BundleCallbacks {
export declare class BundleCallbacks
{
private logger;
private httpResponse;
private httpServer;

View File

@ -7,7 +7,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { ISuit } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class CustomizationCallbacks {
export declare class CustomizationCallbacks
{
private customizationController;
private saveServer;
private httpResponse;

View File

@ -11,7 +11,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class DataCallbacks {
export declare class DataCallbacks
{
private httpResponse;
private databaseServer;
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);

View File

@ -20,7 +20,8 @@ import { ISendMessageRequest } from "../models/eft/dialog/ISendMessageRequest";
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
import { OnUpdate } from "../di/OnUpdate";
export declare class DialogueCallbacks extends OnUpdate {
export declare class DialogueCallbacks extends OnUpdate
{
private hashUtil;
private timeUtil;
private httpResponse;

View File

@ -7,7 +7,8 @@ import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { IWatermark } from "../models/spt/utils/IWatermark";
declare class GameCallbacks {
declare class GameCallbacks
{
private httpResponse;
private watermark;
private gameController;

View File

@ -1,6 +1,7 @@
import { HandbookController } from "../controllers/HandbookController";
import { OnLoad } from "../di/OnLoad";
export declare class HandbookCallbacks extends OnLoad {
export declare class HandbookCallbacks extends OnLoad
{
private handbookController;
constructor(handbookController: HandbookController);
onLoad(): void;

View File

@ -8,7 +8,8 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class HealthCallbacks {
export declare class HealthCallbacks
{
private httpResponse;
private profileHelper;
private healthController;

View File

@ -12,7 +12,8 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ConfigServer } from "../servers/ConfigServer";
import { OnUpdate } from "../di/OnUpdate";
export declare class HideoutCallbacks extends OnUpdate {
export declare class HideoutCallbacks extends OnUpdate
{
private hideoutController;
private configServer;
private hideoutConfig;

View File

@ -1,6 +1,7 @@
import { IHttpServer } from "../models/spt/server/IHttpServer";
import { OnLoad } from "../di/OnLoad";
export declare class HttpCallbacks extends OnLoad {
export declare class HttpCallbacks extends OnLoad
{
private httpServer;
constructor(httpServer: IHttpServer);
onLoad(): void;

View File

@ -5,7 +5,8 @@ import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayer
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
import { ConfigServer } from "../servers/ConfigServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class InraidCallbacks {
export declare class InraidCallbacks
{
private inraidController;
private httpResponse;
private configServer;

View File

@ -8,7 +8,8 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { InsuranceService } from "../services/InsuranceService";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
export declare class InsuranceCallbacks extends OnLoadOnUpdate
{
private insuranceController;
private insuranceService;
private httpResponse;

View File

@ -17,7 +17,8 @@ import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInve
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class InventoryCallbacks {
export declare class InventoryCallbacks
{
private inventoryController;
constructor(inventoryController: InventoryController);
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,7 +3,8 @@ import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRoute
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class ItemEventCallbacks {
export declare class ItemEventCallbacks
{
private httpResponse;
private itemEventRouter;
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);

View File

@ -6,7 +6,8 @@ import { IRemoveProfileData } from "../models/eft/launcher/IRemoveProfileData";
import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
import { IWatermark } from "../models/spt/utils/IWatermark";
declare class LauncherCallbacks {
declare class LauncherCallbacks
{
private httpResponse;
private launcherController;
private saveServer;

View File

@ -4,7 +4,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
import { ILocationBase } from "../models/eft/common/ILocationBase";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class LocationCallbacks {
export declare class LocationCallbacks
{
private httpResponse;
private locationController;
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);

View File

@ -7,7 +7,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { IPmcData } from "../models/eft/common/IPmcData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class MatchCallbacks {
export declare class MatchCallbacks
{
private httpResponse;
private jsonUtil;
private matchController;

View File

@ -2,9 +2,10 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { OnLoad } from "../di/OnLoad";
import { DelayedModLoader } from "../loaders/DelayedModLoader";
import { ConfigServer } from "../servers/ConfigServer";
import { ILogger } from '../models/spt/utils/ILogger';
import { IHttpServer } from '../models/spt/server/IHttpServer';
declare class ModCallbacks extends OnLoad {
import { ILogger } from "../models/spt/utils/ILogger";
import { IHttpServer } from "../models/spt/server/IHttpServer";
declare class ModCallbacks extends OnLoad
{
private logger;
private httpResponse;
private httpServer;

View File

@ -2,7 +2,8 @@ import { NoteController } from "../controllers/NoteController";
import { IPmcData } from "../models/eft/common/IPmcData";
import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class NoteCallbacks {
export declare class NoteCallbacks
{
private noteController;
constructor(noteController: NoteController);
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -5,7 +5,8 @@ import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyRespons
import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
import { NotifierController } from "../controllers/NotifierController";
export declare class NotifierCallbacks {
export declare class NotifierCallbacks
{
private httpServerHelper;
private httpResponse;
private notifierController;

View File

@ -5,7 +5,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class PresetBuildCallbacks {
export declare class PresetBuildCallbacks
{
private httpResponse;
private presetBuildController;
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);

View File

@ -1,6 +1,7 @@
import { PresetController } from "../controllers/PresetController";
import { OnLoad } from "../di/OnLoad";
export declare class PresetCallbacks extends OnLoad {
export declare class PresetCallbacks extends OnLoad
{
private presetController;
constructor(presetController: PresetController);
onLoad(): void;

View File

@ -11,7 +11,8 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic
import { ISearchFriendRequestData } from "../models/eft/profile/ISearchFriendRequestData";
import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendResponse";
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
export declare class ProfileCallbacks {
export declare class ProfileCallbacks
{
private httpResponse;
private timeUtil;
private profileController;

View File

@ -12,7 +12,8 @@ import { IQuest } from "../models/eft/common/tables/IQuest";
import { IPmcDataRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class QuestCallbacks {
export declare class QuestCallbacks
{
private httpResponse;
private questController;
private repeatableQuestController;

View File

@ -15,7 +15,8 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairCallbacks extends OnLoadOnUpdate {
export declare class RagfairCallbacks extends OnLoadOnUpdate
{
private httpResponse;
private logger;
private jsonUtil;

View File

@ -3,7 +3,8 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionDataRequest";
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class RepairCallbacks {
export declare class RepairCallbacks
{
private repairController;
constructor(repairController: RepairController);
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;

View File

@ -1,6 +1,7 @@
import { SaveServer } from "../servers/SaveServer";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
export declare class SaveCallbacks extends OnLoadOnUpdate {
export declare class SaveCallbacks extends OnLoadOnUpdate
{
private saveServer;
constructor(saveServer: SaveServer);
onLoad(): void;

View File

@ -3,7 +3,8 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
export declare class TradeCallbacks {
export declare class TradeCallbacks
{
private tradeController;
constructor(tradeController: TradeController);
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -4,7 +4,8 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
export declare class TraderCallbacks extends OnLoadOnUpdate {
export declare class TraderCallbacks extends OnLoadOnUpdate
{
private httpResponse;
private traderController;
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);

View File

@ -2,7 +2,8 @@ import { WeatherController } from "../controllers/WeatherController";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class WeatherCallbacks {
export declare class WeatherCallbacks
{
private httpResponse;
private weatherController;
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);

View File

@ -2,7 +2,8 @@ import { WishlistController } from "../controllers/WishlistController";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class WishlistCallbacks {
export declare class WishlistCallbacks
{
private wishlistController;
constructor(wishlistController: WishlistController);
addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -6,7 +6,8 @@ import { IBotCore } from "../models/eft/common/tables/IBotCore";
import { ConfigServer } from "../servers/ConfigServer";
import { BotHelper } from "../helpers/BotHelper";
import { BotGenerator } from "../generators/BotGenerator";
export declare class BotController {
export declare class BotController
{
private databaseServer;
private botGenerator;
private botHelper;

View File

@ -8,7 +8,8 @@ import { ISuit } from "../models/eft/common/tables/ITrader";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class CustomizationController {
export declare class CustomizationController
{
private logger;
private itemEventRouter;
private databaseServer;

View File

@ -6,7 +6,8 @@ import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListD
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class DialogueController {
export declare class DialogueController
{
private httpResponse;
private saveServer;
private dialogueHelper;

View File

@ -5,7 +5,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { ILogger } from "../models/spt/utils/ILogger";
import { IWatermark } from "../models/spt/utils/IWatermark";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
export declare class GameController {
export declare class GameController
{
private logger;
private watermark;
private httpServerHelper;

View File

@ -1,6 +1,7 @@
import { DatabaseServer } from "../servers/DatabaseServer";
import { HandbookHelper } from "../helpers/HandbookHelper";
export declare class HandbookController {
export declare class HandbookController
{
private databaseServer;
private handbookHelper;
constructor(databaseServer: DatabaseServer, handbookHelper: HandbookHelper);

View File

@ -10,7 +10,8 @@ import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestD
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthController {
export declare class HealthController
{
private logger;
private itemEventRouter;
private itemHelper;

View File

@ -24,7 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HideoutController {
export declare class HideoutController
{
private logger;
private hashUtil;
private timeUtil;

View File

@ -11,7 +11,8 @@ import { QuestHelper } from "../helpers/QuestHelper";
import { InRaidHelper } from "../helpers/InRaidHelper";
import { InsuranceService } from "../services/InsuranceService";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
export declare class InraidController {
export declare class InraidController
{
private saveServer;
private jsonUtil;
private databaseServer;

View File

@ -14,7 +14,8 @@ import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { InsuranceService } from "../services/InsuranceService";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class InsuranceController {
export declare class InsuranceController
{
private logger;
private randomUtil;
private itemEventRouter;

View File

@ -25,7 +25,8 @@ import { IInventoryCreateMarkerRequestData } from "../models/eft/inventory/IInve
import { IInventoryDeleteMarkerRequestData } from "../models/eft/inventory/IInventoryDeleteMarkerRequestData";
import { IInventoryEditMarkerRequestData } from "../models/eft/inventory/IInventoryEditMarkerRequestData";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class InventoryController {
export declare class InventoryController
{
private logger;
private hashUtil;
private jsonUtil;

View File

@ -7,7 +7,8 @@ import { ILoginRequestData } from "../models/eft/launcher/ILoginRequestData";
import { IChangeRequestData } from "../models/eft/launcher/IChangeRequestData";
import { Info } from "../models/eft/profile/IAkiProfile";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
export declare class LauncherController {
export declare class LauncherController
{
private hashUtil;
private saveServer;
private httpServerHelper;

View File

@ -5,7 +5,8 @@ import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSo
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class LocationController {
export declare class LocationController
{
private jsonUtil;
private logger;
private locationGenerator;

View File

@ -6,7 +6,8 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer";
import { MatchLocationService } from "../services/MatchLocationService";
export declare class MatchController {
export declare class MatchController
{
private saveServer;
private profileHelper;
private matchLocationService;

View File

@ -2,7 +2,8 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { INoteActionData } from "../models/eft/notes/INoteActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ItemEventRouter } from "../routers/ItemEventRouter";
declare class NoteController {
declare class NoteController
{
private itemEventRouter;
constructor(itemEventRouter: ItemEventRouter);
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -2,7 +2,8 @@ import { NotifierHelper } from "../helpers/NotifierHelper";
import { NotificationService } from "../services/NotificationService";
import { INotifierChannel } from "../models/eft/notifier/INotifier";
import { HttpServerHelper } from "../helpers/HttpServerHelper";
export declare class NotifierController {
export declare class NotifierController
{
private notifierHelper;
private httpServerHelper;
private notificationService;

View File

@ -6,7 +6,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
import { HashUtil } from "../utils/HashUtil";
import { ItemEventRouter } from "../routers/ItemEventRouter";
export declare class PresetBuildController {
export declare class PresetBuildController
{
private hashUtil;
private itemEventRouter;
private itemHelper;

View File

@ -1,6 +1,7 @@
import { PresetHelper } from "../helpers/PresetHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class PresetController {
export declare class PresetController
{
private presetHelper;
private databaseServer;
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);

View File

@ -13,7 +13,8 @@ import { HashUtil } from "../utils/HashUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
import { ExtendedProfileHelper } from "../helpers/ExtendedProfileHelper";
export declare class ProfileController {
export declare class ProfileController
{
private hashUtil;
private timeUtil;
private saveServer;

View File

@ -15,7 +15,8 @@ import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRe
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class QuestController {
export declare class QuestController
{
private logger;
private timeUtil;
private itemEventRouter;

View File

@ -32,7 +32,8 @@ import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairController {
export declare class RagfairController
{
private logger;
private timeUtil;
private httpResponse;

View File

@ -10,7 +10,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { RepairHelper } from "../helpers/RepairHelper";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RepairController {
export declare class RepairController
{
private logger;
private itemEventRouter;
private databaseServer;

View File

@ -19,21 +19,26 @@ import { ConfigServer } from "../servers/ConfigServer";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
import { ILogger } from "../models/spt/utils/ILogger";
export interface IQuestTypePool {
export interface IQuestTypePool
{
types: string[];
pool: IQuestPool;
}
export interface IQuestPool {
export interface IQuestPool
{
Exploration: IExplorationPool;
Elimination: IEliminationPool;
}
export interface IExplorationPool {
export interface IExplorationPool
{
locations: Partial<Record<ELocationName, string[]>>;
}
export interface IEliminationPool {
export interface IEliminationPool
{
targets: IEliminationTargetPool;
}
export interface IEliminationTargetPool {
export interface IEliminationTargetPool
{
Savage?: ITargetLocation;
AnyPmc?: ITargetLocation;
bossBully?: ITargetLocation;
@ -43,10 +48,12 @@ export interface IEliminationTargetPool {
bossTagilla?: ITargetLocation;
bossKojaniy?: ITargetLocation;
}
export interface ITargetLocation {
export interface ITargetLocation
{
locations: string[];
}
export declare class RepeatableQuestController {
export declare class RepeatableQuestController
{
private timeUtil;
private logger;
private randomUtil;

View File

@ -8,7 +8,8 @@ import { Upd } from "../models/eft/common/tables/IItem";
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
import { ItemEventRouter } from "../routers/ItemEventRouter";
import { ILogger } from "../models/spt/utils/ILogger";
declare class TradeController {
declare class TradeController
{
private logger;
private itemEventRouter;
private tradeHelper;

View File

@ -8,7 +8,8 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { ConfigServer } from "../servers/ConfigServer";
import { ILogger } from "../models/spt/utils/ILogger";
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
export declare class TraderController {
export declare class TraderController
{
private logger;
private databaseServer;
private traderAssortHelper;

View File

@ -1,7 +1,8 @@
import { ConfigServer } from "../servers/ConfigServer";
import { WeatherGenerator } from "../generators/WeatherGenerator";
import { IWeatherData } from "../models/eft/weather/IWeatherData";
export declare class WeatherController {
export declare class WeatherController
{
private weatherGenerator;
private configServer;
private weatherConfig;

View File

@ -2,7 +2,8 @@ import { ItemEventRouter } from "../routers/ItemEventRouter";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
export declare class WishlistController {
export declare class WishlistController
{
private itemEvenRouter;
constructor(itemEvenRouter: ItemEventRouter);
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;

View File

@ -1,5 +1,6 @@
import { DependencyContainer } from "tsyringe";
export declare class Container {
export declare class Container
{
static registerTypes(depContainer: DependencyContainer): void;
private static registerUtils;
private static registerRouters;

View File

@ -1,4 +1,5 @@
export declare class OnLoad {
export declare class OnLoad
{
onLoad(): void;
getRoute(): string;
}

View File

@ -1,6 +1,7 @@
import { OnLoad } from "./OnLoad";
import { OnUpdate } from "./OnUpdate";
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate
{
onUpdate(timeSinceLastRun: number): boolean;
onLoad(): void;
getRoute(): string;

View File

@ -1,4 +1,5 @@
export declare class OnUpdate {
export declare class OnUpdate
{
onUpdate(timeSinceLastRun: number): boolean;
getRoute(): string;
}

View File

@ -1,30 +1,36 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
export declare class Router {
export declare class Router
{
private handledRoutes;
constructor();
getTopLevelRoute(): string;
protected getHandledRoutes(): HandledRoute[];
canHandle(url: string, partialMatch?: boolean): boolean;
}
export declare class StaticRouter extends Router {
export declare class StaticRouter extends Router
{
constructor();
handleStatic(url: string, info: any, sessionID: string, output: string): any;
}
export declare class DynamicRouter extends Router {
export declare class DynamicRouter extends Router
{
constructor();
handleDynamic(url: string, info: any, sessionID: string, output: string): any;
}
export declare class ItemEventRouterDefinition extends Router {
export declare class ItemEventRouterDefinition extends Router
{
constructor();
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
}
export declare class SaveLoadRouter extends Router {
export declare class SaveLoadRouter extends Router
{
constructor();
handleLoad(profile: IAkiProfile): IAkiProfile;
}
export declare class HandledRoute {
export declare class HandledRoute
{
route: string;
dynamic: boolean;
constructor(route: string, dynamic: boolean);

View File

@ -1,5 +1,6 @@
import { IHttpServer } from "../models/spt/server/IHttpServer";
export declare class Serializer {
export declare class Serializer
{
serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void;
canHandle(something: string): boolean;
}

View File

@ -9,7 +9,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { GameEventHelper } from "../helpers/GameEventHelper";
import { BotInventoryGenerator } from "./BotInventoryGenerator";
import { BotHelper } from "../helpers/BotHelper";
export declare class BotGenerator {
export declare class BotGenerator
{
private logger;
private hashUtil;
private randomUtil;

View File

@ -8,7 +8,8 @@ import { BotLootGenerator } from "./BotLootGenerator";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
export declare class BotInventoryGenerator {
export declare class BotInventoryGenerator
{
private logger;
private hashUtil;
private randomUtil;

View File

@ -8,7 +8,8 @@ import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
export declare class BotLootGenerator {
export declare class BotLootGenerator
{
private jsonUtil;
private hashUtil;
private randomUtil;

View File

@ -7,7 +7,8 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
import { HashUtil } from "../utils/HashUtil";
import { ILogger } from "../models/spt/utils/ILogger";
import { RandomUtil } from "../utils/RandomUtil";
export declare class BotWeaponGenerator {
export declare class BotWeaponGenerator
{
private logger;
private hashUtil;
private databaseServer;

View File

@ -12,12 +12,14 @@ import { MathUtil } from "../utils/MathUtil";
import { ObjectId } from "../utils/ObjectId";
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
import { ILogger } from "../models/spt/utils/ILogger";
export interface IContainerItem {
export interface IContainerItem
{
items: Item[];
width: number;
height: number;
}
export declare class LocationGenerator {
export declare class LocationGenerator
{
private logger;
private jsonUtil;
private objectId;

View File

@ -1,7 +1,8 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ConfigServer } from "../servers/ConfigServer";
export declare class PMCLootGenerator {
export declare class PMCLootGenerator
{
private itemHelper;
private databaseServer;
private configServer;

View File

@ -3,7 +3,8 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "../helpers/ItemHelper";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairAssortGenerator {
export declare class RagfairAssortGenerator
{
private jsonUtil;
private hashUtil;
private itemHelper;

View File

@ -16,7 +16,8 @@ import { RagfairOfferService } from "../services/RagfairOfferService";
import { RagfairPriceService } from "../services/RagfairPriceService";
import { FenceService } from "../services/FenceService";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairOfferGenerator {
export declare class RagfairOfferGenerator
{
private logger;
private jsonUtil;
private hashUtil;

View File

@ -3,7 +3,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { IWeatherData } from "../models/eft/weather/IWeatherData";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class WeatherGenerator {
export declare class WeatherGenerator
{
private weightedRandomHelper;
private randomUtil;
private timeUtil;

View File

@ -4,7 +4,8 @@ import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemHelper } from "./ItemHelper";
import { QuestHelper } from "./QuestHelper";
export declare class AssortHelper {
export declare class AssortHelper
{
private logger;
private itemHelper;
private databaseServer;

View File

@ -12,7 +12,8 @@ import { InventoryHelper } from "./InventoryHelper";
import { ContainerHelper } from "./ContainerHelper";
import { ItemHelper } from "./ItemHelper";
import { ILogger } from "../models/spt/utils/ILogger";
declare class BotGeneratorHelper {
declare class BotGeneratorHelper
{
private logger;
private jsonUtil;
private hashUtil;
@ -48,7 +49,8 @@ declare class BotGeneratorHelper {
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: PmcInventory): boolean;
private itemAllowedInContainer;
}
export declare class ExhaustableArray<T> {
export declare class ExhaustableArray<T>
{
private itemPool;
private randomUtil;
private jsonUtil;
@ -58,8 +60,10 @@ export declare class ExhaustableArray<T> {
getFirstValue(): T;
hasValues(): boolean;
}
declare namespace BotGeneratorHelper {
enum EquipmentSlots {
declare namespace BotGeneratorHelper
{
enum EquipmentSlots
{
HEADWEAR = "Headwear",
EARPIECE = "Earpiece",
FACE_COVER = "FaceCover",

View File

@ -4,7 +4,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class BotHelper {
export declare class BotHelper
{
private logger;
private jsonUtil;
private databaseServer;

View File

@ -1,11 +1,13 @@
export declare class FindSlotResult {
export declare class FindSlotResult
{
success: boolean;
x: any;
y: any;
rotation: boolean;
constructor(success?: boolean, x?: any, y?: any, rotation?: boolean);
}
export declare class ContainerHelper {
export declare class ContainerHelper
{
private locateSlot;
findSlotForItem(container2D: number[][], itemWidth: number, itemHeight: number): FindSlotResult;
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): any;

View File

@ -5,7 +5,8 @@ import { Dialogue, MessageContent, MessagePreview, MessageType } from "../models
import { HashUtil } from "../utils/HashUtil";
import { NotifierHelper } from "./NotifierHelper";
import { NotificationSendHelper } from "./NotificationSendHelper";
export declare class DialogueHelper {
export declare class DialogueHelper
{
private hashUtil;
private saveServer;
private databaseServer;

View File

@ -2,7 +2,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { RandomUtil } from "../utils/RandomUtil";
import { BotHelper } from "./BotHelper";
export declare class DurabilityLimitsHelper {
export declare class DurabilityLimitsHelper
{
private randomUtil;
private botHelper;
private configServer;

View File

@ -8,7 +8,8 @@ import { ItemHelper } from "./ItemHelper";
import { IWatermark } from "../models/spt/utils/IWatermark";
import { BotGenerator } from "../generators/BotGenerator";
import { ProfileHelper } from "./ProfileHelper";
export declare class ExtendedProfileHelper extends ProfileHelper {
export declare class ExtendedProfileHelper extends ProfileHelper
{
private botGenerator;
constructor(jsonUtil: JsonUtil, watermark: IWatermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, fenceService: FenceService, botGenerator: BotGenerator);
generatePlayerScav(sessionID: string): IPmcData;

View File

@ -1,5 +1,6 @@
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class GameEventHelper {
export declare class GameEventHelper
{
private databaseServer;
constructor(databaseServer: DatabaseServer);
get EVENT(): Record<string, string>;

View File

@ -1,14 +1,17 @@
declare class LookupItem {
declare class LookupItem
{
byId: Record<number, string>;
byParent: Record<string, string[]>;
constructor();
}
export declare class LookupCollection {
export declare class LookupCollection
{
items: LookupItem;
categories: LookupItem;
constructor();
}
export declare class HandbookHelper {
export declare class HandbookHelper
{
private lookup;
hydrateLookup(lookup: LookupCollection): void;
getTemplatePrice(x: string): number;

View File

@ -6,7 +6,8 @@ import { ConfigServer } from "../servers/ConfigServer";
import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HealthHelper {
export declare class HealthHelper
{
private jsonUtil;
private logger;
private timeUtil;

View File

@ -16,7 +16,8 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
import { InventoryHelper } from "./InventoryHelper";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class HideoutHelper {
export declare class HideoutHelper
{
private logger;
private hashUtil;
private timeUtil;

View File

@ -1,5 +1,6 @@
import { ConfigServer } from "../servers/ConfigServer";
export declare class HttpServerHelper {
export declare class HttpServerHelper
{
private configServer;
private httpConfig;
private mime;

View File

@ -7,7 +7,8 @@ import { SaveServer } from "../servers/SaveServer";
import { JsonUtil } from "../utils/JsonUtil";
import { InventoryHelper } from "./InventoryHelper";
import { PaymentHelper } from "./PaymentHelper";
export declare class InRaidHelper {
export declare class InRaidHelper
{
private logger;
private saveServer;
private jsonUtil;

View File

@ -17,13 +17,15 @@ import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySp
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
import { ILogger } from "../models/spt/utils/ILogger";
import { TraderAssortHelper } from "./TraderAssortHelper";
export interface OwnerInventoryItems {
export interface OwnerInventoryItems
{
from: Item[];
to: Item[];
sameInventory: boolean;
isMail: boolean;
}
export declare class InventoryHelper {
export declare class InventoryHelper
{
private logger;
private jsonUtil;
private hashUtil;

View File

@ -5,7 +5,8 @@ import { Item } from "../models/eft/common/tables/IItem";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { ILogger } from "../models/spt/utils/ILogger";
declare class ItemHelper {
declare class ItemHelper
{
private logger;
private hashUtil;
private jsonUtil;
@ -138,8 +139,10 @@ declare class ItemHelper {
isQuestItem(tpl: string): boolean;
getItemSize(items: Item[], rootItemId: string): ItemHelper.ItemSize;
}
declare namespace ItemHelper {
enum BaseClasses {
declare namespace ItemHelper
{
enum BaseClasses
{
WEAPON = "5422acb9af1c889c16000029",
ARMOR = "5448e54d4bdc2dcc718b4568",
VEST = "5448e5284bdc2dcb718b4567",
@ -223,11 +226,13 @@ declare namespace ItemHelper {
ITEM = "54009119af1c881c07000029",
CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25"
}
interface ItemSize {
interface ItemSize
{
width: number;
height: number;
}
enum Money {
enum Money
{
ROUBLES = "5449016a4bdc2d6f028b456f",
EUROS = "569668774bdc2da2298b4568",
DOLLARS = "5696686a4bdc2da3298b456a"

View File

@ -1,7 +1,8 @@
import { INotification } from "../models/eft/notifier/INotifier";
import { IHttpServer } from "../models/spt/server/IHttpServer";
import { NotificationService } from "../services/NotificationService";
export declare class NotificationSendHelper {
export declare class NotificationSendHelper
{
private httpServer;
private notificationService;
constructor(httpServer: IHttpServer, notificationService: NotificationService);

View File

@ -1,7 +1,8 @@
import { INotification } from "../models/eft/notifier/INotifier";
import { Message, MessageContentRagfair } from "../models/eft/profile/IAkiProfile";
import { HttpServerHelper } from "./HttpServerHelper";
export declare class NotifierHelper {
export declare class NotifierHelper
{
private httpServerHelper;
/**
* The default notification sent when waiting times out.

View File

@ -1,4 +1,5 @@
export declare class PaymentHelper {
export declare class PaymentHelper
{
/**
* Check whether tpl is Money
* @param {string} tpl

View File

@ -1,6 +1,7 @@
import { Preset } from "../models/eft/common/IGlobals";
import { DatabaseServer } from "../servers/DatabaseServer";
export declare class PresetHelper {
export declare class PresetHelper
{
private databaseServer;
private lookup;
constructor(databaseServer: DatabaseServer);

View File

@ -8,7 +8,8 @@ import { JsonUtil } from "../utils/JsonUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { ItemHelper } from "./ItemHelper";
import { IWatermark } from "../models/spt/utils/IWatermark";
export declare class ProfileHelper {
export declare class ProfileHelper
{
protected jsonUtil: JsonUtil;
protected watermark: IWatermark;
protected timeUtil: TimeUtil;

View File

@ -1,5 +1,6 @@
import { AvailableForConditions } from "../models/eft/common/tables/IQuest";
export declare class QuestConditionHelper {
export declare class QuestConditionHelper
{
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];

Some files were not shown because too many files have changed in this diff Show More