Compare commits

...

10 Commits

Author SHA1 Message Date
4f4606c65b Added in custom configurations for "boss" PMCs spawning and reduced it from the default as I found they were spawning too often. 2023-02-17 14:15:53 -05:00
596292c332 Valens Progression v1.3.2 Compatible with AKI 3.5.*
* Hotfix for PMCs not generating with proper equipment.
2023-02-17 14:06:16 -05:00
93fd538d06 Added Equipment Weighting to PMCs 2023-02-16 13:55:40 -05:00
d78e51911e Update types for AKI 3.5.1 2023-02-16 13:22:45 -05:00
b8fb281ec2 Package change for 1.3.0 and compatibility for SPT-AKI 3.5.0 2023-02-13 13:59:29 -05:00
8f556bf48f Final changes for 1.3.0; Compatibility for SPT-AKI v3.5.0 2023-02-13 13:58:41 -05:00
1f0daaa06a Initial updates for 3.5.0 compatibility
* Completion of conversion to 3.5.0 server backend, and initial LL1 framework for PMCs in pmc.ts
* Completion of LL1 requirements for PMCs in pmc.ts
* Removed scav file for now by commenting out in mod.ts and scav.ts
* TODO: Completion of LL2 and LL3 requirements for PMCs in pmc.ts; Enable scav.ts and rework scav.ts to be compatible?
2023-02-13 03:27:30 -05:00
14add1d9b5 Types update for 3.5.0 2023-02-12 23:21:22 -05:00
8c4fae1d12 More work 2023-01-16 20:26:44 -05:00
08606cd070 3.5.0 type updates 2023-01-15 00:21:11 -05:00
152 changed files with 2777 additions and 937 deletions

View File

