Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
509cdff8b6 | |||
30744551f0 | |||
23ab7efadf | |||
c3866d0360 | |||
a1f8fe37a1 | |||
cc58998345 | |||
90db74d535 | |||
cce9f573ba | |||
37d356736c | |||
41c3dd6c83 | |||
df9a522516 | |||
c145035717 | |||
1fc77d6bdf |
@ -33,7 +33,9 @@
|
||||
"6087e570b998180e9f76dc24",
|
||||
"5d52d479a4b936793d58c76b",
|
||||
"5e85aac65505fa48730d8af2",
|
||||
"63495c500c297e20065a08b1"
|
||||
"63495c500c297e20065a08b1",
|
||||
"5cde8864d7f00c0010373be1",
|
||||
"5b3b713c5acfc4330140bd8d"
|
||||
],
|
||||
"itemTypeWhitelist": [
|
||||
"543be5dd4bdc2deb348b4569",
|
||||
|
@ -5,22 +5,23 @@
|
||||
"chance": 100
|
||||
},
|
||||
|
||||
"maxBotCap":
|
||||
{
|
||||
"factory": 25,
|
||||
"customs": 25,
|
||||
"woods": 20,
|
||||
"shoreline": 20,
|
||||
"lighthouse": 25,
|
||||
"reservebase": 20,
|
||||
"interchange": 20,
|
||||
"laboratory": 25,
|
||||
"default": 20
|
||||
"botGenerationBatchSizePerType": 15,
|
||||
"maxBotCap": {
|
||||
"factory": 10,
|
||||
"customs": 15,
|
||||
"woods": 15,
|
||||
"shoreline": 15,
|
||||
"lighthouse": 15,
|
||||
"reservebase": 15,
|
||||
"interchange": 15,
|
||||
"laboratory": 15,
|
||||
"streets of tarkov": 18,
|
||||
"default": 15
|
||||
},
|
||||
|
||||
"pmc":
|
||||
{
|
||||
"chanceSameSideIsHostile": 50,
|
||||
"chanceSameSideIsHostilePercent": 80,
|
||||
"containersOnPMCs": true,
|
||||
"isUsec": 50,
|
||||
"lootNValue": 3,
|
||||
@ -32,28 +33,29 @@
|
||||
{
|
||||
"assault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 40
|
||||
"min": 20,
|
||||
"max": 30
|
||||
},
|
||||
"cursedAssault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 40
|
||||
},
|
||||
"pmcBot":
|
||||
"cursedassault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 30
|
||||
},
|
||||
"exUsec":
|
||||
"pmcbot":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 25
|
||||
},
|
||||
"exusec":
|
||||
{
|
||||
"min": 5,
|
||||
"max": 20
|
||||
"max": 5
|
||||
}
|
||||
},
|
||||
|
||||
"useDifficultyOverride": false,
|
||||
"difficulty": "AsOnline",
|
||||
"botRelativeLevelDeltaMax": 10,
|
||||
|
||||
"difficultyWeights":
|
||||
{
|
||||
@ -68,7 +70,7 @@
|
||||
},
|
||||
|
||||
"looseWeaponInBackpackChance": 15,
|
||||
"looseWeaponInBackpackLoot":
|
||||
"looseWeaponInBackpackLootMinMax":
|
||||
{
|
||||
"min": 1,
|
||||
"max": 1
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"minUserLevel": 15,
|
||||
"runIntervalSeconds": 45,
|
||||
|
||||
"blacklist":
|
||||
{
|
||||
@ -9,9 +10,48 @@
|
||||
|
||||
"condition":
|
||||
{
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1.0
|
||||
"5422acb9af1c889c16000029": {
|
||||
"_name": "WEAPON",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1
|
||||
},
|
||||
"543be5664bdc2dd4348b4569": {
|
||||
"_name": "MEDS",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1
|
||||
},
|
||||
"5447e0e74bdc2d3c308b4567": {
|
||||
"_name": "SPEC_ITEM",
|
||||
"conditionChance": 0.3,
|
||||
"min": 0.02,
|
||||
"max": 1
|
||||
},
|
||||
"543be5e94bdc2df1348b4568": {
|
||||
"_name": "KEY",
|
||||
"conditionChance": 0.02,
|
||||
"min": 0.97,
|
||||
"max": 1
|
||||
},
|
||||
"5448e5284bdc2dcb718b4567": {
|
||||
"_name": "VEST",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
},
|
||||
"57bef4c42459772e8d35a53b": {
|
||||
"_name": "ARMORED_EQUIPMENT",
|
||||
"conditionChance": 0.6,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
},
|
||||
"543be6674bdc2df1348b4569": {
|
||||
"_name": "FOOD_DRINK",
|
||||
"conditionChance": 0.05,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
|
||||
"currencies":
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"airFilterUnitFlowRate": 0.0047222222222222,
|
||||
"constructionTime": 1,
|
||||
"generatorFuelFlowRate": 0.0013194444444444,
|
||||
"gpuBoostRate": 0.015,
|
||||
"productionTime": 1,
|
||||
"scavCaseTime": 1
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"maxHr": 36,
|
||||
"storageMaxHr": 96,
|
||||
"priceCoef": 0.16,
|
||||
"returnChance": 80
|
||||
"returnChance": 75
|
||||
},
|
||||
|
||||
"therapist":
|
||||
|
@ -3,5 +3,6 @@
|
||||
"freeLabsEntry": false,
|
||||
"exfilTime": 8,
|
||||
"extractionsExtended": false,
|
||||
"enableCoopExtracts": false,
|
||||
"noExtractRestrictions": false
|
||||
}
|
@ -3,9 +3,15 @@
|
||||
"chompiesBossFix": true,
|
||||
"fixOpenZones": true,
|
||||
"scavExtractGain": 0.01,
|
||||
"timeLimit": 60,
|
||||
"aiAmount": "asonline",
|
||||
"aiDifficulty": "asonline",
|
||||
|
||||
"timeLimit":
|
||||
{
|
||||
"enabled": false,
|
||||
"raidTime": 60
|
||||
},
|
||||
|
||||
"aiAmount": "AsOnline",
|
||||
"aiDifficulty": "AsOnline",
|
||||
"bossEnabled": true,
|
||||
"scavWars": false,
|
||||
"taggedAndCursed": false,
|
||||
|
@ -58,10 +58,10 @@
|
||||
"fence": {
|
||||
"partialRefreshTimeSeconds": 240,
|
||||
"partialRefreshChangePercent": 15,
|
||||
"assortSize": 120,
|
||||
"assortSize": 50,
|
||||
"maxPresetsPercent": 5,
|
||||
"itemPriceMult": 1.2,
|
||||
"presetPriceMult": 2.5,
|
||||
"itemPriceMult": 0.8,
|
||||
"presetPriceMult": 1.5,
|
||||
"regenerateAssortsOnRefresh": false,
|
||||
"itemTypeLimits": {
|
||||
"550aa4bf4bdc2dd6348b456b": 3,
|
||||
|
@ -3,10 +3,11 @@ import { DynamicLoot } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||
|
||||
export interface BotsConfig
|
||||
{
|
||||
bossChance: BossChance
|
||||
maxBotCap: MaxBotCap
|
||||
pmc: IPmcConfig
|
||||
scav: Scav
|
||||
bossChance: BossChance;
|
||||
botGenerationBatchSizePerType: number;
|
||||
maxBotCap: MaxBotCap;
|
||||
pmc: IPmcConfig;
|
||||
scav: Scav;
|
||||
}
|
||||
|
||||
export interface IPmcConfig
|
||||
@ -28,10 +29,9 @@ export interface IPmcConfig
|
||||
convertIntoPmcChance: Record<string, MinMax>;
|
||||
enemyTypes: string[];
|
||||
botRelativeLevelDeltaMax: number;
|
||||
chanceSameSideIsHostile: number
|
||||
containersOnPMCs: boolean
|
||||
lootNValue: number
|
||||
difficultyWeights: DifficultyWeights
|
||||
containersOnPMCs: boolean;
|
||||
lootNValue: number;
|
||||
difficultyWeights: DifficultyWeights;
|
||||
}
|
||||
|
||||
export interface BossChance
|
||||
|
@ -1,50 +1,51 @@
|
||||
export interface FleaConfig
|
||||
{
|
||||
minUserLevel: number
|
||||
blacklist: Blacklist
|
||||
condition: Condition
|
||||
currencies: Currencies
|
||||
offerItemCount: OfferItemCount
|
||||
reputation: Reputation
|
||||
time: Time
|
||||
runIntervalSeconds: number;
|
||||
minUserLevel: number;
|
||||
blacklist: Blacklist;
|
||||
condition: Condition;
|
||||
currencies: Currencies;
|
||||
offerItemCount: OfferItemCount;
|
||||
reputation: Reputation;
|
||||
time: Time;
|
||||
}
|
||||
|
||||
export interface Blacklist
|
||||
{
|
||||
enableBsgList: boolean
|
||||
enableQuestList: boolean
|
||||
enableBsgList: boolean;
|
||||
enableQuestList: boolean;
|
||||
}
|
||||
|
||||
export interface Condition
|
||||
{
|
||||
conditionChance: number
|
||||
min: number
|
||||
max: number
|
||||
conditionChance: number;
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface Currencies
|
||||
{
|
||||
roubles: number
|
||||
dollars: number
|
||||
euros: number
|
||||
roubles: number;
|
||||
dollars: number;
|
||||
euros: number;
|
||||
}
|
||||
|
||||
export interface OfferItemCount
|
||||
{
|
||||
min: number
|
||||
max: number
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface Reputation
|
||||
{
|
||||
gain: number
|
||||
loss: number
|
||||
gain: number;
|
||||
loss: number;
|
||||
}
|
||||
|
||||
export interface Time
|
||||
{
|
||||
baseSellTime: number
|
||||
minSellTime: number
|
||||
maxSellTime: number
|
||||
baseSellTime: number;
|
||||
minSellTime: number;
|
||||
maxSellTime: number;
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
export interface HideoutConfig
|
||||
{
|
||||
airFilterUnitFlowRate: number
|
||||
constructionTime: number
|
||||
generatorFuelFlowRate: number
|
||||
gpuBoostRate: number
|
||||
productionTime: number
|
||||
scavCaseTime: number
|
||||
}
|
@ -4,5 +4,6 @@ export interface LocationsConfig
|
||||
freeLabsEntry: boolean
|
||||
exfilTime: number
|
||||
extractionsExtended: boolean
|
||||
enableCoopExtracts: boolean
|
||||
noExtractRestrictions: boolean
|
||||
}
|
@ -1,14 +1,20 @@
|
||||
export interface RaidConfig
|
||||
{
|
||||
carExtractBaseStandingGain: number
|
||||
chompiesBossFix: boolean
|
||||
fixOpenZones: boolean
|
||||
scavExtractGain: number
|
||||
timeLimit: number
|
||||
aiAmount: string
|
||||
aiDifficulty: string
|
||||
bossEnabled: boolean
|
||||
scavWars: boolean
|
||||
taggedAndCursed: boolean
|
||||
enablePve: boolean
|
||||
carExtractBaseStandingGain: number;
|
||||
chompiesBossFix: boolean;
|
||||
fixOpenZones: boolean;
|
||||
scavExtractGain: number;
|
||||
timeLimit: TimeLimit;
|
||||
aiAmount: string;
|
||||
aiDifficulty: string;
|
||||
bossEnabled: boolean;
|
||||
scavWars: boolean;
|
||||
taggedAndCursed: boolean;
|
||||
enablePve: boolean;
|
||||
}
|
||||
|
||||
export interface TimeLimit
|
||||
{
|
||||
enabled: boolean;
|
||||
raidTime: number;
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Valens-AIO",
|
||||
"version": "1.7.0",
|
||||
"version": "1.8.2",
|
||||
"main": "src/mod.js",
|
||||
"license": "CC BY-NC-ND 4.0",
|
||||
"author": "Valens",
|
||||
"akiVersion": "3.4.*",
|
||||
"akiVersion": ">=3.5.0",
|
||||
"scripts": {
|
||||
"setup:environment": "npm i",
|
||||
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { AirdropConfig } from "../config/ts/airdrop";
|
||||
import { Logger } from "./logger";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
|
||||
export class Airdrop
|
||||
{
|
||||
|
47
src/bots.ts
47
src/bots.ts
@ -1,8 +1,8 @@
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { BotsConfig } from "../config/ts/bots";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Bots
|
||||
{
|
||||
@ -81,12 +81,13 @@ export class Bots
|
||||
|
||||
|
||||
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||
if (modPMC.chanceSameSideIsHostile != pmc.chanceSameSideIsHostilePercent)
|
||||
if (modPMC.chanceSameSideIsHostilePercent != pmc.chanceSameSideIsHostilePercent)
|
||||
{
|
||||
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostile;
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
||||
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostilePercent;
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostilePercent}`);
|
||||
}
|
||||
|
||||
|
||||
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
||||
{
|
||||
for (const [key] of Object.entries(bot.maxBotCap))
|
||||
@ -107,21 +108,29 @@ export class Bots
|
||||
|
||||
|
||||
// Adjusts the chance for PMC to spawn instead of the default bot type if configured outside of the default values.
|
||||
if (this.modConfig.pmc.convertIntoPmcChance.assault.min != 15 || this.modConfig.pmc.convertIntoPmcChance.assault.max != 40
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.cursedAssault.min != 15 || this.modConfig.pmc.convertIntoPmcChance.cursedAssault.max != 40
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.pmcBot.min != 15 || this.modConfig.pmc.convertIntoPmcChance.pmcBot.max != 30
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.exUsec.min != 5 || this.modConfig.pmc.convertIntoPmcChance.exUsec.max != 20)
|
||||
if (this.modConfig.pmc.convertIntoPmcChance.assault.min != this.botConfig.pmc.convertIntoPmcChance.assault.min || this.modConfig.pmc.convertIntoPmcChance.assault.max != this.botConfig.pmc.convertIntoPmcChance.assault.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.cursedassault.min != this.botConfig.pmc.convertIntoPmcChance.cursedassault.min || this.modConfig.pmc.convertIntoPmcChance.cursedassault.max != this.botConfig.pmc.convertIntoPmcChance.cursedassault.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.pmcbot.min != this.botConfig.pmc.convertIntoPmcChance.pmcbot.min || this.modConfig.pmc.convertIntoPmcChance.pmcbot.max != this.botConfig.pmc.convertIntoPmcChance.pmcbot.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.exusec.min != this.botConfig.pmc.convertIntoPmcChance.exusec.min || this.modConfig.pmc.convertIntoPmcChance.exusec.max != this.botConfig.pmc.convertIntoPmcChance.exusec.max)
|
||||
{
|
||||
this.adjustPmcChance();
|
||||
this.logger.info("Chance to Convert Bots into PMC Patched");
|
||||
}
|
||||
|
||||
|
||||
// Modfiies the botRelativeLevelDeltaMax which alters the relative level delta maximum of PMC bots.
|
||||
if (mod.pmc.botRelativeLevelDeltaMax != this.botConfig.pmc.botRelativeLevelDeltaMax)
|
||||
{
|
||||
this.botConfig.pmc.botRelativeLevelDeltaMax = mod.pmc.botRelativeLevelDeltaMax;
|
||||
this.logger.info(`Bot Relative Delta Max Level set to ${mod.pmc.botRelativeLevelDeltaMax}`);
|
||||
}
|
||||
|
||||
|
||||
// Makes *all* bosses spawn chance configurable.
|
||||
if (mod.bossChance.activated)
|
||||
{
|
||||
this.configureBossChance();
|
||||
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`)
|
||||
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`);
|
||||
}
|
||||
|
||||
|
||||
@ -137,10 +146,10 @@ export class Bots
|
||||
// Function to enable secured and common containers on PMCs.
|
||||
private containersOnPMCs(): void
|
||||
{
|
||||
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
||||
const backpackLoot = this.botConfig.pmc.backpackLoot.whitelist;
|
||||
|
||||
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
dynaLoot.push("5795f317245977243854e041");
|
||||
backpackLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
backpackLoot.push("5795f317245977243854e041");
|
||||
}
|
||||
|
||||
private chooseRandomWeightedDifficulty(): string
|
||||
@ -158,12 +167,12 @@ export class Bots
|
||||
|
||||
pmcConfig.assault.min = modConfig.assault.min;
|
||||
pmcConfig.assault.max = modConfig.assault.max;
|
||||
pmcConfig.cursedassault.min = modConfig.cursedAssault.min;
|
||||
pmcConfig.cursedassault.max = modConfig.cursedAssault.max;
|
||||
pmcConfig.pmcbot.min = modConfig.pmcBot.min;
|
||||
pmcConfig.pmcbot.max = modConfig.pmcBot.max;
|
||||
pmcConfig.exusec.min = modConfig.exUsec.min;
|
||||
pmcConfig.exusec.max = modConfig.exUsec.max;
|
||||
pmcConfig.cursedassault.min = modConfig.cursedassault.min;
|
||||
pmcConfig.cursedassault.max = modConfig.cursedassault.max;
|
||||
pmcConfig.pmcbot.min = modConfig.pmcbot.min;
|
||||
pmcConfig.pmcbot.max = modConfig.pmcbot.max;
|
||||
pmcConfig.exusec.min = modConfig.exusec.min;
|
||||
pmcConfig.exusec.max = modConfig.exusec.max;
|
||||
}
|
||||
|
||||
|
||||
|
48
src/flea.ts
48
src/flea.ts
@ -1,7 +1,7 @@
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { FleaConfig } from "../config/ts/flea";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Flea
|
||||
{
|
||||
@ -25,20 +25,35 @@ export class Flea
|
||||
const global = this.tables.getTables().globals;
|
||||
const ragfair = this.ragfairConfig.dynamic;
|
||||
|
||||
if (mod.minUserLevel != 15)
|
||||
if (mod.runIntervalSeconds != this.ragfairConfig.runIntervalSeconds)
|
||||
{
|
||||
this.ragfairConfig.runIntervalSeconds = mod.runIntervalSeconds;
|
||||
this.logger.info(`Run Interval Seconds patched to ${mod.runIntervalSeconds} seconds`);
|
||||
}
|
||||
|
||||
|
||||
if (mod.minUserLevel != global.config.RagFair.minUserLevel)
|
||||
{
|
||||
global.config.RagFair.minUserLevel = mod.minUserLevel;
|
||||
this.logger.info(`Fleamarket unlocked at level ${mod.minUserLevel}`)
|
||||
}
|
||||
|
||||
if (!mod.blacklist.enableBsgList || !mod.blacklist.enableQuestList)
|
||||
|
||||
if (!mod.blacklist.enableBsgList)
|
||||
{
|
||||
ragfair.blacklist.enableBsgList = mod.blacklist.enableBsgList;
|
||||
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
||||
ragfair.blacklist.enableBsgList = false;
|
||||
this.logger.info("Fleamarket Blacklists patched");
|
||||
}
|
||||
|
||||
if (mod.condition.conditionChance != 0.2 || mod.condition.min != 0.6 || mod.condition.max != 1)
|
||||
|
||||
if (!mod.blacklist.enableQuestList)
|
||||
{
|
||||
ragfair.blacklist.enableQuestList = false;
|
||||
this.logger.info("Fleamarket Blacklists patched");
|
||||
}
|
||||
|
||||
|
||||
if (mod.condition.conditionChance != ragfair.condition.conditionChance || mod.condition.min != ragfair.condition.min || mod.condition.max != ragfair.condition.max)
|
||||
{
|
||||
ragfair.condition.conditionChance = mod.condition.conditionChance;
|
||||
ragfair.condition.min = mod.condition.min;
|
||||
@ -46,7 +61,8 @@ export class Flea
|
||||
this.logger.info("Fleamarket Condition patched");
|
||||
}
|
||||
|
||||
if (mod.currencies.roubles != 78 || mod.currencies.dollars != 20 || mod.currencies.euros != 2)
|
||||
|
||||
if (mod.currencies.roubles != ragfair.currencies.roubles || mod.currencies.dollars != ragfair.currencies.dollars || mod.currencies.euros != ragfair.currencies.euros)
|
||||
{
|
||||
ragfair.currencies["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||
@ -54,26 +70,30 @@ export class Flea
|
||||
this.logger.info("Fleamarket Currencies patched")
|
||||
}
|
||||
|
||||
if (mod.offerItemCount.min != 8 || mod.offerItemCount.max != 15)
|
||||
|
||||
if (mod.offerItemCount.min != ragfair.offerItemCount.min || mod.offerItemCount.max != ragfair.offerItemCount.max)
|
||||
{
|
||||
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||
this.logger.info("Fleamarket Offer Item Count patched");
|
||||
}
|
||||
|
||||
if (mod.reputation.gain != 0.0000002 || mod.reputation.loss != 0.0000002)
|
||||
|
||||
if (mod.reputation.gain != this.ragfairConfig.sell.reputation.gain || mod.reputation.loss != this.ragfairConfig.sell.reputation.loss)
|
||||
{
|
||||
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||
this.logger.info("Fleamarket Reputation patched");
|
||||
}
|
||||
|
||||
if (mod.time.baseSellTime != 15 || mod.time.minSellTime != 5 || mod.time.maxSellTime != 15)
|
||||
|
||||
if (mod.time.baseSellTime != this.ragfairConfig.sell.time.base || mod.time.minSellTime != this.ragfairConfig.sell.time.min || mod.time.maxSellTime != this.ragfairConfig.sell.time.max)
|
||||
{
|
||||
const sell = this.ragfairConfig.sell;
|
||||
sell.time.base = mod.time.baseSellTime;
|
||||
sell.time.min = mod.time.minSellTime;
|
||||
sell.time.max = mod.time.maxSellTime;
|
||||
const sell = this.ragfairConfig.sell.time;
|
||||
const mod = this.modConfig.time;
|
||||
sell.base = mod.baseSellTime;
|
||||
sell.min = mod.minSellTime;
|
||||
sell.max = mod.maxSellTime;
|
||||
this.logger.info("Fleamarket Sell Times patched");
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { HideoutConfig } from "../config/ts/hideout";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { HideoutConfig } from "../config/ts/hideout";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Hideout
|
||||
{
|
||||
@ -38,18 +38,6 @@ export class Hideout
|
||||
this.updateScavCase();
|
||||
this.logger.info(`Scav Case Time Patched to ${mod.scavCaseTime}`);
|
||||
}
|
||||
|
||||
if (mod.airFilterUnitFlowRate != 0.0047222222222222
|
||||
||mod.generatorFuelFlowRate != 0.0013194444444444
|
||||
||mod.gpuBoostRate != 0.015)
|
||||
{
|
||||
this.hideoutConfig.airFilterUnitFlowRate = mod.airFilterUnitFlowRate;
|
||||
this.hideoutConfig.generatorFuelFlowRate = mod.generatorFuelFlowRate;
|
||||
this.hideoutConfig.gpuBoostRate = mod.gpuBoostRate;
|
||||
this.logger.info(`Air Filter Flow Rate set to ${mod.airFilterUnitFlowRate}`);
|
||||
this.logger.info(`Generator Fuel Flow Rate set to ${mod.generatorFuelFlowRate}`);
|
||||
this.logger.info(`GPU Boost Rate set to ${mod.gpuBoostRate}`);
|
||||
}
|
||||
}
|
||||
|
||||
private updateConstructionTime()
|
||||
|
@ -46,6 +46,13 @@ export class Locations
|
||||
this.logger.info("Extractions Are Extended");
|
||||
}
|
||||
|
||||
// Enables co-op extractions (PMC w/ Scav)
|
||||
if (mod.enableCoopExtracts)
|
||||
{
|
||||
this.coopExtractsEnabled();
|
||||
this.logger.info("Coop Extracts Are Enabled");
|
||||
}
|
||||
|
||||
// Remove the access key "5c94bbff86f7747ee735c08f" (Labs access card) from Labs.
|
||||
if (mod.freeLabsEntry)
|
||||
{
|
||||
@ -108,11 +115,32 @@ export class Locations
|
||||
{
|
||||
for (const x in locations[i].base.exits)
|
||||
{
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||
locations[i].base.exits[x].Name === "lab_Vent")
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train")
|
||||
{
|
||||
if (locations[i].base.exits[x].PassageRequirement !== "None")
|
||||
if (locations[i].base.exits[x].Chance !== 100)
|
||||
{
|
||||
locations[i].base.exits[x].Chance = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private coopExtractsEnabled(): void
|
||||
{
|
||||
const locations = this.tables.getTables().locations;
|
||||
for (const i in locations)
|
||||
{
|
||||
if (i !== "base")
|
||||
for (const x in locations[i].base.exits)
|
||||
{
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||
locations[i].base.exits[x].Name === "lab_Vent")
|
||||
{
|
||||
if (locations[i].base.exits[x].PassageRequirement === "ScavCooperation")
|
||||
{
|
||||
locations[i].base.exits[x].PassageRequirement = "None";
|
||||
}
|
||||
@ -138,9 +166,8 @@ export class Locations
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extractionsExtended(): void
|
||||
|
75
src/loot.ts
75
src/loot.ts
@ -55,27 +55,29 @@ export class Loot
|
||||
{
|
||||
// Customs Marked Room Loot.
|
||||
let spawnPoints = this.tables.getTables().locations.bigmap.looseLoot.spawnpoints;
|
||||
const customsMarked1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)1203364");
|
||||
const customsMarked2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)1198014");
|
||||
const customsMarked3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)1207194");
|
||||
const customsMarked1 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (10)"));
|
||||
const customsMarked2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||
const customsMarked3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||
|
||||
// Pushing containers into the customs marked room loot pool.
|
||||
customsMarked1.itemDistribution.push(...this.containers());
|
||||
customsMarked2.itemDistribution.push(...this.containers());
|
||||
customsMarked3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Reserve Marked Room Loot.
|
||||
spawnPoints = this.tables.getTables().locations.rezervbase.looseLoot.spawnpoints;
|
||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)2248454");
|
||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)2268052");
|
||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)2238562");
|
||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51646628");
|
||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||
|
||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (11)2255712");
|
||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (12)2255152");
|
||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (11)"));
|
||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (12)"));
|
||||
|
||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)2259670");
|
||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (11)2254476");
|
||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (12)2254420");
|
||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51658080");
|
||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (11)"));
|
||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (12)"));
|
||||
|
||||
// Pushing containers into the reserve base marked room loot pool.
|
||||
rsrvRBBK1.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK2.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK3.itemDistribution.push(...this.containers());
|
||||
@ -86,6 +88,45 @@ export class Loot
|
||||
rsrvRBVO1.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO2.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Streets Marked Room Loot.
|
||||
spawnPoints = this.tables.getTables().locations.tarkovstreets.looseLoot.spawnpoints;
|
||||
const streets = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare5491814");
|
||||
const streets1 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (1)"));
|
||||
const streets2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (2)"));
|
||||
const streets3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (3)"));
|
||||
const streets4 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (4)"));
|
||||
const streets5 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (5)"));
|
||||
const streets6 = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (6)3814146");
|
||||
const streets6a = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (6)3955044");
|
||||
const streets7 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (7)"));
|
||||
const streets8 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (8)"));
|
||||
const streets9 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (9)"));
|
||||
const streets10 = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (10)5484984");
|
||||
const streets11 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (11)"));
|
||||
const streets12 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (12)"));
|
||||
const streets13 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (13)"));
|
||||
const streets14 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (14)"));
|
||||
const streets15 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (15)"));
|
||||
|
||||
// Pushing containers into the streets marked room loot pool.
|
||||
streets.itemDistribution.push(...this.containers());
|
||||
streets1.itemDistribution.push(...this.containers());
|
||||
streets2.itemDistribution.push(...this.containers());
|
||||
streets3.itemDistribution.push(...this.containers());
|
||||
streets4.itemDistribution.push(...this.containers());
|
||||
streets5.itemDistribution.push(...this.containers());
|
||||
streets6.itemDistribution.push(...this.containers());
|
||||
streets6a.itemDistribution.push(...this.containers());
|
||||
streets7.itemDistribution.push(...this.containers());
|
||||
streets8.itemDistribution.push(...this.containers());
|
||||
streets9.itemDistribution.push(...this.containers());
|
||||
streets10.itemDistribution.push(...this.containers());
|
||||
streets11.itemDistribution.push(...this.containers());
|
||||
streets12.itemDistribution.push(...this.containers());
|
||||
streets13.itemDistribution.push(...this.containers());
|
||||
streets14.itemDistribution.push(...this.containers());
|
||||
streets15.itemDistribution.push(...this.containers());
|
||||
}
|
||||
|
||||
private containers(): any[]
|
||||
@ -102,7 +143,11 @@ export class Loot
|
||||
* Medicine case: 5aafbcd986f7745e590fff23
|
||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||
* Secure container Gamma: 5857a8bc2459772bad15db29
|
||||
* Secure container Beta: 5857a8b324597729ab0a0e7d
|
||||
* Secure container Alpha: 544a11ac4bdc2d470e8b456a
|
||||
* Secure container Epsilon: 59db794186f77448bc595262
|
||||
* Secure container Kappa: 5c093ca986f7740a1867ab12
|
||||
*/
|
||||
|
||||
const lootItems = [];
|
||||
@ -117,7 +162,11 @@ export class Loot
|
||||
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
||||
lootItems.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 9});
|
||||
lootItems.push({"tpl": "5857a8bc2459772bad15db29", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "5857a8b324597729ab0a0e7d", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "544a11ac4bdc2d470e8b456a", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "59db794186f77448bc595262", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "5c093ca986f7740a1867ab12", "relativeProbability": 1});
|
||||
|
||||
return lootItems;
|
||||
}
|
||||
|
38
src/mod.ts
38
src/mod.ts
@ -1,38 +1,38 @@
|
||||
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 { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { Config } from "../config/ts/config";
|
||||
import { Airdrop } from "./airdrop";
|
||||
import { Ammo } from "./ammo";
|
||||
import { Armor } from "./armor";
|
||||
import { Bots } from "./bots";
|
||||
import { Flea } from "./flea";
|
||||
import { Hideout } from "./hideout";
|
||||
import { Items } from "./items";
|
||||
import { Loot } from "./loot";
|
||||
import { Raid } from "./raid";
|
||||
import { Globals } from "./globals";
|
||||
import { Insurance } from "./insurance";
|
||||
import { Logger } from "./logger";
|
||||
import { Config } from "../config/ts/config";
|
||||
import { Weapons } from "./weapons";
|
||||
import { Containers } from "./containers";
|
||||
import { Flea } from "./flea";
|
||||
import { Globals } from "./globals";
|
||||
import { Hideout } from "./hideout";
|
||||
import { Insurance } from "./insurance";
|
||||
import { Items } from "./items";
|
||||
import { Locations } from "./locations";
|
||||
import { Quests } from "./quests";
|
||||
import { Skills } from "./skills";
|
||||
import { Logger } from "./logger";
|
||||
import { Loot } from "./loot";
|
||||
import { Prewipe } from "./prewipe";
|
||||
import { Quests } from "./quests";
|
||||
import { Raid } from "./raid";
|
||||
import { Skills } from "./skills";
|
||||
import { Traders } from "./traders";
|
||||
import { Weapons } from "./weapons";
|
||||
|
||||
class ValensAIO implements IPostDBLoadMod
|
||||
{
|
||||
|
18
src/raid.ts
18
src/raid.ts
@ -1,7 +1,7 @@
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { Logger } from "./logger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { RaidConfig } from "../config/ts/raid";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Raid
|
||||
{
|
||||
@ -33,7 +33,7 @@ export class Raid
|
||||
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
||||
}
|
||||
|
||||
if (mod.timeLimit)
|
||||
if (mod.timeLimit.enabled)
|
||||
{
|
||||
const maps = this.tables.getTables().locations;
|
||||
|
||||
@ -41,14 +41,14 @@ export class Raid
|
||||
{
|
||||
if (this.tables.getTables().locations[map].base?.EscapeTimeLimit)
|
||||
{
|
||||
this.tables.getTables().locations[map].base.EscapeTimeLimit = this.modConfig.timeLimit;
|
||||
this.tables.getTables().locations[map].base.EscapeTimeLimit = this.modConfig.timeLimit.raidTime;
|
||||
}
|
||||
}
|
||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit.raidTime} minutes.`);
|
||||
}
|
||||
|
||||
if (mod.aiAmount.toLowerCase() != "asonline" ||mod.aiDifficulty.toLowerCase() != "asonline" ||mod.bossEnabled != true
|
||||
||mod.scavWars != false ||mod.taggedAndCursed != false ||mod.enablePve != false)
|
||||
if (mod.aiAmount.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiAmount || mod.aiDifficulty.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiDifficulty || mod.bossEnabled != true
|
||||
|| mod.scavWars != this.inRaidConfig.raidMenuSettings.scavWars || mod.taggedAndCursed != this.inRaidConfig.raidMenuSettings.taggedAndCursed || mod.enablePve != this.inRaidConfig.raidMenuSettings.enablePve)
|
||||
{
|
||||
const inRaidConfig = this.inRaidConfig;
|
||||
|
||||
@ -66,13 +66,13 @@ export class Raid
|
||||
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||
}
|
||||
|
||||
if (mod.carExtractBaseStandingGain != 0.25)
|
||||
if (mod.carExtractBaseStandingGain != this.inRaidConfig.carExtractBaseStandingGain)
|
||||
{
|
||||
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||
}
|
||||
|
||||
if (mod.scavExtractGain != 0.01)
|
||||
if (mod.scavExtractGain != this.inRaidConfig.scavExtractGain)
|
||||
{
|
||||
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||
|
@ -86,10 +86,10 @@ export class Traders
|
||||
|
||||
trader.partialRefreshTimeSeconds = mod.partialRefreshTimeSeconds;
|
||||
trader.partialRefreshChangePercent = mod.partialRefreshChangePercent;
|
||||
trader.assortSize = mod.assortSize;
|
||||
trader.discountOptions.assortSize = mod.assortSize;
|
||||
trader.maxPresetsPercent = mod.maxPresetsPercent;
|
||||
trader.itemPriceMult = mod.itemPriceMult;
|
||||
trader.presetPriceMult = mod.presetPriceMult;
|
||||
trader.discountOptions.itemPriceMult = mod.itemPriceMult;
|
||||
trader.discountOptions.presetPriceMult = mod.presetPriceMult;
|
||||
trader.regenerateAssortsOnRefresh = mod.regenerateAssortsOnRefresh;
|
||||
trader.itemTypeLimits = mod.itemTypeLimits;
|
||||
trader.presetMaxDurabilityPercentMinMax = mod.presetMaxDurabilityPercentMinMax;
|
||||
|
5
types/callbacks/DataCallbacks.d.ts
vendored
5
types/callbacks/DataCallbacks.d.ts
vendored
@ -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>;
|
||||
}
|
||||
|
2
types/callbacks/DialogueCallbacks.d.ts
vendored
2
types/callbacks/DialogueCallbacks.d.ts
vendored
@ -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;
|
||||
|
2
types/callbacks/HandbookCallbacks.d.ts
vendored
2
types/callbacks/HandbookCallbacks.d.ts
vendored
@ -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>;
|
||||
|
22
types/callbacks/HideoutCallbacks.d.ts
vendored
22
types/callbacks/HideoutCallbacks.d.ts
vendored
@ -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
|
||||
*/
|
||||
|
2
types/callbacks/HttpCallbacks.d.ts
vendored
2
types/callbacks/HttpCallbacks.d.ts
vendored
@ -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>;
|
||||
|
2
types/callbacks/InsuranceCallbacks.d.ts
vendored
2
types/callbacks/InsuranceCallbacks.d.ts
vendored
@ -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;
|
||||
|
5
types/callbacks/ModCallbacks.d.ts
vendored
5
types/callbacks/ModCallbacks.d.ts
vendored
@ -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 };
|
||||
|
2
types/callbacks/PresetCallbacks.d.ts
vendored
2
types/callbacks/PresetCallbacks.d.ts
vendored
@ -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>;
|
||||
|
5
types/callbacks/RagfairCallbacks.d.ts
vendored
5
types/callbacks/RagfairCallbacks.d.ts
vendored
@ -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;
|
||||
|
5
types/callbacks/SaveCallbacks.d.ts
vendored
5
types/callbacks/SaveCallbacks.d.ts
vendored
@ -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>;
|
||||
|
3
types/callbacks/TradeCallbacks.d.ts
vendored
3
types/callbacks/TradeCallbacks.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
5
types/callbacks/TraderCallbacks.d.ts
vendored
5
types/callbacks/TraderCallbacks.d.ts
vendored
@ -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);
|
||||
|
4
types/controllers/BotController.d.ts
vendored
4
types/controllers/BotController.d.ts
vendored
@ -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
|
||||
|
22
types/controllers/GameController.d.ts
vendored
22
types/controllers/GameController.d.ts
vendored
@ -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
|
||||
|
18
types/controllers/HealthController.d.ts
vendored
18
types/controllers/HealthController.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
114
types/controllers/HideoutController.d.ts
vendored
114
types/controllers/HideoutController.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
12
types/controllers/InsuranceController.d.ts
vendored
12
types/controllers/InsuranceController.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
9
types/controllers/InventoryController.d.ts
vendored
9
types/controllers/InventoryController.d.ts
vendored
@ -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;
|
||||
|
6
types/controllers/MatchController.d.ts
vendored
6
types/controllers/MatchController.d.ts
vendored
@ -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;
|
||||
|
7
types/controllers/QuestController.d.ts
vendored
7
types/controllers/QuestController.d.ts
vendored
@ -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
|
||||
|
5
types/controllers/RagfairController.d.ts
vendored
5
types/controllers/RagfairController.d.ts
vendored
@ -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;
|
||||
|
18
types/controllers/RepeatableQuestController.d.ts
vendored
18
types/controllers/RepeatableQuestController.d.ts
vendored
@ -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;
|
||||
|
18
types/controllers/TradeController.d.ts
vendored
18
types/controllers/TradeController.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
7
types/controllers/TraderController.d.ts
vendored
7
types/controllers/TraderController.d.ts
vendored
@ -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[][]>;
|
||||
|
2
types/controllers/WishlistController.d.ts
vendored
2
types/controllers/WishlistController.d.ts
vendored
@ -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);
|
||||
|
2
types/di/OnLoad.d.ts
vendored
2
types/di/OnLoad.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
export declare class OnLoad {
|
||||
export interface OnLoad {
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
7
types/di/OnLoadOnUpdate.d.ts
vendored
7
types/di/OnLoadOnUpdate.d.ts
vendored
@ -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;
|
||||
}
|
2
types/di/OnUpdate.d.ts
vendored
2
types/di/OnUpdate.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
export declare class OnUpdate {
|
||||
export interface OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -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;
|
||||
|
13
types/generators/BotGenerator.d.ts
vendored
13
types/generators/BotGenerator.d.ts
vendored
@ -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
|
||||
|
4
types/generators/BotLootGenerator.d.ts
vendored
4
types/generators/BotLootGenerator.d.ts
vendored
@ -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
|
||||
|
14
types/generators/BotWeaponGenerator.d.ts
vendored
14
types/generators/BotWeaponGenerator.d.ts
vendored
@ -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
|
||||
|
3
types/generators/LocationGenerator.d.ts
vendored
3
types/generators/LocationGenerator.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
26
types/generators/PMCLootGenerator.d.ts
vendored
26
types/generators/PMCLootGenerator.d.ts
vendored
@ -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[];
|
||||
}
|
||||
|
12
types/generators/PlayerScavGenerator.d.ts
vendored
12
types/generators/PlayerScavGenerator.d.ts
vendored
@ -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
|
||||
|
4
types/generators/RagfairAssortGenerator.d.ts
vendored
4
types/generators/RagfairAssortGenerator.d.ts
vendored
@ -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
|
||||
|
31
types/generators/RagfairOfferGenerator.d.ts
vendored
31
types/generators/RagfairOfferGenerator.d.ts
vendored
@ -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
|
||||
|
@ -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
|
||||
|
10
types/generators/weapongen/implementations/UbglExternalMagGen.d.ts
vendored
Normal file
10
types/generators/weapongen/implementations/UbglExternalMagGen.d.ts
vendored
Normal 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;
|
||||
}
|
20
types/helpers/AssortHelper.d.ts
vendored
20
types/helpers/AssortHelper.d.ts
vendored
@ -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;
|
||||
/**
|
||||
|
2
types/helpers/BotDifficultyHelper.d.ts
vendored
2
types/helpers/BotDifficultyHelper.d.ts
vendored
@ -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
|
||||
*/
|
||||
|
6
types/helpers/BotGeneratorHelper.d.ts
vendored
6
types/helpers/BotGeneratorHelper.d.ts
vendored
@ -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;
|
||||
|
16
types/helpers/BotHelper.d.ts
vendored
16
types/helpers/BotHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
19
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
19
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
@ -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
|
||||
|
10
types/helpers/DurabilityLimitsHelper.d.ts
vendored
10
types/helpers/DurabilityLimitsHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
22
types/helpers/HealthHelper.d.ts
vendored
22
types/helpers/HealthHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
71
types/helpers/HideoutHelper.d.ts
vendored
71
types/helpers/HideoutHelper.d.ts
vendored
@ -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
|
||||
|
4
types/helpers/InRaidHelper.d.ts
vendored
4
types/helpers/InRaidHelper.d.ts
vendored
@ -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
|
||||
*/
|
||||
|
2
types/helpers/InventoryHelper.d.ts
vendored
2
types/helpers/InventoryHelper.d.ts
vendored
@ -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: {
|
||||
|
18
types/helpers/ItemHelper.d.ts
vendored
18
types/helpers/ItemHelper.d.ts
vendored
@ -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
|
||||
|
2
types/helpers/NotificationSendHelper.d.ts
vendored
2
types/helpers/NotificationSendHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
2
types/helpers/ProfileHelper.d.ts
vendored
2
types/helpers/ProfileHelper.d.ts
vendored
@ -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;
|
||||
|
93
types/helpers/QuestHelper.d.ts
vendored
93
types/helpers/QuestHelper.d.ts
vendored
@ -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
|
||||
*/
|
||||
|
23
types/helpers/RagfairOfferHelper.d.ts
vendored
23
types/helpers/RagfairOfferHelper.d.ts
vendored
@ -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
|
||||
|
2
types/helpers/RagfairSellHelper.d.ts
vendored
2
types/helpers/RagfairSellHelper.d.ts
vendored
@ -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[];
|
||||
}
|
||||
|
2
types/helpers/RagfairSortHelper.d.ts
vendored
2
types/helpers/RagfairSortHelper.d.ts
vendored
@ -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
|
||||
|
9
types/helpers/RepairHelper.d.ts
vendored
9
types/helpers/RepairHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
8
types/helpers/TradeHelper.d.ts
vendored
8
types/helpers/TradeHelper.d.ts
vendored
@ -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
|
||||
*/
|
||||
|
8
types/helpers/TraderAssortHelper.d.ts
vendored
8
types/helpers/TraderAssortHelper.d.ts
vendored
@ -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
|
||||
|
33
types/helpers/TraderHelper.d.ts
vendored
33
types/helpers/TraderHelper.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
7
types/loaders/BundleLoader.d.ts
vendored
7
types/loaders/BundleLoader.d.ts
vendored
@ -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
43
types/loaders/ModTypeCheck.d.ts
vendored
Normal 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;
|
||||
}
|
14
types/loaders/PostAkiModLoader.d.ts
vendored
14
types/loaders/PostAkiModLoader.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
6
types/loaders/PostDBModLoader.d.ts
vendored
6
types/loaders/PostDBModLoader.d.ts
vendored
@ -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>;
|
||||
}
|
||||
|
42
types/loaders/PreAkiModLoader.d.ts
vendored
42
types/loaders/PreAkiModLoader.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
5
types/models/eft/common/IGlobals.d.ts
vendored
5
types/models/eft/common/IGlobals.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
1
types/models/eft/common/ILocationBase.d.ts
vendored
1
types/models/eft/common/ILocationBase.d.ts
vendored
@ -180,6 +180,7 @@ export interface Exit {
|
||||
EntryPoints: string;
|
||||
ExfiltrationTime: number;
|
||||
ExfiltrationType: string;
|
||||
RequiredSlot?: string;
|
||||
Id: string;
|
||||
MaxTime: number;
|
||||
MinTime: number;
|
||||
|
13
types/models/eft/common/tables/IBotBase.d.ts
vendored
13
types/models/eft/common/tables/IBotBase.d.ts
vendored
@ -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;
|
||||
|
11
types/models/eft/common/tables/IItem.d.ts
vendored
11
types/models/eft/common/tables/IItem.d.ts
vendored
@ -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;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ export interface TemplateSide {
|
||||
export interface ProfileTraderTemplate {
|
||||
initialLoyaltyLevel: number;
|
||||
setQuestsAvailableForStart?: boolean;
|
||||
setQuestsAvailableForFinish?: boolean;
|
||||
initialStanding: number;
|
||||
initialSalesSum: number;
|
||||
jaegerUnlocked: boolean;
|
||||
|
6
types/models/eft/common/tables/IQuest.d.ts
vendored
6
types/models/eft/common/tables/IQuest.d.ts
vendored
@ -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;
|
||||
|
@ -47,6 +47,7 @@ export interface IRepeatableQuest {
|
||||
canShowNotificationsInGame: boolean;
|
||||
rewards: IRewards;
|
||||
conditions: IConditions;
|
||||
side: string;
|
||||
name: string;
|
||||
note: string;
|
||||
description: string;
|
||||
|
@ -159,7 +159,7 @@ export interface Props {
|
||||
RigLayoutName?: string;
|
||||
MaxDurability?: number;
|
||||
armorZone?: string[];
|
||||
armorClass?: any;
|
||||
armorClass?: string | number;
|
||||
mousePenalty?: number;
|
||||
weaponErgonomicPenalty?: number;
|
||||
BluntThroughput?: number;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export interface IHideoutContinousProductionStartRequestData {
|
||||
export interface IHideoutContinuousProductionStartRequestData {
|
||||
Action: "HideoutContinuousProductionStart";
|
||||
recipeId: string;
|
||||
timestamp: number;
|
@ -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;
|
||||
}
|
||||
|
4
types/models/eft/match/IJoinMatchResult.d.ts
vendored
4
types/models/eft/match/IJoinMatchResult.d.ts
vendored
@ -6,6 +6,8 @@ export interface IJoinMatchResult {
|
||||
port: number;
|
||||
version: string;
|
||||
location: string;
|
||||
gamemode: string;
|
||||
raidMode: string;
|
||||
mode: string;
|
||||
shortid: string;
|
||||
additional_info: any[];
|
||||
}
|
||||
|
@ -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[];
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user