@ -1,10 +1,10 @@
{
"name": "Valens-Progression",
"version": "1.3.0",
"version": "1.3.3",
"main": "src/mod.js",
"license": "CC BY-NC-ND 4.0",
"author": "Valens",
"akiVersion": ">=3.4.*",
"akiVersion": ">=3.5.*",
"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",

View File

@ -1,33 +1,36 @@
import { DependencyContainer } from "tsyringe";
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
import { Scavs } from "./scavs";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { DependencyContainer } from "tsyringe";
//import { Scavs } from "./scavs";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { PMCs } from "./pmc";
class ValensProgression implements IPostDBLoadMod
{
private configServer: ConfigServer;
private locationConfig: ILocationConfig
private botConfig: IBotConfig;
private databaseServer: DatabaseServer;
private scavs: Scavs;
// private scavs: Scavs;
private pmcs: PMCs;
public postDBLoad(container: DependencyContainer): void
{
// get database from server
this.configServer = container.resolve<ConfigServer>("ConfigServer");
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
this.scavs = new Scavs(this.botConfig, this.databaseServer);
this.scavs.updateScavs();
// this.scavs = new Scavs(this.botConfig, this.databaseServer);
// this.scavs.updateScavs();
this.pmcs = new PMCs(this.botConfig, this.databaseServer);
this.pmcs = new PMCs(this.locationConfig, this.botConfig, this.databaseServer);
this.pmcs.updatePmcs();
}
}

1090
src/pmc.ts

File diff suppressed because it is too large Load Diff

View File

@ -1,491 +1,491 @@
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
// import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
// import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
// import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
export class Scavs
{
private botConfig: IBotConfig;
private databaseServer: IDatabaseTables;
// export class Scavs
// {
// private botConfig: IBotConfig;
// private databaseServer: IDatabaseTables;
constructor (botConfig: IBotConfig, databaseServer: DatabaseServer)
{
this.botConfig = botConfig;
this.databaseServer = databaseServer.getTables();
}
// constructor (botConfig: IBotConfig, databaseServer: DatabaseServer)
// {
// this.botConfig = botConfig;
// this.databaseServer = databaseServer.getTables();
// }
public updateScavs(): void
{
this.generateScavs();
}
// public updateScavs(): void
// {
// this.generateScavs();
// }
private generateScavs()
{
// Scav Progression Start
// private generateScavs()
// {
// // Scav Progression Start
// Scav Gear
const primaryWeaponArrayScav = ["5f2a9575926fd9352339381f", "5aafa857e5b5b00018480968", "56dee2bdd2720bc8328b4567", "54491c4f4bdc2db1078b4568", "576165642459773c7a400233", "5a38e6bac4a2826c6e06d79b", "57f4c844245977379d5c14d1", "57d14d2524597714373db789", "57f3c6bd24597738e730fa2f", "59f9cabd86f7743a10721f46", "5ea03f7400685063ec28bfa8", "60339954d62c9b14ed777c06", "5c07c60e0db834002330051f", "5ac66d9b5acfc4001633997a", "5bf3e03b0db834001d2c4a9c", "5ac4cd105acfc40016339859", "5644bd2b4bdc2d3b4c8b4572", "5bf3e0490db83400196199af", "59d6088586f774275f37482f", "5a0ec13bfcdbcb00165aa685", "59ff346386f77477562ff5e2", "57dc2fa62459775949412633", "5839a40f24597726f856b511", "583990e32459771419544dd2", "5b0bbe4e5acfc40dc528a72d", "59e6687d86f77411d949b251", "59e6152586f77473dc057aa1", "587e02ff24597743df3deaeb", "574d967124597745970e7c94", "5c501a4d2e221602b412b540", "57838ad32459774a17445cd2", "5c46fbd72e2216398b5a8c9c", "5ae08f0a5acfc408fb1398a1", "5bfea6e90db834001b7347f3", "55801eed4bdc2d89578b4588", "5de652c31b7e3716273428be"];
const holsterArrayScav = ["576a581d2459771e7b1bc4f1", "56d59856d2720bd8418b456a", "56e0598dd2720bb5668b45a6", "5a17f98cfcdbcb0980087290", "579204f224597773d619e051", "5448bd6b4bdc2dfc2f8b4569", "571a12c42459771f627b58a0", "5cadc190ae921500103bb3b6", "5e81c3cbac2bb513793cdc75"];
const backpackArrayScav = ["59e763f286f7742ee57895da", "56e335e4d2720b6c058b456d", "544a5cde4bdc2d39388b456b", "5f5e45cc5021ce62144be7aa", "56e33634d2720bd8058b456b", "56e33680d2720be2748b4576", "5ab8ee7786f7742d8f33f0b9", "5ab8f04f86f774585f4237d8"];
const tacticalVestArrayScav = ["5d5d646386f7742797261fd9", "5c0e446786f7742013381639", "5e4abc1f86f774069619fbaa", "572b7adb24597762ae139821", "5fd4c5477a8d854fa0105061", "5fd4c4fa16cac650092f6771", "5648a69d4bdc2ded0b8b457b", "5e4abfed86f77406a2713cf7", "59e7643b86f7742cbf2c109a", "5929a2a086f7744f4b234d43", "5ab8dab586f77441cd04f2a2", "5ca20abf86f77418567a43f2", "5c0e6a1586f77404597b4965"];
const earpieceArrayScav = ["5c165d832e2216398b5a7e36", "5b432b965acfc47a8774094e", "6033fa48ffd42c541047f728"];
const headwearArrayScav = ["5ea05cf85ad9772e6624305d", "5df8a58286f77412631087ed", "5c0d2727d174af02a012cf58", "5c08f87c0db8340019124324", "59e7711e86f7746cae05fbe1", "5a7c4850e899ef00150be885", "5aa7cfc0e5b5b00015693143", "5aa7d03ae5b5b00016327db5", "5c06c6a80db834001b735491", "5c066ef40db834001966a595", "5aa2b9ede5b5b000137b758b", "59e7708286f7742cbd762753", "572b7fa124597762b472f9d2", "5bd073c986f7747f627e796c", "59e770f986f7742cbe3164ef", "572b7d8524597762b472f9d1", "5a43943586f77416ad2f06e2", "5a43957686f7742a2c2f11b0", "5aa2b8d7e5b5b00014028f4a", "5aa2ba19e5b5b00014028f4e", "5aa2a7e8e5b5b00016327c16", "5aa2b87de5b5b00016327c25", "5aa2b89be5b5b0001569311f", "5b4329075acfc400153b78ff", "5ab8f20c86f7745cdb629fb2"];
const armorVestArrayScav = ["5ab8e79e86f7742d8b372e78", "5e9dacf986f774054d6b89f4", "5c0e53c886f7747fa54205c7", "5c0e51be86f774598e797894", "5ab8e4ed86f7742d8e50c7fa", "5c0e5edb86f77461f55ed1f7", "5b44d22286f774172b0c9de8", "5c0e5bab86f77461f55ed1f3", "59e7635f86f7742cbf2c1095", "5df8a2ca86f7740bfe6df777", "5648a7494bdc2d9d488b4583", "62a09d79de7ac81993580530"];
const eyewearArrayScav = ["557ff21e4bdc2d89578b4586", "59e770b986f7742cbd762754", "5b432be65acfc433000ed01f", "5aa2b923e5b5b000137b7589", "5aa2b986e5b5b00014028f4c", "5aa2b9aee5b5b00015693121", "603409c80ca681766b6a0fb2"];
const faceCoverArrayScav = ["5b432b2f5acfc4771e1c6622", "5e54f79686f7744022011103", "5b432c305acfc40019478128", "5b432b6c5acfc4001a599bf0", "59e7715586f7742ee5789605", "5bd06f5d86f77427101ad47c", "5bd0716d86f774171822ef4b", "5bd071d786f7747e707b93a3", "572b7f1624597762ae139822", "5ab8f39486f7745cd93a1cca", "5ab8f4ff86f77431c60d91ba", "5b432f3d5acfc4704b4a1dfb", "572b7fa524597762b747ce82", "5b4326435acfc433000ed01d", "5bd073a586f7747e6f135799", "5e54f76986f7740366043752", "5c1a1e3f2e221602b66cc4c2"];
// // Scav Gear
// const primaryWeaponArrayScav = ["5f2a9575926fd9352339381f", "5aafa857e5b5b00018480968", "56dee2bdd2720bc8328b4567", "54491c4f4bdc2db1078b4568", "576165642459773c7a400233", "5a38e6bac4a2826c6e06d79b", "57f4c844245977379d5c14d1", "57d14d2524597714373db789", "57f3c6bd24597738e730fa2f", "59f9cabd86f7743a10721f46", "5ea03f7400685063ec28bfa8", "60339954d62c9b14ed777c06", "5c07c60e0db834002330051f", "5ac66d9b5acfc4001633997a", "5bf3e03b0db834001d2c4a9c", "5ac4cd105acfc40016339859", "5644bd2b4bdc2d3b4c8b4572", "5bf3e0490db83400196199af", "59d6088586f774275f37482f", "5a0ec13bfcdbcb00165aa685", "59ff346386f77477562ff5e2", "57dc2fa62459775949412633", "5839a40f24597726f856b511", "583990e32459771419544dd2", "5b0bbe4e5acfc40dc528a72d", "59e6687d86f77411d949b251", "59e6152586f77473dc057aa1", "587e02ff24597743df3deaeb", "574d967124597745970e7c94", "5c501a4d2e221602b412b540", "57838ad32459774a17445cd2", "5c46fbd72e2216398b5a8c9c", "5ae08f0a5acfc408fb1398a1", "5bfea6e90db834001b7347f3", "55801eed4bdc2d89578b4588", "5de652c31b7e3716273428be"];
// const holsterArrayScav = ["576a581d2459771e7b1bc4f1", "56d59856d2720bd8418b456a", "56e0598dd2720bb5668b45a6", "5a17f98cfcdbcb0980087290", "579204f224597773d619e051", "5448bd6b4bdc2dfc2f8b4569", "571a12c42459771f627b58a0", "5cadc190ae921500103bb3b6", "5e81c3cbac2bb513793cdc75"];
// const backpackArrayScav = ["59e763f286f7742ee57895da", "56e335e4d2720b6c058b456d", "544a5cde4bdc2d39388b456b", "5f5e45cc5021ce62144be7aa", "56e33634d2720bd8058b456b", "56e33680d2720be2748b4576", "5ab8ee7786f7742d8f33f0b9", "5ab8f04f86f774585f4237d8"];
// const tacticalVestArrayScav = ["5d5d646386f7742797261fd9", "5c0e446786f7742013381639", "5e4abc1f86f774069619fbaa", "572b7adb24597762ae139821", "5fd4c5477a8d854fa0105061", "5fd4c4fa16cac650092f6771", "5648a69d4bdc2ded0b8b457b", "5e4abfed86f77406a2713cf7", "59e7643b86f7742cbf2c109a", "5929a2a086f7744f4b234d43", "5ab8dab586f77441cd04f2a2", "5ca20abf86f77418567a43f2", "5c0e6a1586f77404597b4965"];
// const earpieceArrayScav = ["5c165d832e2216398b5a7e36", "5b432b965acfc47a8774094e", "6033fa48ffd42c541047f728"];
// const headwearArrayScav = ["5ea05cf85ad9772e6624305d", "5df8a58286f77412631087ed", "5c0d2727d174af02a012cf58", "5c08f87c0db8340019124324", "59e7711e86f7746cae05fbe1", "5a7c4850e899ef00150be885", "5aa7cfc0e5b5b00015693143", "5aa7d03ae5b5b00016327db5", "5c06c6a80db834001b735491", "5c066ef40db834001966a595", "5aa2b9ede5b5b000137b758b", "59e7708286f7742cbd762753", "572b7fa124597762b472f9d2", "5bd073c986f7747f627e796c", "59e770f986f7742cbe3164ef", "572b7d8524597762b472f9d1", "5a43943586f77416ad2f06e2", "5a43957686f7742a2c2f11b0", "5aa2b8d7e5b5b00014028f4a", "5aa2ba19e5b5b00014028f4e", "5aa2a7e8e5b5b00016327c16", "5aa2b87de5b5b00016327c25", "5aa2b89be5b5b0001569311f", "5b4329075acfc400153b78ff", "5ab8f20c86f7745cdb629fb2"];
// const armorVestArrayScav = ["5ab8e79e86f7742d8b372e78", "5e9dacf986f774054d6b89f4", "5c0e53c886f7747fa54205c7", "5c0e51be86f774598e797894", "5ab8e4ed86f7742d8e50c7fa", "5c0e5edb86f77461f55ed1f7", "5b44d22286f774172b0c9de8", "5c0e5bab86f77461f55ed1f3", "59e7635f86f7742cbf2c1095", "5df8a2ca86f7740bfe6df777", "5648a7494bdc2d9d488b4583", "62a09d79de7ac81993580530"];
// const eyewearArrayScav = ["557ff21e4bdc2d89578b4586", "59e770b986f7742cbd762754", "5b432be65acfc433000ed01f", "5aa2b923e5b5b000137b7589", "5aa2b986e5b5b00014028f4c", "5aa2b9aee5b5b00015693121", "603409c80ca681766b6a0fb2"];
// const faceCoverArrayScav = ["5b432b2f5acfc4771e1c6622", "5e54f79686f7744022011103", "5b432c305acfc40019478128", "5b432b6c5acfc4001a599bf0", "59e7715586f7742ee5789605", "5bd06f5d86f77427101ad47c", "5bd0716d86f774171822ef4b", "5bd071d786f7747e707b93a3", "572b7f1624597762ae139822", "5ab8f39486f7745cd93a1cca", "5ab8f4ff86f77431c60d91ba", "5b432f3d5acfc4704b4a1dfb", "572b7fa524597762b747ce82", "5b4326435acfc433000ed01d", "5bd073a586f7747e6f135799", "5e54f76986f7740366043752", "5c1a1e3f2e221602b66cc4c2"];
// Scav Ammo
const ammo762x54ArrayScav = ["5887431f2459777e1612938f", "5e023cf8186a883be655e54f"];
const ammo762x54ArrayScav2 = ammo762x54ArrayScav.concat(...["59e77a2386f7742ee578960a", "560d61e84bdc2da74d8b4571"]);
// // Scav Ammo
// const ammo762x54ArrayScav = ["5887431f2459777e1612938f", "5e023cf8186a883be655e54f"];
// const ammo762x54ArrayScav2 = ammo762x54ArrayScav.concat(...["59e77a2386f7742ee578960a", "560d61e84bdc2da74d8b4571"]);
const ammo762x51ArrayScav = ["5e023e6e34d52a55c3304f71", "5e023e53d4353e3302577c4c"];
const ammo762x51ArrayScav2 = ammo762x51ArrayScav.concat(...["58dd3ad986f77403051cba8f", "5a608bf24f39f98ffc77720e", "5a6086ea4f39f99cd479502f"]);
// const ammo762x51ArrayScav = ["5e023e6e34d52a55c3304f71", "5e023e53d4353e3302577c4c"];
// const ammo762x51ArrayScav2 = ammo762x51ArrayScav.concat(...["58dd3ad986f77403051cba8f", "5a608bf24f39f98ffc77720e", "5a6086ea4f39f99cd479502f"]);
const ammo762x39ArrayScav = ["5656d7c34bdc2d9d198b4587", "59e4cf5286f7741778269d8a"];
const ammo762x39ArrayScav2 = ammo762x39ArrayScav.concat(...["59e4d24686f7741776641ac7", "59e0d99486f7744a32234762"]);
// const ammo762x39ArrayScav = ["5656d7c34bdc2d9d198b4587", "59e4cf5286f7741778269d8a"];
// const ammo762x39ArrayScav2 = ammo762x39ArrayScav.concat(...["59e4d24686f7741776641ac7", "59e0d99486f7744a32234762"]);
const ammo762x25TTArrayScav = ["5735fdcd2459776445391d61", "5735ff5c245977640e39ba7e", "573601b42459776410737435", "573602322459776445391df1", "5736026a245977644601dc61", "573603c924597764442bd9cb"];
const ammo762x25TTArrayScav2 = ammo762x25TTArrayScav.concat(...["573603562459776430731618"]);
// const ammo762x25TTArrayScav = ["5735fdcd2459776445391d61", "5735ff5c245977640e39ba7e", "573601b42459776410737435", "573602322459776445391df1", "5736026a245977644601dc61", "573603c924597764442bd9cb"];
// const ammo762x25TTArrayScav2 = ammo762x25TTArrayScav.concat(...["573603562459776430731618"]);
const ammo366TKMArrayScav = ["59e6542b86f77411dc52a77a", "59e655cb86f77411dc52a77b", "59e6658b86f77411d949b250"];
const ammo366TKMArrayScav2 = ammo366TKMArrayScav.concat(...["5f0596629e22f464da6bbdd9"]);
// const ammo366TKMArrayScav = ["59e6542b86f77411dc52a77a", "59e655cb86f77411dc52a77b", "59e6658b86f77411d949b250"];
// const ammo366TKMArrayScav2 = ammo366TKMArrayScav.concat(...["5f0596629e22f464da6bbdd9"]);
const ammo556x45ArrayScav = ["59e6920f86f77411d82aa167", "54527a984bdc2d4e668b4567", "59e68f6f86f7746c9f75e846", "59e6906286f7746c9f75e847"];
const ammo556x45ArrayScav2 = ammo556x45ArrayScav.concat(...["59e690b686f7746c9f75e848"]);
// const ammo556x45ArrayScav = ["59e6920f86f77411d82aa167", "54527a984bdc2d4e668b4567", "59e68f6f86f7746c9f75e846", "59e6906286f7746c9f75e847"];
// const ammo556x45ArrayScav2 = ammo556x45ArrayScav.concat(...["59e690b686f7746c9f75e848"]);
const ammo545x39ArrayScav = ["56dff4a2d2720bbd668b456a", "56dff3afd2720bba668b4567", "56dff2ced2720bb4668b4567", "56dff4ecd2720b5f5a8b4568"];
const ammo545x39ArrayScav2 = ammo545x39ArrayScav.concat(...["56dfef82d2720bbd668b4567", "56dff061d2720bb5668b4567", "56dff026d2720bb8668b4567", "5c0d5e4486f77478390952fe"]);
// const ammo545x39ArrayScav = ["56dff4a2d2720bbd668b456a", "56dff3afd2720bba668b4567", "56dff2ced2720bb4668b4567", "56dff4ecd2720b5f5a8b4568"];
// const ammo545x39ArrayScav2 = ammo545x39ArrayScav.concat(...["56dfef82d2720bbd668b4567", "56dff061d2720bb5668b4567", "56dff026d2720bb8668b4567", "5c0d5e4486f77478390952fe"]);
const ammo9x18ArrayScav = ["573719762459775a626ccbc1", "57371e4124597760ff7b25f1", "5737207f24597760ff7b25f2"];
const ammo9x18ArrayScav2 = ammo9x18ArrayScav.concat(...["573718ba2459775a75491131", "573719df2459775a626ccbc2", "57371aab2459775a77142f22", "57372140245977611f70ee91"]);
// const ammo9x18ArrayScav = ["573719762459775a626ccbc1", "57371e4124597760ff7b25f1", "5737207f24597760ff7b25f2"];
// const ammo9x18ArrayScav2 = ammo9x18ArrayScav.concat(...["573718ba2459775a75491131", "573719df2459775a626ccbc2", "57371aab2459775a77142f22", "57372140245977611f70ee91"]);
const ammo9x19ArrayScav = ["5c3df7d588a4501f290594e5", "56d59d3ad2720bdb418b4577"];
const ammo9x19ArrayScav2 = ammo9x19ArrayScav.concat(...["5c925fa22e221601da359b7b", "5efb0e16aeb21837e749c7ff", "5efb0da7a29a85116f6ea05f"]);
// const ammo9x19ArrayScav = ["5c3df7d588a4501f290594e5", "56d59d3ad2720bdb418b4577"];
// const ammo9x19ArrayScav2 = ammo9x19ArrayScav.concat(...["5c925fa22e221601da359b7b", "5efb0e16aeb21837e749c7ff", "5efb0da7a29a85116f6ea05f"]);
const ammo9x39ArrayScav = ["57a0dfb82459774d3078b56c"];
const ammo9x39ArrayScav2 = ammo9x39ArrayScav.concat(...["57a0e5022459774d1673f889", "5c0d688c86f77413ae3407b2", "5c0d668f86f7747ccb7f13b2"]);
// const ammo9x39ArrayScav = ["57a0dfb82459774d3078b56c"];
// const ammo9x39ArrayScav2 = ammo9x39ArrayScav.concat(...["57a0e5022459774d1673f889", "5c0d688c86f77413ae3407b2", "5c0d668f86f7747ccb7f13b2"]);
const ammo1143x23ACPArrayScav = ["5e81f423763d9f754677bf2e", "5efb0d4f4bc50b58e81710f3"];
const ammo1143x23ACPArrayScav2 = ammo1143x23ACPArrayScav.concat(...["5efb0cabfb3e451d70735af5", "5efb0fc6aeb21837e749c801"]);
// const ammo1143x23ACPArrayScav = ["5e81f423763d9f754677bf2e", "5efb0d4f4bc50b58e81710f3"];
// const ammo1143x23ACPArrayScav2 = ammo1143x23ACPArrayScav.concat(...["5efb0cabfb3e451d70735af5", "5efb0fc6aeb21837e749c801"]);
const ammo12x70ArrayScav = ["560d5e524bdc2d25448b4571", "5d6e6772a4b936088465b17c", "5d6e67fba4b9361bc73bc779", "58820d1224597753c90aeb13", "5d6e6869a4b9361c140bcfde", "5d6e6891a4b9361bd473feea","5d6e6806a4b936088465b17e", "5d6e689ca4b9361bc8618956", "5d6e68e6a4b9361c140bcfe0"];
const ammo12x70ArrayScav2 = ammo12x70ArrayScav.concat(...["5d6e68b3a4b9361bca7e50b5", "5d6e68dea4b9361bcc29e659", "5d6e68a8a4b9360b6c0d54e2", "5d6e6911a4b9361bd5780d52", "5d6e68c4a4b9361b93413f79", "5c0d591486f7744c505b416f"]);
// const ammo12x70ArrayScav = ["560d5e524bdc2d25448b4571", "5d6e6772a4b936088465b17c", "5d6e67fba4b9361bc73bc779", "58820d1224597753c90aeb13", "5d6e6869a4b9361c140bcfde", "5d6e6891a4b9361bd473feea","5d6e6806a4b936088465b17e", "5d6e689ca4b9361bc8618956", "5d6e68e6a4b9361c140bcfe0"];
// const ammo12x70ArrayScav2 = ammo12x70ArrayScav.concat(...["5d6e68b3a4b9361bca7e50b5", "5d6e68dea4b9361bcc29e659", "5d6e68a8a4b9360b6c0d54e2", "5d6e6911a4b9361bd5780d52", "5d6e68c4a4b9361b93413f79", "5c0d591486f7744c505b416f"]);
const ammo20x70ArrayScav = ["5a38ebd9c4a282000d722a5b", "5d6e695fa4b936359b35d852", "5d6e6a42a4b9364f07165f52", "5d6e6a53a4b9361bd473feec", "5d6e69b9a4b9361bc8618958", "5d6e69c7a4b9360b6c0d54e4"];
const ammo20x70ArrayScav2 = ammo20x70ArrayScav.concat(...["5d6e6a05a4b93618084f58d0", "5d6e6a5fa4b93614ec501745"]);
// const ammo20x70ArrayScav = ["5a38ebd9c4a282000d722a5b", "5d6e695fa4b936359b35d852", "5d6e6a42a4b9364f07165f52", "5d6e6a53a4b9361bd473feec", "5d6e69b9a4b9361bc8618958", "5d6e69c7a4b9360b6c0d54e4"];
// const ammo20x70ArrayScav2 = ammo20x70ArrayScav.concat(...["5d6e6a05a4b93618084f58d0", "5d6e6a5fa4b93614ec501745"]);
// Scav Whitelist
const progressionWhitelistScav1: EquipmentFilters =
{
"weaponModLimits": {},
"weaponSightWhitelist": {},
"nvgIsActiveChancePercent": 5,
"faceShieldIsActiveChancePercent": 85,
"lightLaserIsActiveChancePercent": 75,
"randomisation": [],
"blacklist": [],
"weightingAdjustments": [],
"whitelist": [{
"levelRange":
{
"min": 1,
"max": 32
},
"equipment":
{
"FirstPrimaryWeapon": [...primaryWeaponArrayScav],
"Holster": [...holsterArrayScav],
"Backpack": [...backpackArrayScav],
"TacticalVest": [...tacticalVestArrayScav],
"Earpiece": [...earpieceArrayScav],
"Headwear": [...headwearArrayScav],
"ArmorVest": [...armorVestArrayScav],
"Eyewear": [...eyewearArrayScav],
"FaceCover": [...faceCoverArrayScav]
},
"cartridge":
{
"Caliber762x54R": [...ammo762x54ArrayScav],
"Caliber762x51": [...ammo762x51ArrayScav],
"Caliber762x39": [...ammo762x39ArrayScav],
"Caliber762x25TT": [...ammo762x25TTArrayScav],
"Caliber366TKM": [...ammo366TKMArrayScav],
"Caliber556x45NATO": [...ammo556x45ArrayScav],
"Caliber545x39": [...ammo545x39ArrayScav],
"Caliber1143x23ACP": [...ammo1143x23ACPArrayScav],
"Caliber9x39": [...ammo9x39ArrayScav],
"Caliber9x19PARA": [...ammo9x19ArrayScav],
"Caliber9x18PM": [...ammo9x18ArrayScav],
"Caliber12g": [...ammo12x70ArrayScav],
"Caliber20g": [...ammo20x70ArrayScav]
}
}],
"clothing": []
}
// // Scav Whitelist
// const progressionWhitelistScav1: EquipmentFilters =
// {
// "weaponModLimits": {},
// "weaponSightWhitelist": {},
// "nvgIsActiveChancePercent": 5,
// "faceShieldIsActiveChancePercent": 85,
// "lightLaserIsActiveChancePercent": 75,
// "randomisation": [],
// "blacklist": [],
// "weightingAdjustments": [],
// "whitelist": [{
// "levelRange":
// {
// "min": 1,
// "max": 32
// },
// "equipment":
// {
// "FirstPrimaryWeapon": [...primaryWeaponArrayScav],
// "Holster": [...holsterArrayScav],
// "Backpack": [...backpackArrayScav],
// "TacticalVest": [...tacticalVestArrayScav],
// "Earpiece": [...earpieceArrayScav],
// "Headwear": [...headwearArrayScav],
// "ArmorVest": [...armorVestArrayScav],
// "Eyewear": [...eyewearArrayScav],
// "FaceCover": [...faceCoverArrayScav]
// },
// "cartridge":
// {
// "Caliber762x54R": [...ammo762x54ArrayScav],
// "Caliber762x51": [...ammo762x51ArrayScav],
// "Caliber762x39": [...ammo762x39ArrayScav],
// "Caliber762x25TT": [...ammo762x25TTArrayScav],
// "Caliber366TKM": [...ammo366TKMArrayScav],
// "Caliber556x45NATO": [...ammo556x45ArrayScav],
// "Caliber545x39": [...ammo545x39ArrayScav],
// "Caliber1143x23ACP": [...ammo1143x23ACPArrayScav],
// "Caliber9x39": [...ammo9x39ArrayScav],
// "Caliber9x19PARA": [...ammo9x19ArrayScav],
// "Caliber9x18PM": [...ammo9x18ArrayScav],
// "Caliber12g": [...ammo12x70ArrayScav],
// "Caliber20g": [...ammo20x70ArrayScav]
// }
// }],
// "clothing": []
// }
const progressionWhitelistScav2: EquipmentFilterDetails =
{
"levelRange":
{
"min": 33,
"max": 70
},
"equipment":
{
"FirstPrimaryWeapon": [...primaryWeaponArrayScav],
"Holster": [...holsterArrayScav],
"Backpack": [...backpackArrayScav],
"TacticalVest": [...tacticalVestArrayScav],
"Earpiece": [...earpieceArrayScav],
"Headwear": [...headwearArrayScav],
"ArmorVest": [...armorVestArrayScav],
"Eyewear": [...eyewearArrayScav],
"FaceCover": [...faceCoverArrayScav]
},
"cartridge":
{
"Caliber762x54R": [...ammo762x54ArrayScav2],
"Caliber762x51": [...ammo762x51ArrayScav2],
"Caliber762x39": [...ammo762x39ArrayScav2],
"Caliber762x25TT": [...ammo762x25TTArrayScav2],
"Caliber366TKM": [...ammo366TKMArrayScav2],
"Caliber556x45NATO": [...ammo556x45ArrayScav2],
"Caliber545x39": [...ammo545x39ArrayScav2],
"Caliber1143x23ACP": [...ammo1143x23ACPArrayScav2],
"Caliber9x39": [...ammo9x39ArrayScav2],
"Caliber9x19PARA": [...ammo9x19ArrayScav2],
"Caliber9x18PM": [...ammo9x18ArrayScav2],
"Caliber12g": [...ammo12x70ArrayScav2],
"Caliber20g": [...ammo20x70ArrayScav2]
}
}
// const progressionWhitelistScav2: EquipmentFilterDetails =
// {
// "levelRange":
// {
// "min": 33,
// "max": 70
// },
// "equipment":
// {
// "FirstPrimaryWeapon": [...primaryWeaponArrayScav],
// "Holster": [...holsterArrayScav],
// "Backpack": [...backpackArrayScav],
// "TacticalVest": [...tacticalVestArrayScav],
// "Earpiece": [...earpieceArrayScav],
// "Headwear": [...headwearArrayScav],
// "ArmorVest": [...armorVestArrayScav],
// "Eyewear": [...eyewearArrayScav],
// "FaceCover": [...faceCoverArrayScav]
// },
// "cartridge":
// {
// "Caliber762x54R": [...ammo762x54ArrayScav2],
// "Caliber762x51": [...ammo762x51ArrayScav2],
// "Caliber762x39": [...ammo762x39ArrayScav2],
// "Caliber762x25TT": [...ammo762x25TTArrayScav2],
// "Caliber366TKM": [...ammo366TKMArrayScav2],
// "Caliber556x45NATO": [...ammo556x45ArrayScav2],
// "Caliber545x39": [...ammo545x39ArrayScav2],
// "Caliber1143x23ACP": [...ammo1143x23ACPArrayScav2],
// "Caliber9x39": [...ammo9x39ArrayScav2],
// "Caliber9x19PARA": [...ammo9x19ArrayScav2],
// "Caliber9x18PM": [...ammo9x18ArrayScav2],
// "Caliber12g": [...ammo12x70ArrayScav2],
// "Caliber20g": [...ammo20x70ArrayScav2]
// }
// }
// Scav Gear Weighting Changes
const scavEquipment = this.databaseServer.bots.types.assault.inventory.equipment;
const scavChances = this.databaseServer.bots.types.assault.chances;
const scavAmmo = this.databaseServer.bots.types.assault.inventory.Ammo;
// // Scav Gear Weighting Changes
// const scavEquipment = this.databaseServer.bots.types.assault.inventory.equipment;
// const scavChances = this.databaseServer.bots.types.assault.chances;
// const scavAmmo = this.databaseServer.bots.types.assault.inventory.Ammo;
// Scav Primary Weapon Weighting && Chance Edits
scavChances.mods.mod_foregrip = 15;
scavEquipment.FirstPrimaryWeapon= {
"56dee2bdd2720bc8328b4567": 23,
"54491c4f4bdc2db1078b4568": 25,
"576165642459773c7a400233": 23,
"5a38e6bac4a2826c6e06d79b": 23,
"57f4c844245977379d5c14d1": 25,
"57d14d2524597714373db789": 25,
"59f9cabd86f7743a10721f46": 23,
"5ea03f7400685063ec28bfa8": 23,
"60339954d62c9b14ed777c06": 23,
"5c07c60e0db834002330051f": 25,
"5ac66d9b5acfc4001633997a": 23,
"5bf3e03b0db834001d2c4a9c": 23,
"5ac4cd105acfc40016339859": 23,
"5644bd2b4bdc2d3b4c8b4572": 23,
"5bf3e0490db83400196199af": 23,
"59d6088586f774275f37482f": 23,
"5a0ec13bfcdbcb00165aa685": 23,
"59ff346386f77477562ff5e2": 23,
"57dc2fa62459775949412633": 25,
"5839a40f24597726f856b511": 25,
"583990e32459771419544dd2": 25,
"5b0bbe4e5acfc40dc528a72d": 5,
"59e6687d86f77411d949b251": 41,
"59e6152586f77473dc057aa1": 41,
"587e02ff24597743df3deaeb": 11,
"574d967124597745970e7c94": 27,
"5c501a4d2e221602b412b540": 5,
"57838ad32459774a17445cd2": 5,
"5c46fbd72e2216398b5a8c9c": 5,
"5ae08f0a5acfc408fb1398a1": 23,
"5bfea6e90db834001b7347f3": 5,
"55801eed4bdc2d89578b4588": 5,
"5de652c31b7e3716273428be": 23,
"5f2a9575926fd9352339381f": 7,
"5aafa857e5b5b00018480968": 7
}
// // Scav Primary Weapon Weighting && Chance Edits
// scavChances.mods.mod_foregrip = 15;
// scavEquipment.FirstPrimaryWeapon= {
// "56dee2bdd2720bc8328b4567": 23,
// "54491c4f4bdc2db1078b4568": 25,
// "576165642459773c7a400233": 23,
// "5a38e6bac4a2826c6e06d79b": 23,
// "57f4c844245977379d5c14d1": 25,
// "57d14d2524597714373db789": 25,
// "59f9cabd86f7743a10721f46": 23,
// "5ea03f7400685063ec28bfa8": 23,
// "60339954d62c9b14ed777c06": 23,
// "5c07c60e0db834002330051f": 25,
// "5ac66d9b5acfc4001633997a": 23,
// "5bf3e03b0db834001d2c4a9c": 23,
// "5ac4cd105acfc40016339859": 23,
// "5644bd2b4bdc2d3b4c8b4572": 23,
// "5bf3e0490db83400196199af": 23,
// "59d6088586f774275f37482f": 23,
// "5a0ec13bfcdbcb00165aa685": 23,
// "59ff346386f77477562ff5e2": 23,
// "57dc2fa62459775949412633": 25,
// "5839a40f24597726f856b511": 25,
// "583990e32459771419544dd2": 25,
// "5b0bbe4e5acfc40dc528a72d": 5,
// "59e6687d86f77411d949b251": 41,
// "59e6152586f77473dc057aa1": 41,
// "587e02ff24597743df3deaeb": 11,
// "574d967124597745970e7c94": 27,
// "5c501a4d2e221602b412b540": 5,
// "57838ad32459774a17445cd2": 5,
// "5c46fbd72e2216398b5a8c9c": 5,
// "5ae08f0a5acfc408fb1398a1": 23,
// "5bfea6e90db834001b7347f3": 5,
// "55801eed4bdc2d89578b4588": 5,
// "5de652c31b7e3716273428be": 23,
// "5f2a9575926fd9352339381f": 7,
// "5aafa857e5b5b00018480968": 7
// }
// Scav Holster (Secondary Weapon) Weighting
scavChances.equipment.Holster = 12;
scavEquipment.Holster = {
"576a581d2459771e7b1bc4f1": 25,
"56d59856d2720bd8418b456a": 17,
"56e0598dd2720bb5668b45a6": 12,
"5a17f98cfcdbcb0980087290": 17,
"579204f224597773d619e051": 27,
"5448bd6b4bdc2dfc2f8b4569": 31,
"571a12c42459771f627b58a0": 31,
"5cadc190ae921500103bb3b6": 17,
"5e81c3cbac2bb513793cdc75": 12
}
// // Scav Holster (Secondary Weapon) Weighting
// scavChances.equipment.Holster = 12;
// scavEquipment.Holster = {
// "576a581d2459771e7b1bc4f1": 25,
// "56d59856d2720bd8418b456a": 17,
// "56e0598dd2720bb5668b45a6": 12,
// "5a17f98cfcdbcb0980087290": 17,
// "579204f224597773d619e051": 27,
// "5448bd6b4bdc2dfc2f8b4569": 31,
// "571a12c42459771f627b58a0": 31,
// "5cadc190ae921500103bb3b6": 17,
// "5e81c3cbac2bb513793cdc75": 12
// }
// Scav Backpack Weighting && Chance Edit
scavChances.equipment.Backpack = 55;
scavEquipment.Backpack = {
"59e763f286f7742ee57895da": 11,
"56e335e4d2720b6c058b456d": 16,
"544a5cde4bdc2d39388b456b": 25,
"5f5e45cc5021ce62144be7aa": 29,
"56e33634d2720bd8058b456b": 29,
"56e33680d2720be2748b4576": 30,
"5ab8ee7786f7742d8f33f0b9": 30,
"5ab8f04f86f774585f4237d8": 30,
"628e1ffc83ec92260c0f437f": 6,
"5df8a4d786f77412672a1e3b": 2
}
// // Scav Backpack Weighting && Chance Edit
// scavChances.equipment.Backpack = 55;
// scavEquipment.Backpack = {
// "59e763f286f7742ee57895da": 11,
// "56e335e4d2720b6c058b456d": 16,
// "544a5cde4bdc2d39388b456b": 25,
// "5f5e45cc5021ce62144be7aa": 29,
// "56e33634d2720bd8058b456b": 29,
// "56e33680d2720be2748b4576": 30,
// "5ab8ee7786f7742d8f33f0b9": 30,
// "5ab8f04f86f774585f4237d8": 30,
// "628e1ffc83ec92260c0f437f": 6,
// "5df8a4d786f77412672a1e3b": 2
// }
// Scav Tac Vest Weighting
scavEquipment.TacticalVest = {
"5d5d646386f7742797261fd9": 14,
"5c0e446786f7742013381639": 14,
"5e4abc1f86f774069619fbaa": 20,
"572b7adb24597762ae139821": 20,
"5fd4c5477a8d854fa0105061": 20,
"5fd4c4fa16cac650092f6771": 20,
"5648a69d4bdc2ded0b8b457b": 6,
"5e4abfed86f77406a2713cf7": 20,
"59e7643b86f7742cbf2c109a": 20,
"5929a2a086f7744f4b234d43": 20,
"5ab8dab586f77441cd04f2a2": 8,
"5ca20abf86f77418567a43f2": 10,
"5c0e6a1586f77404597b4965": 8
}
// // Scav Tac Vest Weighting
// scavEquipment.TacticalVest = {
// "5d5d646386f7742797261fd9": 14,
// "5c0e446786f7742013381639": 14,
// "5e4abc1f86f774069619fbaa": 20,
// "572b7adb24597762ae139821": 20,
// "5fd4c5477a8d854fa0105061": 20,
// "5fd4c4fa16cac650092f6771": 20,
// "5648a69d4bdc2ded0b8b457b": 6,
// "5e4abfed86f77406a2713cf7": 20,
// "59e7643b86f7742cbf2c109a": 20,
// "5929a2a086f7744f4b234d43": 20,
// "5ab8dab586f77441cd04f2a2": 8,
// "5ca20abf86f77418567a43f2": 10,
// "5c0e6a1586f77404597b4965": 8
// }
// Scav Headset/Earpiece Weighting && Chance Edit
scavChances.equipment.Earpiece = 30;
scavEquipment.Earpiece = {
"5c165d832e2216398b5a7e36": 32,
"5b432b965acfc47a8774094e": 34,
"6033fa48ffd42c541047f728": 34
}
// // Scav Headset/Earpiece Weighting && Chance Edit
// scavChances.equipment.Earpiece = 30;
// scavEquipment.Earpiece = {
// "5c165d832e2216398b5a7e36": 32,
// "5b432b965acfc47a8774094e": 34,
// "6033fa48ffd42c541047f728": 34
// }
// Scav Headwear/Helmet Weighting
scavChances.mods.mod_nvg = 10;
scavEquipment.Headwear = {
"5ea05cf85ad9772e6624305d": 16,
"5df8a58286f77412631087ed": 16,
"5c0d2727d174af02a012cf58": 16,
"5c08f87c0db8340019124324": 16,
"59e7711e86f7746cae05fbe1": 16,
"5a7c4850e899ef00150be885": 16,
"5aa7cfc0e5b5b00015693143": 16,
"5aa7d03ae5b5b00016327db5": 16,
"5c06c6a80db834001b735491": 16,
"5c066ef40db834001966a595": 16,
"5aa2b9ede5b5b000137b758b": 16,
"59e7708286f7742cbd762753": 16,
"572b7fa124597762b472f9d2": 16,
"5bd073c986f7747f627e796c": 16,
"59e770f986f7742cbe3164ef": 16,
"572b7d8524597762b472f9d1": 16,
"5a43943586f77416ad2f06e2": 16,
"5a43957686f7742a2c2f11b0": 16,
"5aa2b8d7e5b5b00014028f4a": 16,
"5aa2ba19e5b5b00014028f4e": 16,
"5aa2a7e8e5b5b00016327c16": 16,
"5aa2b87de5b5b00016327c25": 16,
"5aa2b89be5b5b0001569311f": 16,
"5b4329075acfc400153b78ff": 16,
"5ab8f20c86f7745cdb629fb2": 16
}
// // Scav Headwear/Helmet Weighting
// scavChances.mods.mod_nvg = 10;
// scavEquipment.Headwear = {
// "5ea05cf85ad9772e6624305d": 16,
// "5df8a58286f77412631087ed": 16,
// "5c0d2727d174af02a012cf58": 16,
// "5c08f87c0db8340019124324": 16,
// "59e7711e86f7746cae05fbe1": 16,
// "5a7c4850e899ef00150be885": 16,
// "5aa7cfc0e5b5b00015693143": 16,
// "5aa7d03ae5b5b00016327db5": 16,
// "5c06c6a80db834001b735491": 16,
// "5c066ef40db834001966a595": 16,
// "5aa2b9ede5b5b000137b758b": 16,
// "59e7708286f7742cbd762753": 16,
// "572b7fa124597762b472f9d2": 16,
// "5bd073c986f7747f627e796c": 16,
// "59e770f986f7742cbe3164ef": 16,
// "572b7d8524597762b472f9d1": 16,
// "5a43943586f77416ad2f06e2": 16,
// "5a43957686f7742a2c2f11b0": 16,
// "5aa2b8d7e5b5b00014028f4a": 16,
// "5aa2ba19e5b5b00014028f4e": 16,
// "5aa2a7e8e5b5b00016327c16": 16,
// "5aa2b87de5b5b00016327c25": 16,
// "5aa2b89be5b5b0001569311f": 16,
// "5b4329075acfc400153b78ff": 16,
// "5ab8f20c86f7745cdb629fb2": 16
// }
// Scav Armor Vest Weighting
scavEquipment.ArmorVest = {
"5ab8e79e86f7742d8b372e78": 3,
"5e9dacf986f774054d6b89f4": 3,
"5c0e53c886f7747fa54205c7": 16,
"5c0e51be86f774598e797894": 16,
"5ab8e4ed86f7742d8e50c7fa": 22,
"5c0e5edb86f77461f55ed1f7": 22,
"5b44d22286f774172b0c9de8": 22,
"5c0e5bab86f77461f55ed1f3": 22,
"59e7635f86f7742cbf2c1095": 22,
"5df8a2ca86f7740bfe6df777": 22,
"5648a7494bdc2d9d488b4583": 22,
"62a09d79de7ac81993580530": 8
}
// // Scav Armor Vest Weighting
// scavEquipment.ArmorVest = {
// "5ab8e79e86f7742d8b372e78": 3,
// "5e9dacf986f774054d6b89f4": 3,
// "5c0e53c886f7747fa54205c7": 16,
// "5c0e51be86f774598e797894": 16,
// "5ab8e4ed86f7742d8e50c7fa": 22,
// "5c0e5edb86f77461f55ed1f7": 22,
// "5b44d22286f774172b0c9de8": 22,
// "5c0e5bab86f77461f55ed1f3": 22,
// "59e7635f86f7742cbf2c1095": 22,
// "5df8a2ca86f7740bfe6df777": 22,
// "5648a7494bdc2d9d488b4583": 22,
// "62a09d79de7ac81993580530": 8
// }
// Scav Eyewear Weighting
scavEquipment.Eyewear = {
"557ff21e4bdc2d89578b4586": 22,
"59e770b986f7742cbd762754": 23,
"5b432be65acfc433000ed01f": 23,
"5aa2b923e5b5b000137b7589": 9,
"5aa2b986e5b5b00014028f4c": 23,
"5aa2b9aee5b5b00015693121": 14,
"603409c80ca681766b6a0fb2": 7
}
// // Scav Eyewear Weighting
// scavEquipment.Eyewear = {
// "557ff21e4bdc2d89578b4586": 22,
// "59e770b986f7742cbd762754": 23,
// "5b432be65acfc433000ed01f": 23,
// "5aa2b923e5b5b000137b7589": 9,
// "5aa2b986e5b5b00014028f4c": 23,
// "5aa2b9aee5b5b00015693121": 14,
// "603409c80ca681766b6a0fb2": 7
// }
// Scav Facecover Weighting
scavEquipment.FaceCover = {
"5b432b2f5acfc4771e1c6622": 21,
"5e54f79686f7744022011103": 15,
"5b432c305acfc40019478128": 21,
"5b432b6c5acfc4001a599bf0": 21,
"59e7715586f7742ee5789605": 24,
"5bd06f5d86f77427101ad47c": 21,
"5bd0716d86f774171822ef4b": 21,
"5bd071d786f7747e707b93a3": 21,
"572b7f1624597762ae139822": 21,
"5ab8f39486f7745cd93a1cca": 21,
"5ab8f4ff86f77431c60d91ba": 21,
"5b432f3d5acfc4704b4a1dfb": 25,
"572b7fa524597762b747ce82": 30,
"5b4326435acfc433000ed01d": 30,
"5bd073a586f7747e6f135799": 20,
"5e54f76986f7740366043752": 15,
"5c1a1e3f2e221602b66cc4c2": 20
}
// // Scav Facecover Weighting
// scavEquipment.FaceCover = {
// "5b432b2f5acfc4771e1c6622": 21,
// "5e54f79686f7744022011103": 15,
// "5b432c305acfc40019478128": 21,
// "5b432b6c5acfc4001a599bf0": 21,
// "59e7715586f7742ee5789605": 24,
// "5bd06f5d86f77427101ad47c": 21,
// "5bd0716d86f774171822ef4b": 21,
// "5bd071d786f7747e707b93a3": 21,
// "572b7f1624597762ae139822": 21,
// "5ab8f39486f7745cd93a1cca": 21,
// "5ab8f4ff86f77431c60d91ba": 21,
// "5b432f3d5acfc4704b4a1dfb": 25,
// "572b7fa524597762b747ce82": 30,
// "5b4326435acfc433000ed01d": 30,
// "5bd073a586f7747e6f135799": 20,
// "5e54f76986f7740366043752": 15,
// "5c1a1e3f2e221602b66cc4c2": 20
// }
// Scav Ammo Weighting
// // Scav Ammo Weighting
// 762x54R Weighting
scavAmmo.Caliber762x54R = {
"5887431f2459777e1612938f": 45,
"5e023cf8186a883be655e54f": 45,
"59e77a2386f7742ee578960a": 60,
"560d61e84bdc2da74d8b4571": 50
}
// // 762x54R Weighting
// scavAmmo.Caliber762x54R = {
// "5887431f2459777e1612938f": 45,
// "5e023cf8186a883be655e54f": 45,
// "59e77a2386f7742ee578960a": 60,
// "560d61e84bdc2da74d8b4571": 50
// }
// 762x51 Weighting
scavAmmo.Caliber762x51 = {
"5e023e6e34d52a55c3304f71": 25,
"5e023e53d4353e3302577c4c": 25,
"58dd3ad986f77403051cba8f": 100,
"5a608bf24f39f98ffc77720e": 100,
"5a6086ea4f39f99cd479502f": 50
}
// // 762x51 Weighting
// scavAmmo.Caliber762x51 = {
// "5e023e6e34d52a55c3304f71": 25,
// "5e023e53d4353e3302577c4c": 25,
// "58dd3ad986f77403051cba8f": 100,
// "5a608bf24f39f98ffc77720e": 100,
// "5a6086ea4f39f99cd479502f": 50
// }
// 762x39 Weighting
scavAmmo.Caliber762x39 = {
"5656d7c34bdc2d9d198b4587": 30,
"59e4cf5286f7741778269d8a": 30,
"59e4d24686f7741776641ac7": 30,
"59e0d99486f7744a32234762": 10
}
// // 762x39 Weighting
// scavAmmo.Caliber762x39 = {
// "5656d7c34bdc2d9d198b4587": 30,
// "59e4cf5286f7741778269d8a": 30,
// "59e4d24686f7741776641ac7": 30,
// "59e0d99486f7744a32234762": 10
// }
// 762x25 Weighting
scavAmmo.Caliber762x25TT = {
"5735fdcd2459776445391d61": 7,
"5735ff5c245977640e39ba7e": 20,
"573601b42459776410737435": 20,
"573602322459776445391df1": 20,
"5736026a245977644601dc61": 7,
"573603c924597764442bd9cb": 6,
"573603562459776430731618": 20
}
// // 762x25 Weighting
// scavAmmo.Caliber762x25TT = {
// "5735fdcd2459776445391d61": 7,
// "5735ff5c245977640e39ba7e": 20,
// "573601b42459776410737435": 20,
// "573602322459776445391df1": 20,
// "5736026a245977644601dc61": 7,
// "573603c924597764442bd9cb": 6,
// "573603562459776430731618": 20
// }
// 366TKM Weighting
scavAmmo.Caliber366TKM = {
"59e6542b86f77411dc52a77a": 30,
"59e655cb86f77411dc52a77b": 80,
"59e6658b86f77411d949b250": 10,
"5f0596629e22f464da6bbdd9": 80
}
// // 366TKM Weighting
// scavAmmo.Caliber366TKM = {
// "59e6542b86f77411dc52a77a": 30,
// "59e655cb86f77411dc52a77b": 80,
// "59e6658b86f77411d949b250": 10,
// "5f0596629e22f464da6bbdd9": 80
// }
// 5.56x45 Weighting
scavAmmo.Caliber556x45NATO = {
"59e6920f86f77411d82aa167": 20,
"54527a984bdc2d4e668b4567": 40,
"59e68f6f86f7746c9f75e846": 40,
"59e6906286f7746c9f75e847": 40,
"59e690b686f7746c9f75e848": 40
}
// // 5.56x45 Weighting
// scavAmmo.Caliber556x45NATO = {
// "59e6920f86f77411d82aa167": 20,
// "54527a984bdc2d4e668b4567": 40,
// "59e68f6f86f7746c9f75e846": 40,
// "59e6906286f7746c9f75e847": 40,
// "59e690b686f7746c9f75e848": 40
// }
// 5.45x39 Weighting
scavAmmo.Caliber545x39 = {
"56dff4a2d2720bbd668b456a": 15,
"56dff3afd2720bba668b4567": 15,
"56dff2ced2720bb4668b4567": 15,
"56dff4ecd2720b5f5a8b4568": 15,
"56dfef82d2720bbd668b4567": 20,
"56dff061d2720bb5668b4567": 25,
"56dff026d2720bb8668b4567": 25,
"5c0d5e4486f77478390952fe": 25
}
// // 5.45x39 Weighting
// scavAmmo.Caliber545x39 = {
// "56dff4a2d2720bbd668b456a": 15,
// "56dff3afd2720bba668b4567": 15,
// "56dff2ced2720bb4668b4567": 15,
// "56dff4ecd2720b5f5a8b4568": 15,
// "56dfef82d2720bbd668b4567": 20,
// "56dff061d2720bb5668b4567": 25,
// "56dff026d2720bb8668b4567": 25,
// "5c0d5e4486f77478390952fe": 25
// }
// 9x18 Weighting
scavAmmo.Caliber9x18PM = {
"573719762459775a626ccbc1": 20,
"57371e4124597760ff7b25f1": 30,
"5737207f24597760ff7b25f2": 50,
"573718ba2459775a75491131": 30,
"573719df2459775a626ccbc2": 80,
"57371aab2459775a77142f22": 60,
"57372140245977611f70ee91": 70
}
// // 9x18 Weighting
// scavAmmo.Caliber9x18PM = {
// "573719762459775a626ccbc1": 20,
// "57371e4124597760ff7b25f1": 30,
// "5737207f24597760ff7b25f2": 50,
// "573718ba2459775a75491131": 30,
// "573719df2459775a626ccbc2": 80,
// "57371aab2459775a77142f22": 60,
// "57372140245977611f70ee91": 70
// }
// 9x19 Weighting
scavAmmo.Caliber9x19PARA = {
"5c3df7d588a4501f290594e5": 30,
"56d59d3ad2720bdb418b4577": 30,
"5c925fa22e221601da359b7b": 80,
"5efb0e16aeb21837e749c7ff": 80,
"5efb0da7a29a85116f6ea05f": 80
}
// // 9x19 Weighting
// scavAmmo.Caliber9x19PARA = {
// "5c3df7d588a4501f290594e5": 30,
// "56d59d3ad2720bdb418b4577": 30,
// "5c925fa22e221601da359b7b": 80,
// "5efb0e16aeb21837e749c7ff": 80,
// "5efb0da7a29a85116f6ea05f": 80
// }
// 9x39 Weighting
scavAmmo.Caliber9x39 = {
"57a0dfb82459774d3078b56c": 60,
"57a0e5022459774d1673f889": 80,
"5c0d688c86f77413ae3407b2": 80,
"5c0d668f86f7747ccb7f13b2": 40
}
// // 9x39 Weighting
// scavAmmo.Caliber9x39 = {
// "57a0dfb82459774d3078b56c": 60,
// "57a0e5022459774d1673f889": 80,
// "5c0d688c86f77413ae3407b2": 80,
// "5c0d668f86f7747ccb7f13b2": 40
// }
// 1143x23 ACP Weighting
scavAmmo.Caliber1143x23ACP = {
"5e81f423763d9f754677bf2e": 60,
"5efb0d4f4bc50b58e81710f3": 60,
"5efb0cabfb3e451d70735af5": 100,
"5efb0fc6aeb21837e749c801": 100
}
// // 1143x23 ACP Weighting
// scavAmmo.Caliber1143x23ACP = {
// "5e81f423763d9f754677bf2e": 60,
// "5efb0d4f4bc50b58e81710f3": 60,
// "5efb0cabfb3e451d70735af5": 100,
// "5efb0fc6aeb21837e749c801": 100
// }
// 12 Gauge Weighting
scavAmmo.Caliber12g = {
"560d5e524bdc2d25448b4571": 60,
"5d6e6772a4b936088465b17c": 60,
"5d6e67fba4b9361bc73bc779": 60,
"58820d1224597753c90aeb13": 60,
"5d6e6869a4b9361c140bcfde": 100,
"5d6e6891a4b9361bd473feea": 100,
"5d6e6806a4b936088465b17e": 100,
"5d6e689ca4b9361bc8618956": 100,
"5d6e68e6a4b9361c140bcfe0": 100,
"5d6e68b3a4b9361bca7e50b5": 100,
"5d6e68dea4b9361bcc29e659": 100,
"5d6e68a8a4b9360b6c0d54e2": 100,
"5d6e6911a4b9361bd5780d52": 100,
"5d6e68c4a4b9361b93413f79": 100,
"5c0d591486f7744c505b416f": 100
}
// // 12 Gauge Weighting
// scavAmmo.Caliber12g = {
// "560d5e524bdc2d25448b4571": 60,
// "5d6e6772a4b936088465b17c": 60,
// "5d6e67fba4b9361bc73bc779": 60,
// "58820d1224597753c90aeb13": 60,
// "5d6e6869a4b9361c140bcfde": 100,
// "5d6e6891a4b9361bd473feea": 100,
// "5d6e6806a4b936088465b17e": 100,
// "5d6e689ca4b9361bc8618956": 100,
// "5d6e68e6a4b9361c140bcfe0": 100,
// "5d6e68b3a4b9361bca7e50b5": 100,
// "5d6e68dea4b9361bcc29e659": 100,
// "5d6e68a8a4b9360b6c0d54e2": 100,
// "5d6e6911a4b9361bd5780d52": 100,
// "5d6e68c4a4b9361b93413f79": 100,
// "5c0d591486f7744c505b416f": 100
// }
// 20 Gauge Weighting
scavAmmo.Caliber20g = {
"5a38ebd9c4a282000d722a5b": 60,
"5d6e695fa4b936359b35d852": 60,
"5d6e6a42a4b9364f07165f52": 100,
"5d6e6a53a4b9361bd473feec": 100,
"5d6e69b9a4b9361bc8618958": 60,
"5d6e69c7a4b9360b6c0d54e4": 60,
"5d6e6a05a4b93618084f58d0": 100,
"5d6e6a5fa4b93614ec501745": 100
}
// // 20 Gauge Weighting
// scavAmmo.Caliber20g = {
// "5a38ebd9c4a282000d722a5b": 60,
// "5d6e695fa4b936359b35d852": 60,
// "5d6e6a42a4b9364f07165f52": 100,
// "5d6e6a53a4b9361bd473feec": 100,
// "5d6e69b9a4b9361bc8618958": 60,
// "5d6e69c7a4b9360b6c0d54e4": 60,
// "5d6e6a05a4b93618084f58d0": 100,
// "5d6e6a5fa4b93614ec501745": 100
// }
this.botConfig.equipment.assault = progressionWhitelistScav1;
this.botConfig.equipment.assault.whitelist.push(progressionWhitelistScav2);
}
}
// this.botConfig.equipment.assault = progressionWhitelistScav1;
// this.botConfig.equipment.assault.whitelist.push(progressionWhitelistScav2);
// }
// }

View File

@ -65,5 +65,10 @@ export declare class DataCallbacks {
* Handle client/hideout/qte/list
*/
getQteList(url: string, info: IEmptyRequestData, sessionID: string): string;
/**
* Handle client/items/prices/
* Called when viewing a traders assorts
* TODO - fully implement this
*/
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetItemPricesResponse>;
}

View File

@ -21,7 +21,7 @@ import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
import { HashUtil } from "../utils/HashUtil";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil";
export declare class DialogueCallbacks extends OnUpdate {
export declare class DialogueCallbacks implements OnUpdate {
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected httpResponse: HttpResponseUtil;

View File

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

View File

@ -2,7 +2,7 @@ import { HideoutController } from "../controllers/HideoutController";
import { OnUpdate } from "../di/OnUpdate";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
@ -16,7 +16,7 @@ import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootin
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
import { ConfigServer } from "../servers/ConfigServer";
export declare class HideoutCallbacks extends OnUpdate {
export declare class HideoutCallbacks implements OnUpdate {
protected hideoutController: HideoutController;
protected configServer: ConfigServer;
protected hideoutConfig: IHideoutConfig;
@ -24,34 +24,18 @@ export declare class HideoutCallbacks extends OnUpdate {
configServer: ConfigServer);
/**
* Handle HideoutUpgrade
* @param pmcData
* @param body
* @param sessionID
* @returns
*/
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutUpgradeComplete
* @param pmcData
* @param body
* @param sessionID
* @returns
*/
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutPutItemsInAreaSlots
* @param pmcData
* @param body
* @param sessionID
* @returns
*/
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeItemsFromAreaSlots
* @param pmcData
* @param body
* @param sessionID
* @returns
*/
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/**
@ -69,7 +53,7 @@ export declare class HideoutCallbacks extends OnUpdate {
/**
* Handle HideoutContinuousProductionStart
*/
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutTakeProduction
*/

View File

@ -1,6 +1,6 @@
import { OnLoad } from "../di/OnLoad";
import { HttpServer } from "../servers/HttpServer";
export declare class HttpCallbacks extends OnLoad {
export declare class HttpCallbacks implements OnLoad {
protected httpServer: HttpServer;
constructor(httpServer: HttpServer);
onLoad(): Promise<void>;

View File

@ -10,7 +10,7 @@ import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { InsuranceService } from "../services/InsuranceService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class InsuranceCallbacks extends OnUpdate {
export declare class InsuranceCallbacks implements OnUpdate {
protected insuranceController: InsuranceController;
protected insuranceService: InsuranceService;
protected httpResponse: HttpResponseUtil;

View File

@ -6,7 +6,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { LocalisationService } from "../services/LocalisationService";
import { HttpFileUtil } from "../utils/HttpFileUtil";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
declare class ModCallbacks extends OnLoad {
declare class ModCallbacks implements OnLoad {
protected logger: ILogger;
protected httpResponse: HttpResponseUtil;
protected httpFileUtil: HttpFileUtil;
@ -17,8 +17,5 @@ declare class ModCallbacks extends OnLoad {
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
onLoad(): Promise<void>;
getRoute(): string;
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;
}
export { ModCallbacks };

View File

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

View File

@ -1,5 +1,6 @@
import { OnLoad } from "../di/OnLoad";
import { OnUpdate } from "../di/OnUpdate";
import { RagfairController } from "../controllers/RagfairController";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
@ -21,7 +22,7 @@ import { JsonUtil } from "../utils/JsonUtil";
/**
* Handle ragfair related callback events
*/
export declare class RagfairCallbacks extends OnLoadOnUpdate {
export declare class RagfairCallbacks implements OnLoad, OnUpdate {
protected httpResponse: HttpResponseUtil;
protected jsonUtil: JsonUtil;
protected ragfairServer: RagfairServer;

View File

@ -1,6 +1,7 @@
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { OnLoad } from "../di/OnLoad";
import { OnUpdate } from "../di/OnUpdate";
import { SaveServer } from "../servers/SaveServer";
export declare class SaveCallbacks extends OnLoadOnUpdate {
export declare class SaveCallbacks implements OnLoad, OnUpdate {
protected saveServer: SaveServer;
constructor(saveServer: SaveServer);
onLoad(): Promise<void>;

View File

@ -6,6 +6,9 @@ import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRag
export declare class TradeCallbacks {
protected tradeController: TradeController;
constructor(tradeController: TradeController);
/**
* Handle client/game/profile/items/moving TradingConfirm
*/
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -1,10 +1,11 @@
import { OnLoad } from "../di/OnLoad";
import { OnUpdate } from "../di/OnUpdate";
import { TraderController } from "../controllers/TraderController";
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
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 { HttpResponseUtil } from "../utils/HttpResponseUtil";
export declare class TraderCallbacks extends OnLoadOnUpdate {
export declare class TraderCallbacks implements OnLoad, OnUpdate {
protected httpResponse: HttpResponseUtil;
protected traderController: TraderController;
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);

View File

@ -3,7 +3,6 @@ import { BotGenerator } from "../generators/BotGenerator";
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
import { BotHelper } from "../helpers/BotHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
import { IBotBase } from "../models/eft/common/tables/IBotBase";
import { IBotCore } from "../models/eft/common/tables/IBotCore";
@ -23,14 +22,13 @@ export declare class BotController {
protected botDifficultyHelper: BotDifficultyHelper;
protected botGenerationCacheService: BotGenerationCacheService;
protected localisationService: LocalisationService;
protected weightedRandomHelper: WeightedRandomHelper;
protected profileHelper: ProfileHelper;
protected configServer: ConfigServer;
protected applicationContext: ApplicationContext;
protected jsonUtil: JsonUtil;
protected botConfig: IBotConfig;
static readonly pmcTypeLabel = "PMC";
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
/**
* Return the number of bot loadout varieties to be generated
* @param type bot Type we want the loadout gen count for

View File

@ -11,10 +11,13 @@ import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { LocalisationService } from "../services/LocalisationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { TimeUtil } from "../utils/TimeUtil";
@ -28,13 +31,30 @@ export declare class GameController {
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
protected localisationService: LocalisationService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected seasonalEventService: SeasonalEventService;
protected applicationContext: ApplicationContext;
protected configServer: ConfigServer;
protected httpConfig: IHttpConfig;
protected coreConfig: ICoreConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
protected locationConfig: ILocationConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
/**
* When player logs in, iterate over all active effects and reduce timer
* TODO - add body part HP regen
* @param pmcProfile
*/
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
/**
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
*/
protected fixBrokenOfflineMapWaves(): void;
/**
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
*/
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
/**
* Get a list of installed mods and save their details to the profile being used
* @param fullProfile Profile to add mod details to

View File

@ -2,25 +2,27 @@ import { HealthHelper } from "../helpers/HealthHelper";
import { InventoryHelper } from "../helpers/InventoryHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { LocalisationService } from "../services/LocalisationService";
import { PaymentService } from "../services/PaymentService";
import { JsonUtil } from "../utils/JsonUtil";
export declare class HealthController {
protected logger: ILogger;
protected jsonUtil: JsonUtil;
protected eventOutputHolder: EventOutputHolder;
protected itemHelper: ItemHelper;
protected paymentService: PaymentService;
protected inventoryHelper: InventoryHelper;
protected localisationService: LocalisationService;
protected healthHelper: HealthHelper;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
/**
* stores in-raid player health
* @param pmcData Player profile
@ -37,6 +39,13 @@ export declare class HealthController {
* @returns
*/
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Consume food/water outside of a raid
* @param pmcData Player profile
* @param body request Object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Occurs on post-raid healing page
@ -54,10 +63,11 @@ export declare class HealthController {
*/
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
/**
* iterate over treatment request diff and find effects to remove from player limbs
* Iterate over treatment request diff and find effects to remove from player limbs
* @param sessionId
* @param profile Profile to update
* @param treatmentRequest client request
* @param output response to send to client
*/
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void;
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData, output: IItemEventRouterResponse): void;
}

View File

@ -8,7 +8,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
@ -27,6 +27,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer";
import { FenceService } from "../services/FenceService";
import { LocalisationService } from "../services/LocalisationService";
import { PlayerService } from "../services/PlayerService";
import { HashUtil } from "../utils/HashUtil";
@ -53,12 +54,28 @@ export declare class HideoutController {
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected jsonUtil: JsonUtil;
protected fenceService: FenceService;
protected static nameBackendCountersCrafting: string;
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil);
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
/**
* Start a hideout area upgrade
* @param pmcData Player profile
* @param request upgrade start request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Complete a hideout area upgrade
* @param pmcData Player profile
* @param request Completed upgrade request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handle HideoutPutItemsInAreaSlots
* Create item in hideout slot item array, remove item from player inventory
* @param pmcData Profile data
* @param addItemToHideoutRequest reqeust from client to place item in area slot
@ -66,7 +83,14 @@ export declare class HideoutController {
* @returns IItemEventRouterResponse object
*/
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Remove item from hideout area and place into player inventory
* @param pmcData Player profile
* @param request Take item out of area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
takeItemsFromAreaSlots(pmcData: IPmcData, request: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
* @param sessionID Session id
@ -77,7 +101,21 @@ export declare class HideoutController {
* @returns IItemEventRouterResponse response
*/
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Toggle area on/off
* @param pmcData Player profile
* @param request Toggle area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Start production for an item from hideout area
* @param pmcData Player profile
* @param body Start prodution of single item request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handles event after clicking 'start' on the scav case hideout page
@ -87,25 +125,64 @@ export declare class HideoutController {
* @returns item event router response
*/
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Adjust scav case time based on fence standing
*
* @param pmcData Player profile
* @param productionTime Time to complete scav case in seconds
* @returns Adjusted scav case time in seconds
*/
protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number;
/**
* Add generated scav case rewards to player profile
* @param pmcData player profile to add rewards to
* @param rewards reward items to add to profile
* @param recipieId recipie id to save into Production dict
*/
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
/**
* Start production of continuously created item
* @param pmcData Player profile
* @param request Continious production request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Take completed item out of hideout area and place into player inventory
* @param pmcData Player profile
* @param request Remove production from area request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Take recipie-type production out of hideout area and place into player inventory
* @param sessionID Session id
* @param recipe Completed recipie of item
* @param pmcData Player profile
* @param request Remove production from area request
* @param output Output object to update
* @returns IItemEventRouterResponse
*/
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/**
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
* @param sessionID
* @param pmcData
* @param body
* @param output
* @returns
* @param sessionID Session id
* @param pmcData Player profile
* @param request Get rewards from scavcase craft request
* @param output Output object to update
* @returns IItemEventRouterResponse
*/
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
/**
* Start area production for item
* @param pmcData Player profile
* @param request Start production request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Get quick time event list for hideout
* // TODO - implement this
@ -136,5 +213,8 @@ export declare class HideoutController {
* @param request improve area request data
*/
improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse;
/**
* Function called every x seconds as part of onUpdate event
*/
update(): void;
}

View File

@ -31,13 +31,23 @@ export declare class InsuranceController {
protected configServer: ConfigServer;
protected insuranceConfig: IInsuranceConfig;
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
/**
* Process insurance items prior to being given to player in mail
*/
processReturn(): void;
/**
* Add insurance to an item
* @param pmcData Player profile
* @param body Insurance request
* @param sessionID Session id
* @returns IItemEventRouterResponse object to send to client
*/
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Calculate insurance cost
* @param info request object
* @param sessionID session id
* @returns response object to send to client
* @returns IGetInsuranceCostResponseData object to send to client
*/
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
}

View File

@ -129,9 +129,14 @@ export declare class InventoryController {
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Handles sorting of Inventory.
* Handle ApplyInventoryChanges
* Sorts supplied items.
* @param pmcData Player profile
* @param request sort request
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -17,9 +17,7 @@ import { ConfigServer } from "../servers/ConfigServer";
import { SaveServer } from "../servers/SaveServer";
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
import { BotLootCacheService } from "../services/BotLootCacheService";
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
import { MatchLocationService } from "../services/MatchLocationService";
import { OpenZoneService } from "../services/OpenZoneService";
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
export declare class MatchController {
protected logger: ILogger;
@ -30,14 +28,12 @@ export declare class MatchController {
protected botLootCacheService: BotLootCacheService;
protected configServer: ConfigServer;
protected profileSnapshotService: ProfileSnapshotService;
protected customLocationWaveService: CustomLocationWaveService;
protected openZoneService: OpenZoneService;
protected botGenerationCacheService: BotGenerationCacheService;
protected applicationContext: ApplicationContext;
protected matchConfig: IMatchConfig;
protected inraidConfig: IInRaidConfig;
protected botConfig: IBotConfig;
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[];
createGroup(sessionID: string, info: ICreateGroupRequestData): any;

View File

@ -102,6 +102,13 @@ export declare class QuestController {
* @param questRewards Rewards given to player
*/
protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
/**
* Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile
* @param pmcData Player profile to update
* @param quests Quests to look for wait conditions in
* @param completedQuestId Quest just completed
*/
protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void;
/**
* Returns a list of quests that should be failed when a quest is completed
* @param completedQuestId quest completed id

View File

@ -103,6 +103,11 @@ export declare class RagfairController {
* @param profile full profile of player
*/
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
/**
* Adjust ragfair offer stack count to match same value as traders assort stack count
* @param offer Flea offer to adjust
*/
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
protected isLinkedSearch(info: ISearchRequestData): boolean;
protected isRequiredSearch(info: ISearchRequestData): boolean;
update(): void;

View File

@ -1,3 +1,4 @@
import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { PresetHelper } from "../helpers/PresetHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
@ -65,6 +66,7 @@ export declare class RepeatableQuestController {
protected presetHelper: PresetHelper;
protected profileHelper: ProfileHelper;
protected profileFixerService: ProfileFixerService;
protected handbookHelper: HandbookHelper;
protected ragfairServerHelper: RagfairServerHelper;
protected eventOutputHolder: EventOutputHolder;
protected localisationService: LocalisationService;
@ -73,7 +75,7 @@ export declare class RepeatableQuestController {
protected itemFilterService: ItemFilterService;
protected configServer: ConfigServer;
protected questConfig: IQuestConfig;
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
/**
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
* Returns an array of objects in the format of repeatable quests to the client.
@ -115,17 +117,18 @@ export declare class RepeatableQuestController {
/**
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
*/
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
generateDebugDailies(dailiesPool: any, factory: any, number: number): any;
/**
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
* The templates include Elimination, Completion and Extraction quest types
*
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
* @param {string} traderId trader from which the quest will be provided
* @param {string} side scav daily or pmc daily/weekly quest
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
* (needs to be filled with reward and conditions by called to make a valid quest)
*/
generateRepeatableTemplate(type: string, traderId: string): IRepeatableQuest;
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
/**
* Generates a valid Exploration quest
*
@ -236,16 +239,17 @@ export declare class RepeatableQuestController {
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
/**
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
* @param repeatableQuestConfig config file
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
*/
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
/**
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
* @param {*} tpl template id of item to check
* @param {string} tpl template id of item to check
* @returns boolean: true if item is valid reward
*/
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;

View File

@ -1,22 +1,30 @@
import { RagfairServer } from "../servers/RagfairServer";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { TradeHelper } from "../helpers/TradeHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { Upd } from "../models/eft/common/tables/IItem";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { ConfigServer } from "../servers/ConfigServer";
import { RagfairServer } from "../servers/RagfairServer";
import { LocalisationService } from "../services/LocalisationService";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
declare class TradeController {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
protected tradeHelper: TradeHelper;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected ragfairServer: RagfairServer;
protected httpResponse: HttpResponseUtil;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil);
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
}

View File

@ -42,6 +42,13 @@ export declare class TraderController {
* @returns array if ITraderBase objects
*/
getAllTraders(sessionID: string): ITraderBase[];
/**
* Order traders by their traderId (Ttid)
* @param traderA First trader to compare
* @param traderB Second trader to compare
* @returns 1,-1 or 0
*/
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
getTrader(sessionID: string, traderID: string): ITraderBase;
getAssort(sessionId: string, traderId: string): ITraderAssort;
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;

View File

@ -1,7 +1,7 @@
import { EventOutputHolder } from "../routers/EventOutputHolder";
import { IPmcData } from "../models/eft/common/IPmcData";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
export declare class WishlistController {
protected eventOutputHolder: EventOutputHolder;
constructor(eventOutputHolder: EventOutputHolder);

View File

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

View File

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

View File

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

View File

@ -145,7 +145,7 @@ export declare class BotEquipmentModGenerator {
* @param modToAdd template of mod to check
* @param itemSlot slot the item will be placed in
* @param modSlot slot the mod will fill
* @param parentTemplate tempalte of the mods parent item
* @param parentTemplate template of the mods parent item
* @returns true if valid
*/
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;

View File

@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
import { BotHelper } from "../helpers/BotHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
import { Health as PmcHealth, IBotBase, Info, Skills } from "../models/eft/common/tables/IBotBase";
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
import { IBotConfig } from "../models/spt/config/IBotConfig";
@ -14,12 +14,14 @@ import { SeasonalEventService } from "../services/SeasonalEventService";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { BotInventoryGenerator } from "./BotInventoryGenerator";
import { BotLevelGenerator } from "./BotLevelGenerator";
export declare class BotGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected timeUtil: TimeUtil;
protected jsonUtil: JsonUtil;
protected profileHelper: ProfileHelper;
protected databaseServer: DatabaseServer;
@ -32,7 +34,7 @@ export declare class BotGenerator {
protected seasonalEventService: SeasonalEventService;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
/**
* Generate a player scav bot object
* @param role e.g. assault / pmcbot
@ -90,6 +92,13 @@ export declare class BotGenerator {
*/
protected generateId(bot: IBotBase): IBotBase;
protected generateInventoryID(profile: IBotBase): IBotBase;
/**
* Randomise a bots game version and account category
* Chooses from all the game versions (standard, eod etc)
* Chooses account type (default, Sherpa, etc)
* @param botInfo bot info object to update
*/
protected getRandomisedGameVersionAndCategory(botInfo: Info): void;
/**
* Add a side-specific (usec/bear) dogtag item to a bots inventory
* @param bot bot to add dogtag to

View File

@ -1,6 +1,7 @@
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
import { HandbookHelper } from "../helpers/HandbookHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
import { Item } from "../models/eft/common/tables/IItem";
@ -18,6 +19,7 @@ export declare class BotLootGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected handbookHelper: HandbookHelper;
protected botGeneratorHelper: BotGeneratorHelper;
@ -27,7 +29,7 @@ export declare class BotLootGenerator {
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
/**
* Add loot to bots containers
* @param sessionId Session id

View File

@ -102,6 +102,13 @@ export declare class BotWeaponGenerator {
* @param botRole The bot type we're getting generating extra mags for
*/
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
/**
* Add Grendaes for UBGL to bots vest and secure container
* @param weaponMods Weapon array with mods
* @param generatedWeaponResult result of weapon generation
* @param inventory bot inventory to add grenades to
*/
protected addUbglGrenadesToBotInventory(weaponMods: Item[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void;
/**
* Add ammo to the secure container
* @param stackCount How many stacks of ammo to add
@ -138,6 +145,13 @@ export declare class BotWeaponGenerator {
* @param ammoTpl
*/
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
/**
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
* @param weaponMods
* @param ubglMod
* @param ubglAmmoTpl
*/
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
/**
* Add cartridge item to weapon Item array, if it already exists, update
* @param weaponMods Weapon items array to amend

View File

@ -49,7 +49,8 @@ export declare class LocationGenerator {
* Add forced spawn point loot into loot parameter array
* @param loot array to add forced loot to
* @param forcedSpawnPoints forced loot to add
* @param name of map currently generating forced loot for
*/
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[]): void;
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void;
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
}

View File

@ -1,8 +1,10 @@
import { ItemHelper } from "../helpers/ItemHelper";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { ItemFilterService } from "../services/ItemFilterService";
import { SeasonalEventService } from "../services/SeasonalEventService";
/**
* Handle the generation of dynamic PMC loot in pockets and backpacks
* and the removal of blacklisted items
@ -12,10 +14,32 @@ export declare class PMCLootGenerator {
protected databaseServer: DatabaseServer;
protected configServer: ConfigServer;
protected itemFilterService: ItemFilterService;
protected seasonalEventService: SeasonalEventService;
protected pocketLootPool: string[];
protected vestLootPool: string[];
protected backpackLootPool: string[];
protected botConfig: IBotConfig;
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService);
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
/**
* Create an array of loot items a PMC can have in their pockets
* @returns string array of tpls
*/
generatePMCPocketLootPool(): string[];
/**
* Create an array of loot items a PMC can have in their vests
* @returns string array of tpls
*/
generatePMCVestLootPool(): string[];
/**
* Check if item has a width/hide that lets it fit into a 1x2 slot
* 1x1 / 1x2 / 2x1
* @param item Item to check size of
* @returns true if it fits
*/
protected itemFitsInto1By2Slot(item: ITemplateItem): boolean;
/**
* Create an array of loot items a PMC can have in their backpack
* @returns string array of tpls
*/
generatePMCBackpackLootPool(): string[];
}

View File

@ -1,4 +1,7 @@
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
import { BotHelper } from "../helpers/BotHelper";
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData";
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
@ -11,11 +14,18 @@ import { SaveServer } from "../servers/SaveServer";
import { BotLootCacheService } from "../services/BotLootCacheService";
import { FenceService } from "../services/FenceService";
import { LocalisationService } from "../services/LocalisationService";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { BotGenerator } from "./BotGenerator";
export declare class PlayerScavGenerator {
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
protected botGeneratorHelper: BotGeneratorHelper;
protected saveServer: SaveServer;
protected profileHelper: ProfileHelper;
protected botHelper: BotHelper;
@ -26,7 +36,7 @@ export declare class PlayerScavGenerator {
protected botGenerator: BotGenerator;
protected configServer: ConfigServer;
protected playerScavConfig: IPlayerScavConfig;
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
/**
* Update a player profile to include a new player scav profile
* @param sessionID session id to specify what profile is updated

View File

@ -4,6 +4,7 @@ import { Item } from "../models/eft/common/tables/IItem";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
import { ConfigServer } from "../servers/ConfigServer";
import { DatabaseServer } from "../servers/DatabaseServer";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil";
export declare class RagfairAssortGenerator {
@ -11,10 +12,11 @@ export declare class RagfairAssortGenerator {
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected databaseServer: DatabaseServer;
protected seasonalEventService: SeasonalEventService;
protected configServer: ConfigServer;
protected generatedAssortItems: Item[];
protected ragfairConfig: IRagfairConfig;
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
/**
* Get an array of unique items that can be sold on the flea
* @returns array of unique items

View File

@ -103,7 +103,34 @@ export declare class RagfairOfferGenerator {
* @param traderID Trader to generate offers for
*/
generateFleaOffersForTrader(traderID: string): void;
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
/**
* Get array of an item with its mods + condition properties (e.g durability)
* Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
* @param userID id of owner of item
* @param itemWithMods Item and mods, get condition of first item (only first array item is used)
* @param itemDetails db details of first item
* @returns
*/
protected getItemCondition(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
/**
* Get the relevant condition id if item tpl matches in ragfair.json/condition
* @param tpl Item to look for matching condition object
* @returns condition id
*/
protected getDynamicConditionIdForTpl(tpl: string): string;
/**
* Alter an items condition based on its item base type
* @param conditionSettingsId also the parentId of item being altered
* @param item Item to adjust condition details of
* @param itemDetails db item details of first item in array
*/
protected randomiseItemCondition(conditionSettingsId: string, item: Item, itemDetails: ITemplateItem): void;
/**
* Adjust an items durability/maxDurability value
* @param item item (weapon/armor) to adjust
* @param multiplier Value to multiple durability by
*/
protected randomiseDurabilityValues(item: Item, multiplier: number): void;
/**
* Add missing conditions to an item if needed
* Durabiltiy for repairable items
@ -111,7 +138,7 @@ export declare class RagfairOfferGenerator {
* @param item item to add conditions to
* @returns Item with conditions added
*/
protected addMissingCondition(item: Item): Item;
protected addMissingConditions(item: Item): Item;
/**
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
* @param offerItems Items for sale in offer

View File

@ -2,7 +2,6 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { Product } from "../models/eft/common/tables/IBotBase";
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
import { ILogger } from "../models/spt/utils/ILogger";
@ -28,10 +27,10 @@ export declare class ScavCaseRewardGenerator {
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
/**
* Create an array of rewards that will be given to the player upon completing their scav case build
* @param body client request
* @param recipeId recipe of the scav case craft
* @returns Product array
*/
generate(body: IHideoutScavCaseStartRequestData): Product[];
generate(recipeId: string): Product[];
/**
* Get all db items that are not blacklisted in scavcase config
* @returns filtered array of db items

View File

@ -0,0 +1,10 @@
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
import { IInventoryMagGen } from "../IInventoryMagGen";
import { InventoryMagGen } from "../InventoryMagGen";
export declare class UbglExternalMagGen implements IInventoryMagGen {
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
getPriority(): number;
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
process(inventoryMagGen: InventoryMagGen): void;
}

View File

@ -1,5 +1,6 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
import { QuestStatus } from "../models/enums/QuestStatus";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { LocalisationService } from "../services/LocalisationService";
@ -15,17 +16,28 @@ export declare class AssortHelper {
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile
* @param traderId traders id
* @param assort assort items from a trader
* @param traderId traders id the assort belongs to
* @param traderAssorts All assort items from same trader
* @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders
* @returns assort items minus locked quest assorts
*/
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, flea?: boolean): ITraderAssort;
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
/**
* Get a quest id + the statuses quest can be in to unlock assort
* @param mergedQuestAssorts quest assorts to search for assort id
* @param assortId Assort to look for linked quest id
* @returns quest id + array of quest status the assort should show for
*/
protected getQuestIdAndStatusThatShowAssort(mergedQuestAssorts: Record<string, Record<string, string>>, assortId: string): {
questId: string;
status: QuestStatus[];
};
/**
* Remove assorts from a trader that have not been unlocked yet
* @param pmcProfile player profile
* @param traderId traders id
* @param assort traders assorts
* @returns traders assorts minus locked loyality assorts
* @returns traders assorts minus locked loyalty assorts
*/
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
/**

View File

@ -20,7 +20,7 @@ export declare class BotDifficultyHelper {
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
/**
* Get difficulty settings for desired bot type, if not found use assault bot types
* @param type bot type to retreive difficulty of
* @param type bot type to retrieve difficulty of
* @param difficulty difficulty to get settings for (easy/normal etc)
* @returns Difficulty object
*/

View File

@ -23,7 +23,7 @@ export declare class BotGeneratorHelper {
* Adds properties to an item
* e.g. Repairable / HasHinge / Foldable / MaxDurability
* @param itemTemplate Item extra properties are being generated for
* @param botRole Used by weapons to randomise the durability values. Null for non-equipped items
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
* @returns Item Upd object with extra properties
*/
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
@ -53,10 +53,10 @@ export declare class BotGeneratorHelper {
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
/**
* Can item be added to another item without conflict
* @param items Items to check compatiblilities with
* @param items Items to check compatibilities with
* @param tplToCheck Tpl of the item to check for incompatibilities
* @param equipmentSlot Slot the item will be placed into
* @returns false if no incompatibilties, also has incompatibility reason
* @returns false if no incompatibilities, also has incompatibility reason
*/
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
incompatible: boolean;

View File

@ -23,11 +23,11 @@ export declare class BotHelper {
*/
getBotTemplate(role: string): IBotType;
/**
* Randomise the chance the PMC will attack their own side
* Randomize the chance the PMC will attack their own side
* Look up value in bot.json/chanceSameSideIsHostilePercent
* @param difficultySettings pmc difficulty settings
*/
randomisePmcHostility(difficultySettings: Difficulty): void;
randomizePmcHostility(difficultySettings: Difficulty): void;
/**
* Is the passed in bot role a PMC (usec/bear/pmc)
* @param botRole bot role to check
@ -63,26 +63,26 @@ export declare class BotHelper {
rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean;
botRoleIsPmc(botRole: string): boolean;
/**
* Get randomisation settings for bot from config/bot.json
* Get randomization settings for bot from config/bot.json
* @param botLevel level of bot
* @param botEquipConfig bot equipment json
* @returns RandomisationDetails
*/
getBotRandomisationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
/**
* Choose between sptBear and sptUsec at random based on the % defined in botConfig.pmc.isUsec
* @returns pmc role
*/
getRandomisedPmcRole(): string;
getRandomizedPmcRole(): string;
/**
* Get the corrisponding side when sptBear or sptUsec is passed in
* Get the corresponding side when sptBear or sptUsec is passed in
* @param botRole role to get side for
* @returns side (usec/bear)
*/
getPmcSideByRole(botRole: string): string;
/**
* Get a randomised PMC side based on bot config value 'isUsec'
* Get a randomized PMC side based on bot config value 'isUsec'
* @returns pmc side as string
*/
protected getRandomisedPmcSide(): string;
protected getRandomizedPmcSide(): string;
}

View File

@ -2,6 +2,7 @@ import { MinMax } from "../models/common/MinMax";
import { Inventory } from "../models/eft/common/tables/IBotBase";
import { Item } from "../models/eft/common/tables/IItem";
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
import { ILogger } from "../models/spt/utils/ILogger";
import { DatabaseServer } from "../servers/DatabaseServer";
import { LocalisationService } from "../services/LocalisationService";
@ -21,18 +22,18 @@ export declare class BotWeaponGeneratorHelper {
protected containerHelper: ContainerHelper;
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
/**
* Get a randomised number of bullets for a specific magazine
* Get a randomized number of bullets for a specific magazine
* @param magCounts min and max count of magazines
* @param magTemplate magazine to generate bullet count for
* @returns bullet count number
*/
getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
getRandomizedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
/**
* Get a randomised count of magazines
* Get a randomized count of magazines
* @param magCounts min and max value returned value can be between
* @returns numberical value of magazine count
* @returns numerical value of magazine count
*/
getRandomisedMagazineCount(magCounts: MinMax): number;
getRandomizedMagazineCount(magCounts: MinMax): number;
/**
* Is this magazine cylinder related (revolvers and grenade launchers)
* @param magazineParentName the name of the magazines parent
@ -48,12 +49,13 @@ export declare class BotWeaponGeneratorHelper {
*/
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
/**
* Add a specific number of cartrdiges to a bots inventory (vest/pocket)
* Add a specific number of cartridges to a bots inventory (defaults to vest and pockets)
* @param ammoTpl Ammo tpl to add to vest/pockets
* @param cartridgeCount number of cartridges to add to vest/pockets
* @param inventory bot inventory to add cartridges to
* @param equipmentSlotsToAddTo what equipment slots should bullets be added into
*/
addBulletsToVestAndPockets(ammoTpl: string, cartridgeCount: number, inventory: Inventory): void;
addAmmoIntoEquipmentSlots(ammoTpl: string, cartridgeCount: number, inventory: Inventory, equipmentSlotsToAddTo?: EquipmentSlots[]): void;
/**
* Get a weapons default magazine template id
* @param weaponTemplate weapon to get default magazine for
@ -61,7 +63,8 @@ export declare class BotWeaponGeneratorHelper {
*/
getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
/**
* Adds an item with all its childern into specified equipmentSlots, wherever it fits.
* TODO - move into BotGeneratorHelper, this is not the class for it
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
* @param equipmentSlots
* @param parentId
* @param parentTpl

View File

@ -9,10 +9,10 @@ export declare class DurabilityLimitsHelper {
protected configServer: ConfigServer;
protected botConfig: IBotConfig;
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
protected generateMaxWeaponDurability(botRole: string): number;
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
protected getLowestMaxWeaponFromConfig(botRole: string): number;
@ -23,4 +23,6 @@ export declare class DurabilityLimitsHelper {
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
protected getMinArmorDeltaFromConfig(botRole: string): number;
protected getMaxArmorDeltaFromConfig(botRole: string): number;
protected getMinArmorLimitPercentFromConfig(botRole: string): number;
protected getMinWeaponLimitPercentFromConfig(botRole: string): number;
}

View File

@ -1,7 +1,6 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { Effect } from "../models/eft/health/Effect";
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { Effects, IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
import { ILogger } from "../models/spt/utils/ILogger";
import { ConfigServer } from "../servers/ConfigServer";
@ -17,7 +16,7 @@ export declare class HealthHelper {
protected healthConfig: IHealthConfig;
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
/**
* Resets the profiles vitality/healh and vitality/effects properties to their defaults
* Resets the profiles vitality/health and vitality/effects properties to their defaults
* @param sessionID Session Id
* @returns updated profile
*/
@ -25,22 +24,27 @@ export declare class HealthHelper {
/**
* Update player profile with changes from request object
* @param pmcData Player profile
* @param info Request object
* @param request Heal request
* @param sessionID Session id
* @param addEffects Should effects be added or removed (default - add)
*/
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
/**
* Adjust hydration/energy/temperate and body part hp values in player profile to values in profile.vitality
* @param pmcData Profile to update
* @param sessionId Session id
*/
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
/**
* Save effects to profile
* Works by removing all effects and adding them back from profile
* Removes empty 'Effects' objects if found
* @param pmcData Player profile
* @param sessionID Session id
* @param sessionId Session id
* @param bodyPartsWithEffects dict of body parts with effects that should be added to profile
* @param addEffects Should effects be added back to profile
* @returns
*/
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean, deleteExistingEffects?: boolean): void;
protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void;
/**
* Add effect to body part in profile
* @param pmcData Player profile
@ -48,6 +52,6 @@ export declare class HealthHelper {
* @param effectType Effect to add to body part
* @param duration How long the effect has left in seconds (-1 by default, no duration).
*/
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: Effect, duration?: number): void;
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
protected isEmpty(map: any): boolean;
}

View File

@ -1,8 +1,9 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { Common, HideoutArea, Production, Productive } from "../models/eft/common/tables/IBotBase";
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "../models/eft/common/tables/IBotBase";
import { Upd } from "../models/eft/common/tables/IItem";
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
@ -15,7 +16,6 @@ import { LocalisationService } from "../services/LocalisationService";
import { PlayerService } from "../services/PlayerService";
import { HashUtil } from "../utils/HashUtil";
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
import { InventoryHelper } from "./InventoryHelper";
import { ProfileHelper } from "./ProfileHelper";
@ -23,7 +23,6 @@ export declare class HideoutHelper {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
protected databaseServer: DatabaseServer;
protected eventOutputHolder: EventOutputHolder;
protected httpResponse: HttpResponseUtil;
@ -36,11 +35,13 @@ export declare class HideoutHelper {
static waterCollector: string;
static bitcoin: string;
static expeditionaryFuelTank: string;
static maxSkillPoint: number;
private static generatorOffMultipler;
protected hideoutConfig: IHideoutConfig;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
/**
* This convinience function intialies new Production Object
* This convenience function initializes new Production Object
* with all the constants.
*/
initProduction(recipeId: string, productionTime: number): Production;
@ -81,6 +82,26 @@ export declare class HideoutHelper {
isGeneratorOn: boolean;
waterCollectorHasFilter: boolean;
}): void;
/**
* Update a productions progress value based on the amount of time that has passed
* @param pmcData Player profile
* @param prodId Production id being crafted
* @param recipe Recipe data being crafted
* @param hideoutProperties
*/
protected updateProductionProgress(pmcData: IPmcData, prodId: string, recipe: IHideoutProduction, hideoutProperties: {
btcFarmCGs?: number;
isGeneratorOn: boolean;
waterCollectorHasFilter?: boolean;
}): void;
/**
* Check if a productions progress value matches its corresponding recipes production time value
* @param pmcData Player profile
* @param prodId Production id
* @param recipe Recipe being crafted
* @returns progress matches productionTime from recipe
*/
protected doesProgressMatchProductionTime(pmcData: IPmcData, prodId: string): boolean;
/**
* Update progress timer for scav case
* @param pmcData Profile to update
@ -105,7 +126,7 @@ export declare class HideoutHelper {
* Adjust water filter objects resourceValue or delete when they reach 0 resource
* @param waterFilterArea water filter area to update
* @param production production object
* @param isGeneratorOn is generatory enabled
* @param isGeneratorOn is generator enabled
* @param pmcData Player profile
* @returns Updated HideoutArea object
*/
@ -113,18 +134,50 @@ export declare class HideoutHelper {
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
/**
* Get a count of how many BTC can be gathered by the profile
* @param pmcData Profile to look up
* @returns coin slot count
*/
protected getBTCSlots(pmcData: IPmcData): number;
protected getManagementSkillsSlots(): number;
protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
/**
* Get the crafting skill details from player profile
* @param pmcData Player profile
* @returns crafting skill, null if not found
*/
protected getCraftingSkill(pmcData: IPmcData): Common;
/**
* Adjust craft time based on crafting skill level found in player profile
* @param pmcData Player profile
* @param productionTime Time to complete hideout craft in seconds
* @returns Adjusted craft time in seconds
*/
protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number;
isProduction(productive: Productive): productive is Production;
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Gather crafted BTC from hideout area and add to inventory
* Reset production start timestamp if hideout area at full coin capacity
* @param pmcData Player profile
* @param request Take production request
* @param sessionId Session id
* @returns IItemEventRouterResponse
*/
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
/**
* Upgrade hideout wall from starting level to interactable level if enough time has passed
* @param pmcProfile Profile to upgrade wall in
*/
unlockHideoutWallInProfile(pmcProfile: IPmcData): void;
/**
* Hideout improvement is flagged as complete
* @param improvement hideout improvement object
* @returns true if complete
*/
protected hideoutImprovementIsComplete(improvement: IHideoutImprovement): boolean;
/**
* Iterate over hideout improvements not completed and check if they need to be adjusted
* @param pmcProfile Profile to adjust

View File

@ -40,7 +40,7 @@ export declare class InRaidHelper {
* Remove Labs keycard
* @param profileData Profile to update
* @param saveProgressRequest post raid save data request data
* @param sessionID Sessino id
* @param sessionID Session id
* @returns Reset profile object
*/
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
@ -66,7 +66,7 @@ export declare class InRaidHelper {
* Adds SpawnedInSession property to items found in a raid
* Removes SpawnedInSession for non-scav players if item was taken into raid with SpawnedInSession = true
* @param preRaidProfile profile to update
* @param postRaidProfile profile to upate inventory contents of
* @param postRaidProfile profile to update inventory contents of
* @param isPlayerScav Was this a p scav raid
* @returns
*/

View File

@ -52,7 +52,7 @@ export declare class InventoryHelper {
* @param sessionID Session id
* @param callback Code to execute later (function)
* @param foundInRaid Will results added to inventory be set as found in raid
* @param addUpd Additional upd propertys for items being added to inventory
* @param addUpd Additional upd properties for items being added to inventory
* @returns IItemEventRouterResponse
*/
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {

View File

@ -30,7 +30,7 @@ declare class ItemHelper {
/**
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
* @param {string} tpl the template id / tpl
* @returns boolean; true for items that may be in player posession and not quest items
* @returns boolean; true for items that may be in player possession and not quest items
*/
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
/**
@ -42,7 +42,7 @@ declare class ItemHelper {
*/
isOfBaseclass(tpl: string, baseClassTpl: string): boolean;
/**
* Check if item has any of the supplied base clases
* Check if item has any of the supplied base classes
* @param tpl Item to check base classes of
* @param baseClassTpls base classes to check for
* @returns true if any supplied base classes match
@ -165,7 +165,7 @@ declare class ItemHelper {
*/
getChildId(item: Item): string;
/**
* Can the pased in item be stacked
* Can the passed in item be stacked
* @param tpl item to check
* @returns true if it can be stacked
*/
@ -192,7 +192,7 @@ declare class ItemHelper {
*/
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
/**
* WARNING, SLOW. Recursivly loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
* @param {string} tpl
* @param {Array} tplsToCheck
* @returns boolean
@ -220,7 +220,15 @@ declare class ItemHelper {
createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item;
/**
*
* @param parentId container cartridges will be placed in
* @param ammoTpl Cartridge to insert
* @param stackCount Count of cartridges inside parent
* @param location Location inside parent (e.g. 0, 1)
* @returns Item
*/
createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number): Item;
/**
* Get the size of a stack, return 1 if no stack object count property found
* @param item Item to get stack size of

View File

@ -6,7 +6,7 @@ export declare class NotificationSendHelper {
protected notificationService: NotificationService;
constructor(webSocketServer: WebSocketServer, notificationService: NotificationService);
/**
* Send notification message to the appropiate channel
* Send notification message to the appropriate channel
*/
sendMessage(sessionID: string, notificationMessage: INotification): void;
}

View File

@ -44,7 +44,7 @@ export declare class ProfileHelper {
/**
* Add experience to a PMC inside the players profile
* @param sessionID Session id
* @param experienceToAdd Experiecne to add to PMC character
* @param experienceToAdd Experience to add to PMC character
*/
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
getProfileByPmcId(pmcId: string): IPmcData;

View File

@ -1,8 +1,9 @@
import { IPmcData } from "../models/eft/common/IPmcData";
import { Quest } from "../models/eft/common/tables/IBotBase";
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
import { IFailQuestRequestData } from "../models/eft/quests/IFailQuestRequestData";
import { QuestStatus } from "../models/enums/QuestStatus";
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
import { ILogger } from "../models/spt/utils/ILogger";
@ -39,10 +40,10 @@ export declare class QuestHelper {
protected questConfig: IQuestConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
/**
* Get status of a quest by quest id
* Get status of a quest in player profile by its id
* @param pmcData Profile to search
* @param questID Quest id to look up
* @returns QuestStauts enum
* @returns QuestStatus enum
*/
getQuestStatus(pmcData: IPmcData, questID: string): QuestStatus;
/**
@ -54,7 +55,7 @@ export declare class QuestHelper {
doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean;
/**
* Get the quests found in both arrays (inner join)
* @param before Array of qeusts #1
* @param before Array of quests #1
* @param after Array of quests #2
* @returns Reduction of cartesian product between two quest arrays
*/
@ -63,11 +64,10 @@ export declare class QuestHelper {
* Increase skill points of a skill on player profile
* @param sessionID Session id
* @param pmcData Player profile
* @param output output object to send back to client
* @param skillName Name of skill to increase skill points of
* @param progressAmount Amount of skill points to add to skill
*/
rewardSkillPoints(sessionID: string, pmcData: IPmcData, output: IItemEventRouterResponse, skillName: string, progressAmount: number): void;
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
/**
* Get quest name by quest id
* @param questId id to get
@ -75,10 +75,10 @@ export declare class QuestHelper {
*/
getQuestNameFromLocale(questId: string): string;
/**
* Check if trader has sufficient loyalty to fullfill quest requirement
* Check if trader has sufficient loyalty to fulfill quest requirement
* @param questProperties Quest props
* @param profile Player profile
* @returns true if loyalty is high enough to fulfil quest requirement
* @returns true if loyalty is high enough to fulfill quest requirement
*/
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
protected processReward(reward: Reward): Reward[];
@ -90,12 +90,12 @@ export declare class QuestHelper {
*/
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
/**
* Update player profile with quest status (e.g. Fail/Success)
* @param pmcData profile to add quest to
* @param newState state the new quest should be in when added
* @param acceptedQuest Details of quest being added
* Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile
* @param pmcData Player profile
* @param newState State the new quest should be in when returned
* @param acceptedQuest Details of accepted quest from client
*/
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void;
getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): Quest;
/**
* TODO: what is going on here
* @param acceptedQuestId Quest to add to profile
@ -111,12 +111,12 @@ export declare class QuestHelper {
*/
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
/**
* Adjust quest money rewards by passed in multipler
* Adjust quest money rewards by passed in multiplier
* @param quest Quest to multiple money rewards
* @param multipler Value to adjust money rewards by
* @param multiplier Value to adjust money rewards by
* @returns Updated quest
*/
applyMoneyBoost(quest: IQuest, multipler: number): IQuest;
applyMoneyBoost(quest: IQuest, multiplier: number): IQuest;
/**
* Sets the item stack to new value, or delete the item if value <= 0
* // TODO maybe merge this function and the one from customization
@ -127,12 +127,6 @@ export declare class QuestHelper {
* @param output ItemEvent router response
*/
changeItemStack(pmcData: IPmcData, itemId: string, newStackSize: number, sessionID: string, output: IItemEventRouterResponse): void;
/**
* Get List of All Quests from db
* NOT CLONED
* @returns Array of IQuest objects
*/
getQuestsFromDb(): IQuest[];
/**
* Get quests, strip all requirement conditions except level
* @param quests quests to process
@ -147,45 +141,62 @@ export declare class QuestHelper {
getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest;
/**
* Fail a quest in a player profile
* @param pmcData Profile
* @param failRequest fail quest request data
* @param pmcData Player profile
* @param failRequest Fail quest request data
* @param sessionID Session id
* @returns Item event router response
*/
failQuest(pmcData: IPmcData, failRequest: any, sessionID: string): IItemEventRouterResponse;
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Get quest by id from database
* @param questId questid to look for
* @param pmcData player profile
* Get List of All Quests from db
* NOT CLONED
* @returns Array of IQuest objects
*/
getQuestsFromDb(): IQuest[];
/**
* Get quest by id from database (repeatables are stored in profile, check there if questId not found)
* @param questId Id of quest to find
* @param pmcData Player profile
* @returns IQuest object
*/
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
/**
* Get the locale Id from locale db for a quest message
* @param questMessageId Quest mesage id to look up
* @param questMessageId Quest message id to look up
* @returns Locale Id from locale db
*/
getQuestLocaleIdFromDb(questMessageId: string): string;
/**
* Alter a quests state + Add a record to tis status timers object
* Alter a quests state + Add a record to its status timers object
* @param pmcData Profile to update
* @param newQuestState new state the qeust should be in
* @param questId id of the quest to alter the status of
* @param newQuestState New state the quest should be in
* @param questId Id of the quest to alter the status of
*/
updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void;
/**
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks - Returns reward items player earned
* @param pmcData Player profile
* @param body complete quest request
* @param state State of the quest now its complete
* @param sessionID Seession id
* @returns array of reward objects
* @param questId questId of quest to get rewards for
* @param state State of the quest to get rewards for
* @param sessionId Session id
* @param questResponse Response to send back to client
* @returns Array of reward objects
*/
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: QuestStatus, sessionID: string): Reward[];
applyQuestReward(pmcData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Reward[];
/**
* Get the intel center bonus a player has
* WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
* also update client response recipeUnlocked array with craft id
* @param pmcData Player profile
* @param craftUnlockReward Reward item from quest with craft unlock details
* @param questDetails Quest with craft unlock reward
* @param sessionID Session id
* @param response Response to send back to client
*/
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
/**
* Get players intel center bonus from profile
* @param pmcData player profile
* @returns bonus in percent
* @returns bonus as a percent
*/
protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
/**
@ -195,7 +206,7 @@ export declare class QuestHelper {
*/
getFindItemIdForQuestHandIn(itemTpl: string): string;
/**
* Add All quests to a profile with the provided statuses
* Add all quests to a profile with the provided statuses
* @param pmcProfile profile to update
* @param statuses statuses quests should have
*/

View File

@ -47,7 +47,28 @@ export declare class RagfairOfferHelper {
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Get offers from flea/traders specifically when building weapon preset
* @param searchRequest Search request data
* @param itemsToAdd string array of item tpls to search for
* @param traderAssorts All trader assorts player can access/buy
* @param pmcProfile Player profile
* @returns ITraderAssort
*/
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
/**
* Check if offer item is quest locked for current player by looking at sptQuestLocked property in traders barter_scheme
* @param offer Offer to check is quest locked
* @param traderAssorts all trader assorts for player
* @returns true if quest locked
*/
traderOfferItemQuestLocked(offer: IRagfairOffer, traderAssorts: Record<string, ITraderAssort>): boolean;
/**
* Has a traders offer ran out of stock to sell to player
* @param offer Offer to check stock of
* @returns true if out of stock
*/
protected traderOutOfStock(offer: IRagfairOffer): boolean;
/**
* Check if trader offers' BuyRestrictionMax value has been reached
* @param offer offer to check restriction properties of

View File

@ -30,7 +30,7 @@ export declare class RagfairSellHelper {
* Determine if the offer being listed will be sold
* @param sellChancePercent chance item will sell
* @param itemSellCount count of items to sell
* @returns Array of purchases of item(s) lsited
* @returns Array of purchases of item(s) listed
*/
rollForSale(sellChancePercent: number, itemSellCount: number): SellResult[];
}

View File

@ -7,7 +7,7 @@ export declare class RagfairSortHelper {
protected localeService: LocaleService;
constructor(databaseServer: DatabaseServer, localeService: LocaleService);
/**
* Sort a list of ragfair offers by something (id/rating/offer name/price/expirty time)
* Sort a list of ragfair offers by something (id/rating/offer name/price/expiry time)
* @param offers Offers to sort
* @param type How to sort it
* @param direction Ascending/descending

View File

@ -24,7 +24,12 @@ export declare class RepairHelper {
* @param applyMaxDurabilityDegradation should item have max durability reduced
*/
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
/**
* Is the supplied tpl a weapon
* @param tpl tplId to check is a weapon
* @returns true if tpl is a weapon
*/
isWeaponTemplate(tpl: string): boolean;
}

View File

@ -27,10 +27,10 @@ export declare class TradeHelper {
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
/**
* Buy item from flea or trader
* @param pmcData
* @param pmcData Player profile
* @param buyRequestData data from client
* @param sessionID
* @param foundInRaid
* @param sessionID Session id
* @param foundInRaid Should item be found in raid
* @param upd optional item details used when buying from flea
* @returns
*/
@ -45,7 +45,7 @@ export declare class TradeHelper {
sellItem(pmcData: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Increment the assorts buy count by number of items purchased
* Show error on screen if player attepts to buy more than what the buy max allows
* Show error on screen if player attempts to buy more than what the buy max allows
* @param assortBeingPurchased assort being bought
* @param itemsPurchasedCount number of items being bought
*/

View File

@ -35,6 +35,8 @@ export declare class TraderAssortHelper {
protected fenceService: FenceService;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
protected mergedQuestAssorts: Record<string, Record<string, string>>;
protected createdMergedQuestAssorts: boolean;
constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer);
/**
* Get a traders assorts
@ -45,6 +47,10 @@ export declare class TraderAssortHelper {
* @returns a traders' assorts
*/
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
/**
* Create a dict of all assort id = quest id mappings used to work out what items should be shown to player based on the quests they've started/completed/failed
*/
protected hydrateMergedQuestAssorts(): void;
/**
* Reset a traders assorts and move nextResupply value to future
* Flag trader as needing a flea offer reset to be picked up by flea update() function
@ -61,7 +67,7 @@ export declare class TraderAssortHelper {
* Iterate over all assorts barter_scheme values, find barters selling for money and multiply by multipler in config
* @param traderAssort Assorts to multiple price of
*/
protected multiplyItemPricesByConfigMultipler(traderAssort: ITraderAssort): void;
protected multiplyItemPricesByConfigMultiplier(traderAssort: ITraderAssort): void;
/**
* Get an array of pristine trader items prior to any alteration by player (as they were on server start)
* @param traderId trader id

View File

@ -29,6 +29,8 @@ export declare class TraderHelper {
protected timeUtil: TimeUtil;
protected configServer: ConfigServer;
protected traderConfig: ITraderConfig;
/** Dictionary of item tpl and the highest trader rouble price */
protected highestTraderPriceItems: Record<string, number>;
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
getTrader(traderID: string, sessionID: string): ITraderBase;
getTraderAssortsById(traderId: string): ITraderAssort;
@ -41,11 +43,11 @@ export declare class TraderHelper {
resetTrader(sessionID: string, traderID: string): void;
/**
* Alter a traders unlocked status
* @param traderID Trader to alter
* @param traderId Trader to alter
* @param status New status to use
* @param sessionID Session id
* @param sessionId Session id
*/
setTraderUnlockedState(traderID: string, status: boolean, sessionID: string): void;
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
/**
* Get a list of items and their prices from player inventory that can be sold to a trader
* @param traderID trader id being traded with
@ -76,8 +78,8 @@ export declare class TraderHelper {
*/
protected getTraderDurabiltyPurchaseThreshold(traderId: string): number;
/**
* Get the price of an item and all of its attached children
* Take into account bonuses/adjsutments e.g. discounts
* Get the price of passed in item and all of its attached children (mods)
* Take into account bonuses/adjustments e.g. discounts
* @param pmcData profile data
* @param item item to calculate price of
* @param buyPriceCoefficient
@ -94,14 +96,21 @@ export declare class TraderHelper {
* @returns price as number
*/
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
/**
* Get discount modifier for desired trader
* @param trader Trader to get discount for
* @param buyPriceCoefficient
* @param fenceInfo fence info, needed if getting fence modifier value
* @returns discount modifier value
*/
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel): number;
/**
* Add standing to a trader and level them up if exp goes over level threshold
* @param sessionID Session id
* @param traderId traders id
* @param sessionId Session id
* @param traderId Traders id
* @param standingToAdd Standing value to add to trader
*/
addStandingToTrader(sessionID: string, traderId: string, standingToAdd: number): void;
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
/**
* Calculate traders level based on exp amount and increments level if over threshold
* @param traderID trader to process
@ -140,4 +149,10 @@ export declare class TraderHelper {
}[];
tid: string;
}): void;
/**
* Get the highest rouble price for an item from traders
* @param tpl Item to look up highest pride for
* @returns highest rouble cost for item
*/
getHighestTraderPriceRouble(tpl: string): number;
}

View File

@ -19,4 +19,11 @@ export declare class BundleLoader {
getBundle(key: string, local: boolean): BundleInfo;
addBundles(modpath: string): void;
}
export interface BundleManifest {
manifest: Array<BundleManifestEntry>;
}
export interface BundleManifestEntry {
key: string;
path: string;
}
export {};

43
types/loaders/ModTypeCheck.d.ts vendored Normal file
View File

@ -0,0 +1,43 @@
import { IPostAkiLoadMod } from "../models/external/IPostAkiLoadMod";
import { IPostAkiLoadModAsync } from "../models/external/IPostAkiLoadModAsync";
import { IPostDBLoadMod } from "../models/external/IPostDBLoadMod";
import { IPostDBLoadModAsync } from "../models/external/IPostDBLoadModAsync";
import { IPreAkiLoadMod } from "../models/external/IPreAkiLoadMod";
import { IPreAkiLoadModAsync } from "../models/external/IPreAkiLoadModAsync";
export declare class ModTypeCheck {
/**
* Use defined safe guard to check if the mod is a IPreAkiLoadMod
* @returns boolean
*/
isPreAkiLoad(mod: any): mod is IPreAkiLoadMod;
/**
* Use defined safe guard to check if the mod is a IPostAkiLoadMod
* @returns boolean
*/
isPostAkiLoad(mod: any): mod is IPostAkiLoadMod;
/**
* Use defined safe guard to check if the mod is a IPostDBLoadMod
* @returns boolean
*/
isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod;
/**
* Use defined safe guard to check if the mod is a IPreAkiLoadModAsync
* @returns boolean
*/
isPreAkiLoadAsync(mod: any): mod is IPreAkiLoadModAsync;
/**
* Use defined safe guard to check if the mod is a IPostAkiLoadModAsync
* @returns boolean
*/
isPostAkiLoadAsync(mod: any): mod is IPostAkiLoadModAsync;
/**
* Use defined safe guard to check if the mod is a IPostDBLoadModAsync
* @returns boolean
*/
isPostDBAkiLoadAsync(mod: any): mod is IPostDBLoadModAsync;
/**
* Checks for mod to be compatible with 3.X+
* @returns boolean
*/
isPostV3Compatible(mod: any): boolean;
}

View File

@ -1,21 +1,17 @@
import { DependencyContainer } from "tsyringe";
import { HandbookController } from "../controllers/HandbookController";
import { IModLoader } from "../models/spt/mod/IModLoader";
import { ModCompilerService } from "../services/ModCompilerService";
import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader";
import { ModTypeCheck } from "./ModTypeCheck";
import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class PostAkiModLoader implements IModLoader {
protected bundleLoader: BundleLoader;
protected handbookController: HandbookController;
protected vfs: VFS;
protected modCompilerService: ModCompilerService;
protected preAkiModLoader: PreAkiModLoader;
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
getBundles(local: boolean): string;
getBundle(key: string, local: boolean): void;
protected modTypeCheck: ModTypeCheck;
constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
getModPath(mod: string): string;
load(): void;
protected executeMods(container: DependencyContainer): void;
load(): Promise<void>;
protected executeMods(container: DependencyContainer): Promise<void>;
protected addBundles(): void;
}

View File

@ -1,11 +1,13 @@
import { DependencyContainer } from "tsyringe";
import { OnLoad } from "../di/OnLoad";
import { ModTypeCheck } from "./ModTypeCheck";
import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class PostDBModLoader implements OnLoad {
protected preAkiModLoader: PreAkiModLoader;
constructor(preAkiModLoader: PreAkiModLoader);
protected modTypeCheck: ModTypeCheck;
constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
onLoad(): Promise<void>;
getRoute(): string;
getModPath(mod: string): string;
protected executeMods(container: DependencyContainer): void;
protected executeMods(container: DependencyContainer): Promise<void>;
}

View File

@ -1,9 +1,5 @@
import { DependencyContainer } from "tsyringe";
import { IPostAkiLoadMod } from "../models/external/IPostAkiLoadMod";
import { IPostDBLoadMod } from "../models/external/IPostDBLoadMod";
import { IPreAkiLoadMod } from "../models/external/IPreAkiLoadMod";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { ModLoader } from "../models/spt/mod/IMod";
import { IModLoader } from "../models/spt/mod/IModLoader";
import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData";
import { ILogger } from "../models/spt/utils/ILogger";
@ -13,6 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
import { JsonUtil } from "../utils/JsonUtil";
import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader";
import { ModTypeCheck } from "./ModTypeCheck";
export declare class PreAkiModLoader implements IModLoader {
protected logger: ILogger;
protected vfs: VFS;
@ -21,22 +18,22 @@ export declare class PreAkiModLoader implements IModLoader {
protected bundleLoader: BundleLoader;
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected modTypeCheck: ModTypeCheck;
protected static container: DependencyContainer;
protected readonly basepath = "user/mods/";
protected imported: Record<string, ModLoader.IMod>;
protected readonly modOrderPath = "user/mods/order.json";
protected order: Record<string, number>;
protected imported: Record<string, IPackageJsonData>;
protected akiConfig: ICoreConfig;
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer);
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
load(container: DependencyContainer): Promise<void>;
getBundles(local: boolean): string;
getBundle(key: string, local: boolean): void;
/**
* Returns a list of mods with preserved load order
* @returns Array of mod names in load order
*/
getImportedModsNames(): string[];
getImportedModDetails(): Record<string, ModLoader.IMod>;
getImportedModDetails(): Record<string, IPackageJsonData>;
getModPath(mod: string): string;
protected importClass(name: string, filepath: string, container: DependencyContainer): void;
protected importMods(): Promise<void>;
/**
* Check for duplciate mods loaded, show error if duplicate mod found
@ -61,29 +58,8 @@ export declare class PreAkiModLoader implements IModLoader {
* @returns dictionary <modName - package.json>
*/
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
/**
* Use defined safe guard to check if the mod is a IPreAkiLoadMod
* @returns boolean
*/
protected isPreAkiLoad(mod: any): mod is IPreAkiLoadMod;
/**
* Use defined safe guard to check if the mod is a IPostAkiLoadMod
* @returns boolean
*/
protected isPostAkiLoad(mod: any): mod is IPostAkiLoadMod;
/**
* Use defined safe guard to check if the mod is a IPostDBLoadMod
* @returns boolean
*/
protected isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod;
/**
* Check that the mod is compatible with SPT 3.X.X
* @param mod the mod to check
* @returns boolean
*/
protected isModSpt3XXCompatible(mod: any): boolean;
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
protected executeMods(container: DependencyContainer): void;
protected executeMods(container: DependencyContainer): Promise<void>;
sortModsLoadOrder(): string[];
protected addMod(mod: string): Promise<void>;
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
@ -95,6 +71,6 @@ export declare class PreAkiModLoader implements IModLoader {
*/
protected validMod(modName: string): boolean;
protected getLoadOrderRecursive(mod: string, result: Record<string, string>, visited: Record<string, string>): void;
protected getLoadOrder(mods: Record<string, ModLoader.IMod>): Record<string, string>;
protected getLoadOrder(mods: Record<string, IPackageJsonData>): Record<string, string>;
getContainer(): DependencyContainer;
}

View File

@ -31,6 +31,7 @@ export interface Config {
TimeBeforeDeployLocal: number;
TradingSetting: number;
TradingSettings: ITradingSettings;
ItemsCommonSettings: IItemsCommonSettings;
LoadTimeSpeedProgress: number;
BaseLoadTime: number;
BaseUnloadTime: number;
@ -84,12 +85,16 @@ export interface Config {
TestValue: number;
Inertia: Inertia;
Ballistic: Ballistic;
RepairSettings: RepairSettings;
}
export interface IBufferZone {
CustomerAccessTime: number;
CustomerCriticalTimeStart: number;
CustomerKickNotifTime: number;
}
export interface IItemsCommonSettings {
ItemRemoveAfterInterruptionTime: number;
}
export interface ITradingSettings {
BuyoutRestrictions: IBuyoutRestrictions;
}

View File

@ -180,6 +180,7 @@ export interface Exit {
EntryPoints: string;
ExfiltrationTime: number;
ExfiltrationType: string;
RequiredSlot?: string;
Id: string;
MaxTime: number;
MinTime: number;

View File

@ -104,7 +104,10 @@ export interface BodyPartsHealth {
}
export interface BodyPartHealth {
Health: CurrentMax;
Effects?: Record<string, number>;
Effects?: Record<string, BodyPartEffectProperties>;
}
export interface BodyPartEffectProperties {
Time: number;
}
export interface CurrentMax {
Current: number;
@ -124,7 +127,6 @@ export interface FastPanel {
export interface Skills {
Common: Common[];
Mastering: Mastering[];
Bonuses?: any[];
Points: number;
}
export interface Common {
@ -270,6 +272,7 @@ export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvements: Record<string, IHideoutImprovement>;
sptUpdateLastRunTimestamp: number;
}
export interface IHideoutImprovement {
completed: boolean;
@ -277,9 +280,15 @@ export interface IHideoutImprovement {
}
export interface Productive {
Products: Product[];
/** Seconds passed of production */
Progress?: number;
/** Is craft in some state of being worked on by client (crafting/ready to pick up) */
inProgress?: boolean;
StartTimestamp?: number;
SkipTime?: number;
/** Seconds needed to fully craft */
ProductionTime?: number;
sptIsScavCase?: boolean;
}
export interface Production extends Productive {
RecipeId: string;

View File

@ -7,6 +7,7 @@ export interface Item {
upd?: Upd;
}
export interface Upd {
Buff?: Buff;
OriginalStackObjectsCount?: number;
Togglable?: Togglable;
Map?: Map;
@ -16,6 +17,7 @@ export interface Upd {
StackObjectsCount?: number;
UnlimitedCount?: boolean;
Repairable?: Repairable;
RecodableComponent?: RecodableComponent;
FireMode?: FireMode;
SpawnedInSession?: boolean;
Light?: Light;
@ -31,6 +33,12 @@ export interface Upd {
SideEffect?: SideEffect;
RepairKit?: RepairKit;
}
export interface Buff {
rarity: string;
buffType: string;
value: number;
thresholdDurability?: number;
}
export interface Togglable {
On: boolean;
}
@ -52,6 +60,9 @@ export interface Repairable {
Durability: number;
MaxDurability: number;
}
export interface RecodableComponent {
IsEncoded: boolean;
}
export interface MedKit {
HpResource: number;
}

View File

@ -20,6 +20,7 @@ export interface TemplateSide {
export interface ProfileTraderTemplate {
initialLoyaltyLevel: number;
setQuestsAvailableForStart?: boolean;
setQuestsAvailableForFinish?: boolean;
initialStanding: number;
initialSalesSum: number;
jaegerUnlocked: boolean;

View File

@ -2,7 +2,7 @@ import { QuestRewardType } from "../../../enums/QuestRewardType";
import { QuestStatus } from "../../../enums/QuestStatus";
import { Item } from "./IItem";
export interface IQuest {
QuestName: string;
QuestName?: string;
_id: string;
canShowNotificationsInGame: boolean;
conditions: Conditions;
@ -23,7 +23,7 @@ export interface IQuest {
successMessageText: string;
templateId: string;
rewards: Rewards;
status: string;
status: string | number;
KeyQuest: boolean;
changeQuestMessageText: string;
side: string;
@ -51,6 +51,8 @@ export interface AvailableForProps {
visibilityConditions?: VisibilityCondition[];
target?: string | string[];
status?: QuestStatus[];
availableAfter?: number;
dispersion?: number;
onlyFoundInRaid?: boolean;
oneSessionOnly?: boolean;
doNotResetIfCounterCompleted?: boolean;

View File

@ -47,6 +47,7 @@ export interface IRepeatableQuest {
canShowNotificationsInGame: boolean;
rewards: IRewards;
conditions: IConditions;
side: string;
name: string;
note: string;
description: string;

View File

@ -159,7 +159,7 @@ export interface Props {
RigLayoutName?: string;
MaxDurability?: number;
armorZone?: string[];
armorClass?: any;
armorClass?: string | number;
mousePenalty?: number;
weaponErgonomicPenalty?: number;
BluntThroughput?: number;

View File

@ -1,4 +1,4 @@
export interface IHideoutContinousProductionStartRequestData {
export interface IHideoutContinuousProductionStartRequestData {
Action: "HideoutContinuousProductionStart";
recipeId: string;
timestamp: number;

View File

@ -1,4 +1,5 @@
import { Skills } from "../common/tables/IBotBase";
import { QuestStatus } from "../../../models/enums/QuestStatus";
import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase";
import { Item, Upd } from "../common/tables/IItem";
import { IQuest } from "../common/tables/IQuest";
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
@ -21,12 +22,23 @@ export interface ProfileChange {
ragFairOffers: IRagfairOffer[];
builds: BuildChange[];
items: ItemChanges;
production: Record<string, Production>;
production: Record<string, Productive>;
/** Hideout area improvement id */
improvements: Record<string, Improvement>;
skills: Skills;
traderRelations: Record<string, TraderRelations>;
health: Health;
traderRelations: Record<string, TraderInfo>;
repeatableQuests?: IPmcDataRepeatableQuest[];
recipeUnlocked: Record<string, boolean>;
questsStatus: QuestStatusChange[];
}
export interface QuestStatusChange {
qid: string;
startTime: number;
status: QuestStatus;
statusTimers: Record<QuestStatus, number>;
completedConditions: string[];
availableAfter: number;
}
export interface BuildChange {
id: string;
@ -39,14 +51,6 @@ export interface ItemChanges {
change: Product[];
del: Product[];
}
export interface Production {
Progress: number;
StartTimestamp: number;
ProductionTime: number;
inProgress: boolean;
RecipeId: string;
Products: Product[];
}
export interface Improvement {
completed: boolean;
improveCompleteTimestamp: number;
@ -65,10 +69,3 @@ export interface ItemChangeLocation {
r: number;
isSearched?: boolean;
}
export interface TraderRelations {
salesSum?: number;
standing?: number;
loyalty?: number;
unlocked?: boolean;
disabled?: boolean;
}

View File

@ -6,6 +6,8 @@ export interface IJoinMatchResult {
port: number;
version: string;
location: string;
gamemode: string;
raidMode: string;
mode: string;
shortid: string;
additional_info: any[];
}

View File

@ -6,7 +6,13 @@ export interface ProfileData {
profileid: string;
profileToken: string;
status: string;
sid: string;
ip: string;
port: number;
sid: string;
version?: string;
location?: string;
raidMode?: string;
mode?: string;
shortId?: string;
additional_info?: any[];
}

View File

@ -0,0 +1,5 @@
export interface IFailQuestRequestData {
Action: "QuestComplete";
qid: string;
removeExcessItems: boolean;
}

View File

@ -23,6 +23,7 @@ export interface IRagfairOffer {
summaryCost: number;
user: IRagfairOfferUser;
notAvailable: boolean;
/** TODO - implement this value - not currently used */
CurrentItemCount: number;
priority: boolean;
}

View File

@ -1,5 +1,6 @@
export declare enum BaseClasses {
WEAPON = "5422acb9af1c889c16000029",
UBGL = "55818b014bdc2ddc698b456b",
ARMOR = "5448e54d4bdc2dcc718b4568",
ARMOREDEQUIPMENT = "57bef4c42459772e8d35a53b",
HEADWEAR = "5a341c4086f77401f2541505",

View File

@ -4,5 +4,6 @@ export declare enum QuestRewardType {
TRADER_STANDING = "TraderStanding",
TRADER_UNLOCK = "TraderUnlock",
ITEM = "Item",
ASSORTMENT_UNLOCK = "AssortmentUnlock"
ASSORTMENT_UNLOCK = "AssortmentUnlock",
PRODUCTIONS_SCHEME = "ProductionScheme"
}

View File

@ -7,5 +7,6 @@ export declare enum QuestStatus {
Fail = 5,
FailRestartable = 6,
MarkedAsFailed = 7,
Expired = 8
Expired = 8,
AvailableAfter = 9
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostAkiLoadModAsync {
postAkiLoadAsync(container: DependencyContainer): Promise<void>;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostDBLoadModAsync {
postDBLoadAsync(container: DependencyContainer): Promise<void>;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPreAkiLoadModAsync {
preAkiLoadAsync(container: DependencyContainer): Promise<void>;
}

View File

@ -3,7 +3,8 @@ import { Item } from "../../eft/common/tables/IItem";
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
export declare class GenerateWeaponResult {
weapon: Item[];
chosenAmmo: string;
chosenAmmoTpl: string;
chosenUbglAmmoTpl: string;
weaponMods: Mods;
weaponTemplate: ITemplateItem;
}

View File

@ -6,7 +6,7 @@ import { IHideoutPutItemInRequestData } from "../../eft/hideout/IHideoutPutItemI
import { IHideoutTakeItemOutRequestData } from "../../eft/hideout/IHideoutTakeItemOutRequestData";
import { IHideoutToggleAreaRequestData } from "../../eft/hideout/IHideoutToggleAreaRequestData";
import { IHideoutSingleProductionStartRequestData } from "../../eft/hideout/IHideoutSingleProductionStartRequestData";
import { IHideoutContinousProductionStartRequestData } from "../../eft/hideout/IHideoutContinousProductionStartRequestData";
import { IHideoutContinuousProductionStartRequestData } from "../../eft/hideout/IHideoutContinuousProductionStartRequestData";
import { IHideoutTakeProductionRequestData } from "../../eft/hideout/IHideoutTakeProductionRequestData";
import { IItemEventRouterResponse } from "../../eft/itemEvent/IItemEventRouterResponse";
export interface IHideoutCallbacks {
@ -17,7 +17,7 @@ export interface IHideoutCallbacks {
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
update(timeSinceLastRun: number): boolean;
}

View File

@ -25,6 +25,7 @@ export interface IBotConfig extends IBaseConfig {
showTypeInNickname: boolean;
/** Max number of bots that can be spawned in a raid at any one time */
maxBotCap: Record<string, number>;
chanceAssaultScavHasPlayerScavName: number;
/** How many stacks of secret ammo should a bot have in its bot secure container */
secureContainerAmmoStackCount: number;
/** Batch generation size when type not available in cache */
@ -84,6 +85,7 @@ export interface ModLimits {
}
export interface RandomisationDetails {
levelRange: MinMax;
generation?: Record<string, MinMax>;
randomisedWeaponModSlots?: string[];
randomisedArmorSlots?: string[];
/** Equipment chances */

View File

@ -14,19 +14,9 @@ export interface IBotDurability {
}
/** Durability values to be used when a more specific bot type cant be found */
export interface DefaultDurability {
armor: DefaultArmor;
armor: ArmorDurability;
weapon: WeaponDurability;
}
export interface DefaultArmor {
maxDelta: number;
minDelta: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
}
export interface PmcDurability {
armor: PmcDurabilityArmor;
weapon: WeaponDurability;
@ -44,4 +34,12 @@ export interface BotDurability {
export interface ArmorDurability {
maxDelta: number;
minDelta: number;
minLimitPercent: number;
}
export interface WeaponDurability {
lowestMax: number;
highestMax: number;
maxDelta: number;
minDelta: number;
minLimitPercent: number;
}

View File

@ -4,4 +4,5 @@ export interface ICoreConfig extends IBaseConfig {
akiVersion: string;
projectName: string;
compatibleTarkovVersion: string;
commit: string;
}

View File

@ -3,10 +3,5 @@ export interface IHideoutConfig extends IBaseConfig {
kind: "aki-hideout";
runIntervalSeconds: number;
hoursForSkillCrafting: number;
generatorSpeedWithoutFuel: number;
generatorFuelFlowRate: number;
airFilterUnitFlowRate: number;
/** SEE HIDEOUTHELPER BEFORE CHANGING CONFIG */
gpuBoostRate: number;
hideoutWallAppearTimeSeconds: number;
}

View File

@ -5,5 +5,6 @@ export interface IInsuranceConfig extends IBaseConfig {
returnChancePercent: Record<string, number>;
blacklistedEquipment: string[];
slotIdsWithChanceOfNotReturning: string[];
returnTimeOverrideSeconds: number;
runIntervalSeconds: number;
}

View File

@ -2,11 +2,16 @@ import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBas
import { IBaseConfig } from "./IBaseConfig";
export interface ILocationConfig extends IBaseConfig {
kind: "aki-location";
fixEmptyBotWaves: boolean;
fixRoguesTakingAllSpawnsOnLighthouse: boolean;
lighthouseRogueSpawnTimeSeconds: number;
looseLootMultiplier: LootMultiplier;
staticLootMultiplier: LootMultiplier;
customWaves: CustomWaves;
/** Open zones to add to map */
openZones: Record<string, string[]>;
/** Key = map id, value = item tpls that should only have one forced loot spawn position */
forcedLootSingleSpawnById: Record<string, string[]>;
}
export interface CustomWaves {
boss: Record<string, BossLocationSpawn[]>;

View File

@ -9,6 +9,7 @@ export interface KarmaLevel {
modifiers: Modifiers;
itemLimits: ItemLimits;
equipmentBlacklist: Record<string, string[]>;
labsAccessCardChancePercent: number;
}
export interface Modifiers {
equipment: Record<string, number>;

View File

@ -1,5 +1,8 @@
import { MinMax } from "../../common/MinMax";
export interface IPmcConfig {
vestLoot: SlotLootSettings;
pocketLoot: SlotLootSettings;
backpackLoot: SlotLootSettings;
dynamicLoot: DynamicLoot;
useDifficultyOverride: boolean;
difficulty: string;
@ -22,8 +25,11 @@ export interface PmcTypes {
usec: string;
bear: string;
}
export interface DynamicLoot {
export interface SlotLootSettings {
whitelist: string[];
blacklist: string[];
moneyStackLimits: Record<string, number>;
}
export interface DynamicLoot {
moneyStackLimits: Record<string, number>;
}

View File

@ -3,13 +3,24 @@ import { IBaseConfig } from "./IBaseConfig";
export interface IQuestConfig extends IBaseConfig {
kind: "aki-quest";
redeemTime: number;
questTemplateIds: IPlayerTypeQuestIds;
repeatableQuests: IRepeatableQuestConfig[];
locationIdMap: Record<string, string>;
bearOnlyQuests: string[];
usecOnlyQuests: string[];
}
export interface IPlayerTypeQuestIds {
pmc: IQuestTypeIds;
scav: IQuestTypeIds;
}
export interface IQuestTypeIds {
Elimination: string;
Completion: string;
Exploration: string;
}
export interface IRepeatableQuestConfig {
name: string;
side: string;
types: string[];
resetTime: number;
numQuests: number;
@ -17,11 +28,12 @@ export interface IRepeatableQuestConfig {
rewardScaling: IRewardScaling;
locations: Record<ELocationName, string[]>;
traderWhitelist: ITraderWhitelist[];
questConfig: IQuestConfig;
questConfig: IRepeatableQuestTypesConfig;
/** Item base types to block when generating rewards */
rewardBaseTypeBlacklist: string[];
/** Item tplIds to ignore when generating rewards */
rewardBlacklist: string[];
rewardAmmoStackMinSize: number;
}
export interface IRewardScaling {
levels: number[];
@ -35,7 +47,7 @@ export interface ITraderWhitelist {
traderId: string;
questTypes: string[];
}
export interface IQuestConfig {
export interface IRepeatableQuestTypesConfig {
Exploration: IExploration;
Completion: ICompletion;
Elimination: IElimination;

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