Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
509cdff8b6 | |||
30744551f0 | |||
23ab7efadf | |||
c3866d0360 | |||
a1f8fe37a1 | |||
cc58998345 | |||
90db74d535 | |||
cce9f573ba | |||
37d356736c | |||
41c3dd6c83 | |||
df9a522516 | |||
c145035717 | |||
1fc77d6bdf | |||
7d9783d7b5 | |||
4f863a37b0 | |||
5ec21767c5 | |||
74de872205 | |||
a4d907a76b | |||
2c7493853f | |||
96301881d1 |
Binary file not shown.
@ -1,25 +1,42 @@
|
|||||||
{
|
{
|
||||||
"airdropChancePercent":
|
"airdropChancePercent":
|
||||||
{
|
{
|
||||||
"bigmap": 25,
|
"bigmap": 20,
|
||||||
"woods": 25,
|
"woods": 25,
|
||||||
"lighthouse": 25,
|
"lighthouse": 20,
|
||||||
"shoreline": 25,
|
"shoreline": 20,
|
||||||
"interchange": 25,
|
"interchange": 20,
|
||||||
"reserve": 25
|
"reserve": 10,
|
||||||
|
"tarkovStreets": 12
|
||||||
},
|
},
|
||||||
|
|
||||||
"airdropMinStartTimeSeconds": 60,
|
"airdropMinStartTimeSeconds": 60,
|
||||||
"airdropMaxStartTimeSeconds": 300,
|
"airdropMaxStartTimeSeconds": 300,
|
||||||
"planeMinFlyHeight": 400,
|
"planeMinFlyHeight": 400,
|
||||||
"planeMaxFlyHeight": 500,
|
"planeMaxFlyHeight": 500,
|
||||||
"planeVolume": 0.5,
|
"planeVolume": 0.5,
|
||||||
|
"planeSpeed": 65,
|
||||||
"loot":
|
"crateFallSpeed": 3,
|
||||||
{
|
"loot": {
|
||||||
"presetCount": { "min": 3, "max": 5},
|
"presetCount": {
|
||||||
"itemCount": { "min": 12, "max": 25},
|
"min": 3,
|
||||||
"itemBlacklist": ["5e997f0b86f7741ac73993e2"],
|
"max": 5
|
||||||
|
},
|
||||||
|
"itemCount": {
|
||||||
|
"min": 12,
|
||||||
|
"max": 25
|
||||||
|
},
|
||||||
|
"itemBlacklist": [
|
||||||
|
"5e997f0b86f7741ac73993e2",
|
||||||
|
"5b44abe986f774283e2e3512",
|
||||||
|
"5e99711486f7744bfc4af328",
|
||||||
|
"5e99735686f7744bfc4af32c",
|
||||||
|
"6087e570b998180e9f76dc24",
|
||||||
|
"5d52d479a4b936793d58c76b",
|
||||||
|
"5e85aac65505fa48730d8af2",
|
||||||
|
"63495c500c297e20065a08b1",
|
||||||
|
"5cde8864d7f00c0010373be1",
|
||||||
|
"5b3b713c5acfc4330140bd8d"
|
||||||
|
],
|
||||||
"itemTypeWhitelist": [
|
"itemTypeWhitelist": [
|
||||||
"543be5dd4bdc2deb348b4569",
|
"543be5dd4bdc2deb348b4569",
|
||||||
"5485a8684bdc2da71d8b4567",
|
"5485a8684bdc2da71d8b4567",
|
||||||
@ -33,6 +50,7 @@
|
|||||||
"5448e53e4bdc2d60728b4567",
|
"5448e53e4bdc2d60728b4567",
|
||||||
"5448f3a64bdc2d60728b456a",
|
"5448f3a64bdc2d60728b456a",
|
||||||
"5448f3ac4bdc2dce718b4569",
|
"5448f3ac4bdc2dce718b4569",
|
||||||
|
"55818ad54bdc2ddc698b4569",
|
||||||
"55818af64bdc2d5b648b4570",
|
"55818af64bdc2d5b648b4570",
|
||||||
"55818b0e4bdc2dde698b456e",
|
"55818b0e4bdc2dde698b456e",
|
||||||
"5448bc234bdc2d3c308b4569",
|
"5448bc234bdc2d3c308b4569",
|
||||||
@ -42,9 +60,17 @@
|
|||||||
"55818add4bdc2d5b648b456f",
|
"55818add4bdc2d5b648b456f",
|
||||||
"543be6564bdc2df4348b4568",
|
"543be6564bdc2df4348b4568",
|
||||||
"57864bb7245977548b3b66c2",
|
"57864bb7245977548b3b66c2",
|
||||||
"550aa4cd4bdc2dd8348b456c"],
|
"550aa4cd4bdc2dd8348b456c",
|
||||||
|
"5448f39d4bdc2d0a728b4568",
|
||||||
|
"5448f3a14bdc2d27728b4569",
|
||||||
|
"5447e1d04bdc2dff2f8b4567",
|
||||||
|
"55818b164bdc2ddc698b456c",
|
||||||
|
"55818ae44bdc2dde698b456c"
|
||||||
|
],
|
||||||
"itemLimits": {
|
"itemLimits": {
|
||||||
"5447b5cf4bdc2d65278b4567": 1,
|
"5447b5cf4bdc2d65278b4567": 1,
|
||||||
|
"5448e8d04bdc2ddf718b4569": 3,
|
||||||
|
"5448e8d64bdc2dce718b4568": 3,
|
||||||
"5448bc234bdc2d3c308b4569": 3,
|
"5448bc234bdc2d3c308b4569": 3,
|
||||||
"5448f3a64bdc2d60728b456a": 3,
|
"5448f3a64bdc2d60728b456a": 3,
|
||||||
"5448e54d4bdc2dcc718b4568": 3,
|
"5448e54d4bdc2dcc718b4568": 3,
|
||||||
@ -56,7 +82,37 @@
|
|||||||
"5448e5724bdc2ddf718b4568": 2,
|
"5448e5724bdc2ddf718b4568": 2,
|
||||||
"55818add4bdc2d5b648b456f": 2,
|
"55818add4bdc2d5b648b456f": 2,
|
||||||
"543be6564bdc2df4348b4568": 3,
|
"543be6564bdc2df4348b4568": 3,
|
||||||
"57864bb7245977548b3b66c2": 2,
|
"550aa4cd4bdc2dd8348b456c": 2,
|
||||||
"550aa4cd4bdc2dd8348b456c": 2}
|
"5448f39d4bdc2d0a728b4568": 4,
|
||||||
|
"5448f3a14bdc2d27728b4569": 2,
|
||||||
|
"5447e1d04bdc2dff2f8b4567": 1,
|
||||||
|
"55818ad54bdc2ddc698b4569": 3,
|
||||||
|
"55818b164bdc2ddc698b456c": 2,
|
||||||
|
"55818ae44bdc2dde698b456c": 2,
|
||||||
|
"5448e5284bdc2dcb718b4567": 2
|
||||||
|
},
|
||||||
|
"itemStackLimits": {
|
||||||
|
"5fc382a9d724d907e2077dab": {
|
||||||
|
"min": 5,
|
||||||
|
"max": 5
|
||||||
|
},
|
||||||
|
"59e690b686f7746c9f75e848": {
|
||||||
|
"min": 10,
|
||||||
|
"max": 25
|
||||||
|
},
|
||||||
|
"5449016a4bdc2d6f028b456f": {
|
||||||
|
"min": 5000,
|
||||||
|
"max": 50000
|
||||||
|
},
|
||||||
|
"569668774bdc2da2298b4568": {
|
||||||
|
"min": 100,
|
||||||
|
"max": 500
|
||||||
|
},
|
||||||
|
"5696686a4bdc2da3298b456a": {
|
||||||
|
"min": 100,
|
||||||
|
"max": 500
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"armorLevelWhitelist": [0, 4, 5, 6]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,11 +5,23 @@
|
|||||||
"chance": 100
|
"chance": 100
|
||||||
},
|
},
|
||||||
|
|
||||||
"maxBotCap": 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":
|
"pmc":
|
||||||
{
|
{
|
||||||
"chanceSameSideIsHostile": 50,
|
"chanceSameSideIsHostilePercent": 80,
|
||||||
"containersOnPMCs": true,
|
"containersOnPMCs": true,
|
||||||
"isUsec": 50,
|
"isUsec": 50,
|
||||||
"lootNValue": 3,
|
"lootNValue": 3,
|
||||||
@ -21,29 +33,32 @@
|
|||||||
{
|
{
|
||||||
"assault":
|
"assault":
|
||||||
{
|
{
|
||||||
"min": 15,
|
"min": 20,
|
||||||
"max": 40
|
"max": 30
|
||||||
},
|
},
|
||||||
"cursedAssault":
|
"cursedassault":
|
||||||
{
|
|
||||||
"min": 15,
|
|
||||||
"max": 40
|
|
||||||
},
|
|
||||||
"pmcBot":
|
|
||||||
{
|
{
|
||||||
"min": 15,
|
"min": 15,
|
||||||
"max": 30
|
"max": 30
|
||||||
},
|
},
|
||||||
"exUsec":
|
"pmcbot":
|
||||||
|
{
|
||||||
|
"min": 15,
|
||||||
|
"max": 25
|
||||||
|
},
|
||||||
|
"exusec":
|
||||||
{
|
{
|
||||||
"min": 5,
|
"min": 5,
|
||||||
"max": 20
|
"max": 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"useDifficultyOverride": false,
|
||||||
|
"difficulty": "AsOnline",
|
||||||
|
"botRelativeLevelDeltaMax": 10,
|
||||||
|
|
||||||
"difficultyWeights":
|
"difficultyWeights":
|
||||||
{
|
{
|
||||||
"difficulty": "asonline",
|
|
||||||
"useWeights": false,
|
"useWeights": false,
|
||||||
"weights":
|
"weights":
|
||||||
{
|
{
|
||||||
@ -55,7 +70,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"looseWeaponInBackpackChance": 15,
|
"looseWeaponInBackpackChance": 15,
|
||||||
"looseWeaponInBackpackLoot":
|
"looseWeaponInBackpackLootMinMax":
|
||||||
{
|
{
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"max": 1
|
"max": 1
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"minUserLevel": 15,
|
"minUserLevel": 15,
|
||||||
|
"runIntervalSeconds": 45,
|
||||||
|
|
||||||
"blacklist":
|
"blacklist":
|
||||||
{
|
{
|
||||||
@ -9,9 +10,48 @@
|
|||||||
|
|
||||||
"condition":
|
"condition":
|
||||||
{
|
{
|
||||||
|
"5422acb9af1c889c16000029": {
|
||||||
|
"_name": "WEAPON",
|
||||||
"conditionChance": 0.2,
|
"conditionChance": 0.2,
|
||||||
"min": 0.6,
|
"min": 0.6,
|
||||||
"max": 1.0
|
"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":
|
"currencies":
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
{
|
{
|
||||||
"airFilterUnitFlowRate": 0.0047222222222222,
|
|
||||||
"constructionTime": 1,
|
"constructionTime": 1,
|
||||||
"generatorFuelFlowRate": 0.0013194444444444,
|
|
||||||
"gpuBoostRate": 0.015,
|
|
||||||
"productionTime": 1,
|
"productionTime": 1,
|
||||||
"scavCaseTime": 1
|
"scavCaseTime": 1
|
||||||
}
|
}
|
@ -7,7 +7,7 @@
|
|||||||
"maxHr": 36,
|
"maxHr": 36,
|
||||||
"storageMaxHr": 96,
|
"storageMaxHr": 96,
|
||||||
"priceCoef": 0.16,
|
"priceCoef": 0.16,
|
||||||
"returnChance": 80
|
"returnChance": 75
|
||||||
},
|
},
|
||||||
|
|
||||||
"therapist":
|
"therapist":
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
"freeLabsEntry": false,
|
"freeLabsEntry": false,
|
||||||
"exfilTime": 8,
|
"exfilTime": 8,
|
||||||
"extractionsExtended": false,
|
"extractionsExtended": false,
|
||||||
|
"enableCoopExtracts": false,
|
||||||
"noExtractRestrictions": false
|
"noExtractRestrictions": false
|
||||||
}
|
}
|
@ -3,9 +3,15 @@
|
|||||||
"chompiesBossFix": true,
|
"chompiesBossFix": true,
|
||||||
"fixOpenZones": true,
|
"fixOpenZones": true,
|
||||||
"scavExtractGain": 0.01,
|
"scavExtractGain": 0.01,
|
||||||
"timeLimit": 60,
|
|
||||||
"aiAmount": "asonline",
|
"timeLimit":
|
||||||
"aiDifficulty": "asonline",
|
{
|
||||||
|
"enabled": false,
|
||||||
|
"raidTime": 60
|
||||||
|
},
|
||||||
|
|
||||||
|
"aiAmount": "AsOnline",
|
||||||
|
"aiDifficulty": "AsOnline",
|
||||||
"bossEnabled": true,
|
"bossEnabled": true,
|
||||||
"scavWars": false,
|
"scavWars": false,
|
||||||
"taggedAndCursed": false,
|
"taggedAndCursed": false,
|
||||||
|
@ -41,21 +41,76 @@
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
"minDurabilityForSale": 60,
|
"updateTimeDefault": 3600,
|
||||||
|
"durabilityPurchaseThreshhold": {
|
||||||
|
"54cb50c76803fa8b248b4571": 60,
|
||||||
|
"54cb57776803fa99248b456e": 60,
|
||||||
|
"579dc571d53a0658a154fbec": 0,
|
||||||
|
"58330581ace78e27b8b10cee": 60,
|
||||||
|
"5935c25fb3acc3127c3d8cd9": 60,
|
||||||
|
"5a7c2eca46aef81a7ca2145d": 60,
|
||||||
|
"5ac3b934156ae10c4430e83c": 60,
|
||||||
|
"5c0647fdd443bc2504c2d371": 60,
|
||||||
|
"default": 60
|
||||||
|
},
|
||||||
"traderPriceMultipler": 1,
|
"traderPriceMultipler": 1,
|
||||||
|
"persistPurchaseDataInProfile": true,
|
||||||
"fence":
|
"fence": {
|
||||||
{
|
|
||||||
"partialRefreshTimeSeconds": 240,
|
"partialRefreshTimeSeconds": 240,
|
||||||
"partialRefreshChangePercent": 15,
|
"partialRefreshChangePercent": 15,
|
||||||
"assortSize": 100,
|
"assortSize": 50,
|
||||||
"maxPresetsPercent": 5,
|
"maxPresetsPercent": 5,
|
||||||
"presetPriceMult": 2.5,
|
"itemPriceMult": 0.8,
|
||||||
"blacklist": ["5661632d4bdc2d903d8b456b",
|
"presetPriceMult": 1.5,
|
||||||
|
"regenerateAssortsOnRefresh": false,
|
||||||
|
"itemTypeLimits": {
|
||||||
|
"550aa4bf4bdc2dd6348b456b": 3,
|
||||||
|
"55818add4bdc2d5b648b456f": 5,
|
||||||
|
"5448bc234bdc2d3c308b4569": 5,
|
||||||
|
"55818b224bdc2dde698b456f": 5,
|
||||||
|
"555ef6e44bdc2de9068b457e": 5,
|
||||||
|
"5a341c4086f77401f2541505": 5,
|
||||||
|
"55818ad54bdc2ddc698b4569": 5,
|
||||||
|
"5448e53e4bdc2d60728b4567": 5,
|
||||||
|
"55818ac54bdc2d5b648b456e": 5,
|
||||||
|
"55818af64bdc2d5b648b4570": 5,
|
||||||
|
"55818a304bdc2db5418b457d": 4,
|
||||||
|
"5a74651486f7744e73386dd1": 5,
|
||||||
|
"55818a594bdc2db9688b456a": 5,
|
||||||
|
"55818a104bdc2db9688b4569": 5,
|
||||||
|
"55818a684bdc2ddd698b456d": 3,
|
||||||
|
"550aa4cd4bdc2dd8348b456c": 3,
|
||||||
|
"55818acf4bdc2dde698b456b": 5,
|
||||||
|
"55818a6f4bdc2db9688b456b": 5,
|
||||||
|
"5447b5f14bdc2d61278b4567": 3,
|
||||||
|
"5447b5cf4bdc2d65278b4567": 5,
|
||||||
|
"5447b6094bdc2dc3278b4567": 5,
|
||||||
|
"5447b5e04bdc2d62278b4567": 5,
|
||||||
|
"55818b164bdc2ddc698b456c": 3,
|
||||||
|
"617f1ef5e8b54b0998387733": 2,
|
||||||
|
"5448ecbe4bdc2d60728b4568": 2,
|
||||||
|
"57864a66245977548f04a81f": 2,
|
||||||
|
"5a341c4686f77469e155819e": 3,
|
||||||
|
"57864a3d24597754843f8721": 2,
|
||||||
|
"5448e54d4bdc2dcc718b4568": 4,
|
||||||
|
"5448f39d4bdc2d0a728b4568": 5,
|
||||||
|
"5795f317245977243854e041": 3
|
||||||
|
},
|
||||||
|
"presetMaxDurabilityPercentMinMax":{
|
||||||
|
"min": 35,
|
||||||
|
"max": 60
|
||||||
|
},
|
||||||
|
"armorMaxDurabilityPercentMinMax":{
|
||||||
|
"min": 35,
|
||||||
|
"max": 60
|
||||||
|
},
|
||||||
|
"blacklist": [
|
||||||
|
"5661632d4bdc2d903d8b456b",
|
||||||
"543be5e94bdc2df1348b4568",
|
"543be5e94bdc2df1348b4568",
|
||||||
"543be6674bdc2df1348b4569",
|
"543be6674bdc2df1348b4569",
|
||||||
"5448bf274bdc2dfc2f8b456a",
|
"5448bf274bdc2dfc2f8b456a",
|
||||||
"543be5664bdc2dd4348b4569",
|
"5447bedf4bdc2d87278b4568",
|
||||||
"5447bedf4bdc2d87278b4568"]
|
"6275303a9f372d6ea97f9ec7"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,36 +1,14 @@
|
|||||||
|
import { AirdropChancePercent, AirdropLoot } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
|
|
||||||
export interface AirdropConfig
|
export interface AirdropConfig
|
||||||
{
|
{
|
||||||
airdropChancePercent: AirdropChancePercent;
|
airdropChancePercent: AirdropChancePercent;
|
||||||
planeMinFlyHeight: number;
|
planeMinFlyHeight: number;
|
||||||
planeMaxFlyHeight: number;
|
planeMaxFlyHeight: number;
|
||||||
planeVolume: number;
|
planeVolume: number;
|
||||||
|
planeSpeed: number;
|
||||||
|
crateFallSpeed: number;
|
||||||
airdropMinStartTimeSeconds: number;
|
airdropMinStartTimeSeconds: number;
|
||||||
airdropMaxStartTimeSeconds: number;
|
airdropMaxStartTimeSeconds: number;
|
||||||
loot: AirdropLoot;
|
loot: AirdropLoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AirdropChancePercent
|
|
||||||
{
|
|
||||||
bigmap: number;
|
|
||||||
woods: number;
|
|
||||||
lighthouse: number;
|
|
||||||
shoreline: number;
|
|
||||||
interchange: number;
|
|
||||||
reserve: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AirdropLoot
|
|
||||||
{
|
|
||||||
presetCount: MinMax;
|
|
||||||
itemCount: MinMax;
|
|
||||||
itemBlacklist: string[];
|
|
||||||
itemTypeWhitelist: string[];
|
|
||||||
/** key: item base type: value: max count */
|
|
||||||
itemLimits: Record<string, number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MinMax
|
|
||||||
{
|
|
||||||
max: number;
|
|
||||||
min: number;
|
|
||||||
}
|
|
||||||
|
@ -1,9 +1,37 @@
|
|||||||
|
import { MinMax } from "@spt-aki/models/common/MinMax";
|
||||||
|
import { DynamicLoot } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
|
|
||||||
export interface BotsConfig
|
export interface BotsConfig
|
||||||
{
|
{
|
||||||
bossChance: BossChance
|
bossChance: BossChance;
|
||||||
maxBotCap: number
|
botGenerationBatchSizePerType: number;
|
||||||
pmc: Pmc
|
maxBotCap: MaxBotCap;
|
||||||
scav: Scav
|
pmc: IPmcConfig;
|
||||||
|
scav: Scav;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IPmcConfig
|
||||||
|
{
|
||||||
|
dynamicLoot: DynamicLoot;
|
||||||
|
useDifficultyOverride: boolean;
|
||||||
|
difficulty: string;
|
||||||
|
looseWeaponInBackpackChancePercent: number;
|
||||||
|
looseWeaponInBackpackLootMinMax: MinMax;
|
||||||
|
isUsec: number;
|
||||||
|
usecType: string;
|
||||||
|
bearType: string;
|
||||||
|
chanceSameSideIsHostilePercent: number;
|
||||||
|
/** key: location, value: type for usec/bear */
|
||||||
|
pmcType: Record<string, Record<string, Record<string, number>>>;
|
||||||
|
maxBackpackLootTotalRub: number;
|
||||||
|
maxPocketLootTotalRub: number;
|
||||||
|
maxVestLootTotalRub: number;
|
||||||
|
convertIntoPmcChance: Record<string, MinMax>;
|
||||||
|
enemyTypes: string[];
|
||||||
|
botRelativeLevelDeltaMax: number;
|
||||||
|
containersOnPMCs: boolean;
|
||||||
|
lootNValue: number;
|
||||||
|
difficultyWeights: DifficultyWeights;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BossChance
|
export interface BossChance
|
||||||
@ -12,24 +40,8 @@ export interface BossChance
|
|||||||
chance: number
|
chance: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Pmc
|
|
||||||
{
|
|
||||||
chanceSameSideIsHostile: number
|
|
||||||
containersOnPMCs: boolean
|
|
||||||
isUsec: number
|
|
||||||
lootNValue: number
|
|
||||||
maxBackpackLootTotalRub: number
|
|
||||||
maxPocketLootTotalRub: number
|
|
||||||
maxVestLootTotalRub: number
|
|
||||||
difficultyWeights: DifficultyWeights
|
|
||||||
convertIntoPmcChance: ConvertIntoPmcChance
|
|
||||||
looseWeaponInBackpackChance: number
|
|
||||||
looseWeaponInBackpackLoot: LooseWeapon
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DifficultyWeights
|
export interface DifficultyWeights
|
||||||
{
|
{
|
||||||
difficulty: string
|
|
||||||
useWeights: boolean
|
useWeights: boolean
|
||||||
weights: Record<string, number>
|
weights: Record<string, number>
|
||||||
}
|
}
|
||||||
@ -58,3 +70,16 @@ export interface Scav
|
|||||||
{
|
{
|
||||||
lootNValue: number
|
lootNValue: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MaxBotCap
|
||||||
|
{
|
||||||
|
factory: number
|
||||||
|
customs: number
|
||||||
|
woods: number
|
||||||
|
shoreline: number
|
||||||
|
lighthouse: number
|
||||||
|
reservebase: number
|
||||||
|
interchange: number
|
||||||
|
laboratory: number
|
||||||
|
default: number
|
||||||
|
}
|
@ -1,50 +1,51 @@
|
|||||||
export interface FleaConfig
|
export interface FleaConfig
|
||||||
{
|
{
|
||||||
minUserLevel: number
|
runIntervalSeconds: number;
|
||||||
blacklist: Blacklist
|
minUserLevel: number;
|
||||||
condition: Condition
|
blacklist: Blacklist;
|
||||||
currencies: Currencies
|
condition: Condition;
|
||||||
offerItemCount: OfferItemCount
|
currencies: Currencies;
|
||||||
reputation: Reputation
|
offerItemCount: OfferItemCount;
|
||||||
time: Time
|
reputation: Reputation;
|
||||||
|
time: Time;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Blacklist
|
export interface Blacklist
|
||||||
{
|
{
|
||||||
enableBsgList: boolean
|
enableBsgList: boolean;
|
||||||
enableQuestList: boolean
|
enableQuestList: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Condition
|
export interface Condition
|
||||||
{
|
{
|
||||||
conditionChance: number
|
conditionChance: number;
|
||||||
min: number
|
min: number;
|
||||||
max: number
|
max: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Currencies
|
export interface Currencies
|
||||||
{
|
{
|
||||||
roubles: number
|
roubles: number;
|
||||||
dollars: number
|
dollars: number;
|
||||||
euros: number
|
euros: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OfferItemCount
|
export interface OfferItemCount
|
||||||
{
|
{
|
||||||
min: number
|
min: number;
|
||||||
max: number
|
max: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Reputation
|
export interface Reputation
|
||||||
{
|
{
|
||||||
gain: number
|
gain: number;
|
||||||
loss: number
|
loss: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Time
|
export interface Time
|
||||||
{
|
{
|
||||||
baseSellTime: number
|
baseSellTime: number;
|
||||||
minSellTime: number
|
minSellTime: number;
|
||||||
maxSellTime: number
|
maxSellTime: number;
|
||||||
}
|
}
|
||||||
|
|
@ -1,9 +1,6 @@
|
|||||||
export interface HideoutConfig
|
export interface HideoutConfig
|
||||||
{
|
{
|
||||||
airFilterUnitFlowRate: number
|
|
||||||
constructionTime: number
|
constructionTime: number
|
||||||
generatorFuelFlowRate: number
|
|
||||||
gpuBoostRate: number
|
|
||||||
productionTime: number
|
productionTime: number
|
||||||
scavCaseTime: number
|
scavCaseTime: number
|
||||||
}
|
}
|
@ -4,5 +4,6 @@ export interface LocationsConfig
|
|||||||
freeLabsEntry: boolean
|
freeLabsEntry: boolean
|
||||||
exfilTime: number
|
exfilTime: number
|
||||||
extractionsExtended: boolean
|
extractionsExtended: boolean
|
||||||
|
enableCoopExtracts: boolean
|
||||||
noExtractRestrictions: boolean
|
noExtractRestrictions: boolean
|
||||||
}
|
}
|
@ -1,14 +1,20 @@
|
|||||||
export interface RaidConfig
|
export interface RaidConfig
|
||||||
{
|
{
|
||||||
carExtractBaseStandingGain: number
|
carExtractBaseStandingGain: number;
|
||||||
chompiesBossFix: boolean
|
chompiesBossFix: boolean;
|
||||||
fixOpenZones: boolean
|
fixOpenZones: boolean;
|
||||||
scavExtractGain: number
|
scavExtractGain: number;
|
||||||
timeLimit: number
|
timeLimit: TimeLimit;
|
||||||
aiAmount: string
|
aiAmount: string;
|
||||||
aiDifficulty: string
|
aiDifficulty: string;
|
||||||
bossEnabled: boolean
|
bossEnabled: boolean;
|
||||||
scavWars: boolean
|
scavWars: boolean;
|
||||||
taggedAndCursed: boolean
|
taggedAndCursed: boolean;
|
||||||
enablePve: boolean
|
enablePve: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimeLimit
|
||||||
|
{
|
||||||
|
enabled: boolean;
|
||||||
|
raidTime: number;
|
||||||
}
|
}
|
@ -1,8 +1,13 @@
|
|||||||
|
import { FenceConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||||
|
|
||||||
export interface TradersConfig
|
export interface TradersConfig
|
||||||
{
|
{
|
||||||
updateTime: UpdateTime;
|
updateTime: UpdateTime;
|
||||||
minDurabilityForSale: number;
|
updateTimeDefault: number;
|
||||||
|
/** What % of max durability an item needs to sell to a trader*/
|
||||||
|
durabilityPurchaseThreshhold: Record<string, number>;
|
||||||
traderPriceMultipler: number;
|
traderPriceMultipler: number;
|
||||||
|
persistPurchaseDataInProfile: boolean;
|
||||||
fence: FenceConfig;
|
fence: FenceConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,14 +22,3 @@ export interface UpdateTime1
|
|||||||
traderId: string;
|
traderId: string;
|
||||||
seconds: number;
|
seconds: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface FenceConfig
|
|
||||||
{
|
|
||||||
partialRefreshTimeSeconds: number;
|
|
||||||
partialRefreshChangePercent: number;
|
|
||||||
assortSize: number;
|
|
||||||
maxPresetsPercent: number;
|
|
||||||
presetPriceMult: number;
|
|
||||||
blacklist: string[];
|
|
||||||
}
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Valens-AIO",
|
"name": "Valens-AIO",
|
||||||
"version": "1.6.1",
|
"version": "1.8.2",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"license": "CC BY-NC-ND 4.0",
|
"license": "CC BY-NC-ND 4.0",
|
||||||
"author": "Valens",
|
"author": "Valens",
|
||||||
"akiVersion": "3.2.*",
|
"akiVersion": ">=3.5.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup:environment": "npm i",
|
"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",
|
"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 { AirdropConfig } from "../config/ts/airdrop";
|
||||||
import { Logger } from "./logger";
|
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
|
export class Airdrop
|
||||||
{
|
{
|
||||||
@ -54,6 +54,22 @@ export class Airdrop
|
|||||||
this.logger.info(`Plane Volume is ${mod.planeVolume}`);
|
this.logger.info(`Plane Volume is ${mod.planeVolume}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets the speed of the plane as it flies to what is configured.
|
||||||
|
if (mod.planeSpeed != airdrop.planeSpeed)
|
||||||
|
{
|
||||||
|
airdrop.planeSpeed = mod.planeSpeed;
|
||||||
|
this.logger.info(`Plane Speed is ${mod.planeSpeed}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the fall speed of the cargo crate dropping out of the plate to what is configured.
|
||||||
|
if (mod.crateFallSpeed != airdrop.crateFallSpeed)
|
||||||
|
{
|
||||||
|
airdrop.crateFallSpeed = mod.crateFallSpeed;
|
||||||
|
this.logger.info(`Crate Fall Speed is ${mod.crateFallSpeed}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Airdrop Loot Settings configuration begin.
|
||||||
|
|
||||||
// Sets the Preset Count to what is configured.
|
// Sets the Preset Count to what is configured.
|
||||||
if (mod.loot.presetCount != airdrop.loot.presetCount)
|
if (mod.loot.presetCount != airdrop.loot.presetCount)
|
||||||
{
|
{
|
||||||
@ -88,6 +104,20 @@ export class Airdrop
|
|||||||
airdrop.loot.itemLimits = mod.loot.itemLimits;
|
airdrop.loot.itemLimits = mod.loot.itemLimits;
|
||||||
this.logger.info(`Item Limits is ${mod.loot.itemLimits}`);
|
this.logger.info(`Item Limits is ${mod.loot.itemLimits}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets the itemStackLimits to what is configured.
|
||||||
|
if (mod.loot.itemStackLimits != airdrop.loot.itemStackLimits)
|
||||||
|
{
|
||||||
|
airdrop.loot.itemStackLimits = mod.loot.itemStackLimits;
|
||||||
|
this.logger.info(`Item Stack Limits is ${mod.loot.itemStackLimits}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets the Armor Level Whitelist to what is configured.
|
||||||
|
if (mod.loot.armorLevelWhitelist != airdrop.loot.armorLevelWhitelist)
|
||||||
|
{
|
||||||
|
airdrop.loot.armorLevelWhitelist = mod.loot.armorLevelWhitelist;
|
||||||
|
this.logger.info(`Armor Level Whitelist is ${mod.loot.armorLevelWhitelist}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,11 +132,13 @@ export class Airdrop
|
|||||||
chance["shoreline"] = mod.shoreline;
|
chance["shoreline"] = mod.shoreline;
|
||||||
chance["interchange"] = mod.interchange;
|
chance["interchange"] = mod.interchange;
|
||||||
chance["reserve"] = mod.reserve;
|
chance["reserve"] = mod.reserve;
|
||||||
|
chance["tarkovStreets"] = mod.tarkovStreets;
|
||||||
this.logger.info(`Customs Airdrop Chance is ${mod.bigmap}`);
|
this.logger.info(`Customs Airdrop Chance is ${mod.bigmap}`);
|
||||||
this.logger.info(`Woods Airdrop Chance is ${mod.woods}`);
|
this.logger.info(`Woods Airdrop Chance is ${mod.woods}`);
|
||||||
this.logger.info(`Lighthouse Airdrop Chance is ${mod.lighthouse}`);
|
this.logger.info(`Lighthouse Airdrop Chance is ${mod.lighthouse}`);
|
||||||
this.logger.info(`Shoreline Airdrop Chance is ${mod.shoreline}`);
|
this.logger.info(`Shoreline Airdrop Chance is ${mod.shoreline}`);
|
||||||
this.logger.info(`Interchange Airdrop Chance is ${mod.interchange}`);
|
this.logger.info(`Interchange Airdrop Chance is ${mod.interchange}`);
|
||||||
this.logger.info(`Reserve Airdrop Chance is ${mod.reserve}`);
|
this.logger.info(`Reserve Airdrop Chance is ${mod.reserve}`);
|
||||||
|
this.logger.info(`Streets Airdrop Chance is ${mod.tarkovStreets}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
78
src/bots.ts
78
src/bots.ts
@ -1,8 +1,8 @@
|
|||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { Logger } from "./logger";
|
|
||||||
import { BotsConfig } from "../config/ts/bots";
|
import { BotsConfig } from "../config/ts/bots";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Bots
|
export class Bots
|
||||||
{
|
{
|
||||||
@ -36,21 +36,21 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Checks if straight up difficulty selection is used or not to determine if it should use that or if it should then go to use weighted difficulties.
|
// Checks if straight up difficulty selection is used or not to determine if it should use that or if it should then go to use weighted difficulties.
|
||||||
if (modPMC.difficultyWeights.difficulty != "asonline")
|
|
||||||
{
|
|
||||||
// Uses PMC difficulty weighting if straight up difficulty selection is not used.
|
|
||||||
if (modPMC.difficultyWeights.useWeights)
|
if (modPMC.difficultyWeights.useWeights)
|
||||||
{
|
{
|
||||||
const chosenDifficulty = this.chooseRandomWeightedDifficulty();
|
const chosenDifficulty = this.chooseRandomWeightedDifficulty();
|
||||||
this.logger.info("PMC Difficulty Chance Weights Patched");
|
this.logger.info("PMC Difficulty Chance Weights Patched");
|
||||||
this.logger.info(`PMC Difficulty Chosen: ${chosenDifficulty}`);
|
this.logger.info(`PMC Difficulty Chosen: ${chosenDifficulty}`)
|
||||||
}
|
}
|
||||||
// Uses PMC difficulty if weighting is disabled.
|
else if (modPMC.difficulty != pmc.difficulty)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
pmc.difficulty = modPMC.difficultyWeights.difficulty;
|
pmc.difficulty = modPMC.difficulty;
|
||||||
this.logger.info(`PMC Bot Difficulty set to ${modPMC.difficultyWeights.difficulty}`);
|
this.logger.info(`PMC Bot Difficulty set to ${modPMC.difficulty}`);
|
||||||
}
|
}
|
||||||
|
else if (modPMC.useDifficultyOverride)
|
||||||
|
{
|
||||||
|
pmc.useDifficultyOverride = modPMC.useDifficultyOverride;
|
||||||
|
this.logger.info("PMC Bot Difficulty now overriden by raid settings");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,18 +81,20 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
// 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;
|
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostilePercent;
|
||||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostilePercent}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
||||||
if (mod.maxBotCap != bot.maxBotCap)
|
|
||||||
{
|
{
|
||||||
this.botConfig.maxBotCap = mod.maxBotCap;
|
for (const [key] of Object.entries(bot.maxBotCap))
|
||||||
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
{
|
||||||
|
bot.maxBotCap[key] = mod.maxBotCap[key];
|
||||||
|
this.logger.info(mod.maxBotCap[key]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -106,25 +108,33 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Adjusts the chance for PMC to spawn instead of the default bot type if configured outside of the default values.
|
// 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
|
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 != 15 || this.modConfig.pmc.convertIntoPmcChance.cursedAssault.max != 40
|
|| 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 != 15 || this.modConfig.pmc.convertIntoPmcChance.pmcBot.max != 30
|
|| 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 != 5 || this.modConfig.pmc.convertIntoPmcChance.exUsec.max != 20)
|
|| 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.adjustPmcChance();
|
||||||
this.logger.info("Chance to Convert Bots into PMC Patched");
|
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.
|
// Makes *all* bosses spawn chance configurable.
|
||||||
if (mod.bossChance.activated)
|
if (mod.bossChance.activated)
|
||||||
{
|
{
|
||||||
this.configureBossChance();
|
this.configureBossChance();
|
||||||
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`)
|
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (modPMC.looseWeaponInBackpackChance != 15 || modPMC.looseWeaponInBackpackLoot.max != 1 || modPMC.looseWeaponInBackpackLoot.min != 1)
|
if (modPMC.looseWeaponInBackpackChancePercent != 15 || modPMC.looseWeaponInBackpackLootMinMax.max != 1 || modPMC.looseWeaponInBackpackLootMinMax.min != 1)
|
||||||
{
|
{
|
||||||
this.changeLooseWeapon();
|
this.changeLooseWeapon();
|
||||||
this.logger.info("Loose Weapon In PMC Backpack Values Patched");
|
this.logger.info("Loose Weapon In PMC Backpack Values Patched");
|
||||||
@ -136,10 +146,10 @@ export class Bots
|
|||||||
// Function to enable secured and common containers on PMCs.
|
// Function to enable secured and common containers on PMCs.
|
||||||
private containersOnPMCs(): void
|
private containersOnPMCs(): void
|
||||||
{
|
{
|
||||||
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
const backpackLoot = this.botConfig.pmc.backpackLoot.whitelist;
|
||||||
|
|
||||||
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
backpackLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||||
dynaLoot.push("5795f317245977243854e041");
|
backpackLoot.push("5795f317245977243854e041");
|
||||||
}
|
}
|
||||||
|
|
||||||
private chooseRandomWeightedDifficulty(): string
|
private chooseRandomWeightedDifficulty(): string
|
||||||
@ -157,12 +167,12 @@ export class Bots
|
|||||||
|
|
||||||
pmcConfig.assault.min = modConfig.assault.min;
|
pmcConfig.assault.min = modConfig.assault.min;
|
||||||
pmcConfig.assault.max = modConfig.assault.max;
|
pmcConfig.assault.max = modConfig.assault.max;
|
||||||
pmcConfig.cursedassault.min = modConfig.cursedAssault.min;
|
pmcConfig.cursedassault.min = modConfig.cursedassault.min;
|
||||||
pmcConfig.cursedassault.max = modConfig.cursedAssault.max;
|
pmcConfig.cursedassault.max = modConfig.cursedassault.max;
|
||||||
pmcConfig.pmcbot.min = modConfig.pmcBot.min;
|
pmcConfig.pmcbot.min = modConfig.pmcbot.min;
|
||||||
pmcConfig.pmcbot.max = modConfig.pmcBot.max;
|
pmcConfig.pmcbot.max = modConfig.pmcbot.max;
|
||||||
pmcConfig.exusec.min = modConfig.exUsec.min;
|
pmcConfig.exusec.min = modConfig.exusec.min;
|
||||||
pmcConfig.exusec.max = modConfig.exUsec.max;
|
pmcConfig.exusec.max = modConfig.exusec.max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -198,9 +208,9 @@ export class Bots
|
|||||||
const pmcConfig = this.botConfig.pmc;
|
const pmcConfig = this.botConfig.pmc;
|
||||||
const modConfig = this.modConfig.pmc;
|
const modConfig = this.modConfig.pmc;
|
||||||
|
|
||||||
pmcConfig.looseWeaponInBackpackChancePercent = modConfig.looseWeaponInBackpackChance;
|
pmcConfig.looseWeaponInBackpackChancePercent = modConfig.looseWeaponInBackpackChancePercent;
|
||||||
pmcConfig.looseWeaponInBackpackLootMinMax.min = modConfig.looseWeaponInBackpackLoot.min;
|
pmcConfig.looseWeaponInBackpackLootMinMax.min = modConfig.looseWeaponInBackpackLootMinMax.min;
|
||||||
pmcConfig.looseWeaponInBackpackLootMinMax.max = modConfig.looseWeaponInBackpackLoot.max;
|
pmcConfig.looseWeaponInBackpackLootMinMax.max = modConfig.looseWeaponInBackpackLootMinMax.max;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
48
src/flea.ts
48
src/flea.ts
@ -1,7 +1,7 @@
|
|||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { Logger } from "./logger";
|
|
||||||
import { FleaConfig } from "../config/ts/flea";
|
import { FleaConfig } from "../config/ts/flea";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Flea
|
export class Flea
|
||||||
{
|
{
|
||||||
@ -25,20 +25,35 @@ export class Flea
|
|||||||
const global = this.tables.getTables().globals;
|
const global = this.tables.getTables().globals;
|
||||||
const ragfair = this.ragfairConfig.dynamic;
|
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;
|
global.config.RagFair.minUserLevel = mod.minUserLevel;
|
||||||
this.logger.info(`Fleamarket unlocked at level ${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.enableBsgList = false;
|
||||||
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
|
||||||
this.logger.info("Fleamarket Blacklists patched");
|
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.conditionChance = mod.condition.conditionChance;
|
||||||
ragfair.condition.min = mod.condition.min;
|
ragfair.condition.min = mod.condition.min;
|
||||||
@ -46,7 +61,8 @@ export class Flea
|
|||||||
this.logger.info("Fleamarket Condition patched");
|
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["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||||
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||||
@ -54,26 +70,30 @@ export class Flea
|
|||||||
this.logger.info("Fleamarket Currencies patched")
|
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.min = mod.offerItemCount.min;
|
||||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
this.logger.info("Fleamarket Offer Item Count patched");
|
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.min = mod.offerItemCount.min;
|
||||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
this.logger.info("Fleamarket Reputation patched");
|
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;
|
const sell = this.ragfairConfig.sell.time;
|
||||||
sell.time.base = mod.time.baseSellTime;
|
const mod = this.modConfig.time;
|
||||||
sell.time.min = mod.time.minSellTime;
|
sell.base = mod.baseSellTime;
|
||||||
sell.time.max = mod.time.maxSellTime;
|
sell.min = mod.minSellTime;
|
||||||
|
sell.max = mod.maxSellTime;
|
||||||
this.logger.info("Fleamarket Sell Times patched");
|
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 { 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
|
export class Hideout
|
||||||
{
|
{
|
||||||
@ -38,18 +38,6 @@ export class Hideout
|
|||||||
this.updateScavCase();
|
this.updateScavCase();
|
||||||
this.logger.info(`Scav Case Time Patched to ${mod.scavCaseTime}`);
|
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()
|
private updateConstructionTime()
|
||||||
|
@ -46,6 +46,13 @@ export class Locations
|
|||||||
this.logger.info("Extractions Are Extended");
|
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.
|
// Remove the access key "5c94bbff86f7747ee735c08f" (Labs access card) from Labs.
|
||||||
if (mod.freeLabsEntry)
|
if (mod.freeLabsEntry)
|
||||||
{
|
{
|
||||||
@ -106,13 +113,34 @@ export class Locations
|
|||||||
{
|
{
|
||||||
if (i !== "base")
|
if (i !== "base")
|
||||||
{
|
{
|
||||||
|
for (const x in locations[i].base.exits)
|
||||||
|
{
|
||||||
|
if (locations[i].base.exits[x].Name !== "EXFIL_Train")
|
||||||
|
{
|
||||||
|
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)
|
for (const x in locations[i].base.exits)
|
||||||
{
|
{
|
||||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||||
locations[i].base.exits[x].Name === "lab_Vent")
|
locations[i].base.exits[x].Name === "lab_Vent")
|
||||||
{
|
{
|
||||||
if (locations[i].base.exits[x].PassageRequirement !== "None")
|
if (locations[i].base.exits[x].PassageRequirement === "ScavCooperation")
|
||||||
{
|
{
|
||||||
locations[i].base.exits[x].PassageRequirement = "None";
|
locations[i].base.exits[x].PassageRequirement = "None";
|
||||||
}
|
}
|
||||||
@ -141,7 +169,6 @@ export class Locations
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private extractionsExtended(): void
|
private extractionsExtended(): void
|
||||||
{
|
{
|
||||||
@ -177,6 +204,12 @@ export class Locations
|
|||||||
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "lighthouse":
|
||||||
|
for (const extract in locations[map].base.exits)
|
||||||
|
{
|
||||||
|
locations[map].base.exits[extract].EntryPoints = "Tunnel, North"
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
85
src/loot.ts
85
src/loot.ts
@ -21,7 +21,7 @@ export class Loot
|
|||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig;
|
||||||
|
|
||||||
if (mod.looseLootMultiplier > 1)
|
if (mod.looseLootMultiplier != 1)
|
||||||
{
|
{
|
||||||
for (const map in this.locationConfig.looseLootMultiplier)
|
for (const map in this.locationConfig.looseLootMultiplier)
|
||||||
{
|
{
|
||||||
@ -30,7 +30,7 @@ export class Loot
|
|||||||
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.staticLootMultiplier > 1)
|
if (mod.staticLootMultiplier != 1)
|
||||||
{
|
{
|
||||||
for (const map in this.locationConfig.staticLootMultiplier)
|
for (const map in this.locationConfig.staticLootMultiplier)
|
||||||
{
|
{
|
||||||
@ -55,27 +55,29 @@ export class Loot
|
|||||||
{
|
{
|
||||||
// Customs Marked Room Loot.
|
// Customs Marked Room Loot.
|
||||||
let spawnPoints = this.tables.getTables().locations.bigmap.looseLoot.spawnpoints;
|
let spawnPoints = this.tables.getTables().locations.bigmap.looseLoot.spawnpoints;
|
||||||
const cstmsmarked1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)1203364");
|
const customsMarked1 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (10)"));
|
||||||
const cstmsmarked2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)1198014");
|
const customsMarked2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||||
const cstmsmarked3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)1207194");
|
const customsMarked3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||||
|
|
||||||
cstmsmarked1.itemDistribution.push(...this.containers());
|
// Pushing containers into the customs marked room loot pool.
|
||||||
cstmsmarked2.itemDistribution.push(...this.containers());
|
customsMarked1.itemDistribution.push(...this.containers());
|
||||||
cstmsmarked3.itemDistribution.push(...this.containers());
|
customsMarked2.itemDistribution.push(...this.containers());
|
||||||
|
customsMarked3.itemDistribution.push(...this.containers());
|
||||||
|
|
||||||
// Reserve Marked Room Loot.
|
// Reserve Marked Room Loot.
|
||||||
spawnPoints = this.tables.getTables().locations.rezervbase.looseLoot.spawnpoints;
|
spawnPoints = this.tables.getTables().locations.rezervbase.looseLoot.spawnpoints;
|
||||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)49516");
|
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51646628");
|
||||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)69186");
|
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)39600");
|
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||||
|
|
||||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (11)56822");
|
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (11)"));
|
||||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (12)56254");
|
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (12)"));
|
||||||
|
|
||||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)60780");
|
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51658080");
|
||||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (11)55578");
|
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (11)"));
|
||||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (12)55522");
|
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());
|
rsrvRBBK1.itemDistribution.push(...this.containers());
|
||||||
rsrvRBBK2.itemDistribution.push(...this.containers());
|
rsrvRBBK2.itemDistribution.push(...this.containers());
|
||||||
rsrvRBBK3.itemDistribution.push(...this.containers());
|
rsrvRBBK3.itemDistribution.push(...this.containers());
|
||||||
@ -86,6 +88,45 @@ export class Loot
|
|||||||
rsrvRBVO1.itemDistribution.push(...this.containers());
|
rsrvRBVO1.itemDistribution.push(...this.containers());
|
||||||
rsrvRBVO2.itemDistribution.push(...this.containers());
|
rsrvRBVO2.itemDistribution.push(...this.containers());
|
||||||
rsrvRBVO3.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[]
|
private containers(): any[]
|
||||||
@ -102,7 +143,11 @@ export class Loot
|
|||||||
* Medicine case: 5aafbcd986f7745e590fff23
|
* Medicine case: 5aafbcd986f7745e590fff23
|
||||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
* 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 = [];
|
const lootItems = [];
|
||||||
@ -117,7 +162,11 @@ export class Loot
|
|||||||
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||||
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||||
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
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;
|
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 { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
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 { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
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 { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
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 { 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 { 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 { Airdrop } from "./airdrop";
|
||||||
import { Ammo } from "./ammo";
|
import { Ammo } from "./ammo";
|
||||||
import { Armor } from "./armor";
|
import { Armor } from "./armor";
|
||||||
import { Bots } from "./bots";
|
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 { 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 { Locations } from "./locations";
|
||||||
import { Quests } from "./quests";
|
import { Logger } from "./logger";
|
||||||
import { Skills } from "./skills";
|
import { Loot } from "./loot";
|
||||||
import { Prewipe } from "./prewipe";
|
import { Prewipe } from "./prewipe";
|
||||||
|
import { Quests } from "./quests";
|
||||||
|
import { Raid } from "./raid";
|
||||||
|
import { Skills } from "./skills";
|
||||||
import { Traders } from "./traders";
|
import { Traders } from "./traders";
|
||||||
|
import { Weapons } from "./weapons";
|
||||||
|
|
||||||
class ValensAIO implements IPostDBLoadMod
|
class ValensAIO implements IPostDBLoadMod
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,7 @@ export class Prewipe
|
|||||||
|
|
||||||
for (const trader in this.traders)
|
for (const trader in this.traders)
|
||||||
{
|
{
|
||||||
for (const assort in this.traders[trader].assort.barter_scheme)
|
for (const assort in this.traders[trader]?.assort?.barter_scheme)
|
||||||
{
|
{
|
||||||
const itemScheme = this.traders[trader].assort.barter_scheme[assort];
|
const itemScheme = this.traders[trader].assort.barter_scheme[assort];
|
||||||
switch (itemScheme[0][0]._tpl)
|
switch (itemScheme[0][0]._tpl)
|
||||||
|
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 { 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 { RaidConfig } from "../config/ts/raid";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Raid
|
export class Raid
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@ export class Raid
|
|||||||
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.timeLimit)
|
if (mod.timeLimit.enabled)
|
||||||
{
|
{
|
||||||
const maps = this.tables.getTables().locations;
|
const maps = this.tables.getTables().locations;
|
||||||
|
|
||||||
@ -41,14 +41,14 @@ export class Raid
|
|||||||
{
|
{
|
||||||
if (this.tables.getTables().locations[map].base?.EscapeTimeLimit)
|
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
|
if (mod.aiAmount.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiAmount || mod.aiDifficulty.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiDifficulty || mod.bossEnabled != true
|
||||||
||mod.scavWars != false ||mod.taggedAndCursed != false ||mod.enablePve != false)
|
|| mod.scavWars != this.inRaidConfig.raidMenuSettings.scavWars || mod.taggedAndCursed != this.inRaidConfig.raidMenuSettings.taggedAndCursed || mod.enablePve != this.inRaidConfig.raidMenuSettings.enablePve)
|
||||||
{
|
{
|
||||||
const inRaidConfig = this.inRaidConfig;
|
const inRaidConfig = this.inRaidConfig;
|
||||||
|
|
||||||
@ -66,13 +66,13 @@ export class Raid
|
|||||||
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
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.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||||
this.logger.info(`Car Extract Base Standing Gain set to ${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.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||||
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||||
|
@ -20,23 +20,34 @@ export class Traders
|
|||||||
public updateTraders(): void
|
public updateTraders(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig;
|
||||||
|
const trader = this.traderConfig;
|
||||||
|
|
||||||
if (mod.updateTime.enabled)
|
if (mod.updateTime.enabled)
|
||||||
{
|
{
|
||||||
this.updateTime();
|
this.updateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.traderPriceMultipler != 1)
|
if (trader.updateTimeDefault != mod.updateTimeDefault)
|
||||||
|
{
|
||||||
|
trader.updateTimeDefault = mod.updateTimeDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trader.traderPriceMultipler != mod.traderPriceMultipler)
|
||||||
{
|
{
|
||||||
this.traderPriceMultiplier();
|
this.traderPriceMultiplier();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.minDurabilityForSale != 60)
|
if (trader.durabilityPurchaseThreshhold != mod.durabilityPurchaseThreshhold)
|
||||||
{
|
{
|
||||||
this.minDurabilityForSale();
|
this.minDurabilityForSale();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.fence.partialRefreshTimeSeconds != 240 || mod.fence.partialRefreshChangePercent != 15 || mod.fence.assortSize != 100 || mod.fence.maxPresetsPercent != 5 || mod.fence.presetPriceMult != 2.5 || mod.fence.blacklist != this.traderConfig.fence.blacklist)
|
if (trader.persistPurchaseDataInProfile != mod.persistPurchaseDataInProfile)
|
||||||
|
{
|
||||||
|
trader.persistPurchaseDataInProfile = mod.persistPurchaseDataInProfile;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trader.fence != mod.fence)
|
||||||
{
|
{
|
||||||
this.updateFence();
|
this.updateFence();
|
||||||
}
|
}
|
||||||
@ -62,19 +73,27 @@ export class Traders
|
|||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig;
|
||||||
const trader = this.traderConfig;
|
const trader = this.traderConfig;
|
||||||
trader.minDurabilityForSale = mod.minDurabilityForSale;
|
trader.durabilityPurchaseThreshhold = mod.durabilityPurchaseThreshhold;
|
||||||
this.logger.info(`Min Durability For Sale Set to ${mod.minDurabilityForSale}`);
|
this.logger.info(`Min Durability For Sale Set to ${mod.durabilityPurchaseThreshhold}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateFence(): void
|
private updateFence(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig.fence;
|
const mod = this.modConfig.fence;
|
||||||
const trader = this.traderConfig.fence;
|
const trader = this.traderConfig.fence;
|
||||||
|
|
||||||
|
// Start updating Fence config.
|
||||||
|
|
||||||
trader.partialRefreshTimeSeconds = mod.partialRefreshTimeSeconds;
|
trader.partialRefreshTimeSeconds = mod.partialRefreshTimeSeconds;
|
||||||
trader.partialRefreshChangePercent = mod.partialRefreshChangePercent;
|
trader.partialRefreshChangePercent = mod.partialRefreshChangePercent;
|
||||||
trader.assortSize = mod.assortSize;
|
trader.discountOptions.assortSize = mod.assortSize;
|
||||||
trader.maxPresetsPercent = mod.maxPresetsPercent;
|
trader.maxPresetsPercent = mod.maxPresetsPercent;
|
||||||
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;
|
||||||
|
trader.armorMaxDurabilityPercentMinMax = mod.armorMaxDurabilityPercentMinMax;
|
||||||
trader.blacklist = mod.blacklist;
|
trader.blacklist = mod.blacklist;
|
||||||
this.logger.info("Fence Has Been Patched");
|
this.logger.info("Fence Has Been Patched");
|
||||||
}
|
}
|
||||||
|
6
types/ErrorHandler.d.ts
vendored
Normal file
6
types/ErrorHandler.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export declare class ErrorHandler {
|
||||||
|
private logger;
|
||||||
|
private readLine;
|
||||||
|
constructor();
|
||||||
|
handleCriticalError(err: any): void;
|
||||||
|
}
|
1
types/Program.d.ts
vendored
1
types/Program.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
export declare class Program {
|
export declare class Program {
|
||||||
|
private errorHandler;
|
||||||
constructor();
|
constructor();
|
||||||
start(): void;
|
start(): void;
|
||||||
}
|
}
|
||||||
|
21
types/callbacks/BotCallbacks.d.ts
vendored
21
types/callbacks/BotCallbacks.d.ts
vendored
@ -8,8 +8,29 @@ export declare class BotCallbacks {
|
|||||||
protected botController: BotController;
|
protected botController: BotController;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/bot/limit
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/bot/difficulty
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* Handle client/game/bot/generate
|
||||||
|
* @returns IGetBodyResponseData
|
||||||
|
*/
|
||||||
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/bot/maxCap
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
getBotCap(): string;
|
getBotCap(): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/bot/getBotBehaviours
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
getBotBehaviours(): string;
|
||||||
}
|
}
|
||||||
|
6
types/callbacks/BundleCallbacks.d.ts
vendored
6
types/callbacks/BundleCallbacks.d.ts
vendored
@ -1,17 +1,17 @@
|
|||||||
import { BundleLoader } from "../loaders/BundleLoader";
|
import { BundleLoader } from "../loaders/BundleLoader";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class BundleCallbacks {
|
export declare class BundleCallbacks {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpServer: IHttpServer;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
protected bundleLoader: BundleLoader;
|
protected bundleLoader: BundleLoader;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
getBundle(url: string, info: any, sessionID: string): string;
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
|
14
types/callbacks/CustomizationCallbacks.d.ts
vendored
14
types/callbacks/CustomizationCallbacks.d.ts
vendored
@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
|
import { IGetSuitsResponse } from "../models/eft/customization/IGetSuitsResponse";
|
||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -13,10 +14,15 @@ export declare class CustomizationCallbacks {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
/**
|
||||||
_id: string;
|
* Handles client/trading/customization/storage
|
||||||
suites: string[];
|
* @returns
|
||||||
}>;
|
*/
|
||||||
|
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
||||||
|
/**
|
||||||
|
* Handles client/trading/customization
|
||||||
|
* @returns ISuit[]
|
||||||
|
*/
|
||||||
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
52
types/callbacks/DataCallbacks.d.ts
vendored
52
types/callbacks/DataCallbacks.d.ts
vendored
@ -1,32 +1,74 @@
|
|||||||
|
import { HideoutController } from "../controllers/HideoutController";
|
||||||
|
import { RagfairController } from "../controllers/RagfairController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IGlobals } from "../models/eft/common/IGlobals";
|
import { IGlobals } from "../models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
||||||
|
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
||||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
||||||
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
|
||||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
/**
|
||||||
|
* Handle client requests
|
||||||
|
*/
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
protected ragfairController: RagfairController;
|
||||||
|
protected hideoutController: HideoutController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||||
|
/**
|
||||||
|
* Handles client/settings
|
||||||
|
* @returns ISettingsBase
|
||||||
|
*/
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
|
/**
|
||||||
|
* Handles client/globals
|
||||||
|
* @returns IGlobals
|
||||||
|
*/
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||||
|
/**
|
||||||
|
* Handles client/items
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
/**
|
||||||
|
* Handles client/handbook/templates
|
||||||
|
* @returns IHandbookBase
|
||||||
|
*/
|
||||||
|
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
||||||
|
/**
|
||||||
|
* Handles client/customization
|
||||||
|
* @returns Record<string, ICustomizationItem
|
||||||
|
*/
|
||||||
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
||||||
|
/**
|
||||||
|
* Handles client/account/customization
|
||||||
|
* @returns string[]
|
||||||
|
*/
|
||||||
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
||||||
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* 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>;
|
||||||
}
|
}
|
||||||
|
21
types/callbacks/DialogueCallbacks.d.ts
vendored
21
types/callbacks/DialogueCallbacks.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "../controllers/DialogueController";
|
import { DialogueController } from "../controllers/DialogueController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
||||||
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||||
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
@ -20,26 +21,38 @@ import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueCallbacks extends OnUpdate {
|
export declare class DialogueCallbacks implements OnUpdate {
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected dialogueController: DialogueController;
|
protected dialogueController: DialogueController;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
||||||
|
/**
|
||||||
|
* Handles client/friend/list
|
||||||
|
* @returns IGetFriendListDataResponse
|
||||||
|
*/
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
/**
|
||||||
|
* Handles client/chatServer/list
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
||||||
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
||||||
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
||||||
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
|
/**
|
||||||
|
* Handles client/mail/dialog/getAllAttachments
|
||||||
|
* @returns IGetAllAttachmentsResponse
|
||||||
|
*/
|
||||||
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
||||||
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
||||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
39
types/callbacks/GameCallbacks.d.ts
vendored
39
types/callbacks/GameCallbacks.d.ts
vendored
@ -1,8 +1,13 @@
|
|||||||
import { GameController } from "../controllers/GameController";
|
import { GameController } from "../controllers/GameController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||||
|
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
||||||
|
import { IGameLogoutResponseData } from "../models/eft/game/IGameLogoutResponseData";
|
||||||
|
import { IGameStartResponse } from "../models/eft/game/IGameStartResponse";
|
||||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||||
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
@ -13,13 +18,37 @@ declare class GameCallbacks {
|
|||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected gameController: GameController;
|
protected gameController: GameController;
|
||||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
||||||
|
/**
|
||||||
|
* Handle client/game/version/validate
|
||||||
|
* @returns INullResponseData
|
||||||
|
*/
|
||||||
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
||||||
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
/**
|
||||||
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
* Handle client/game/start
|
||||||
|
* @returns IGameStartResponse
|
||||||
|
*/
|
||||||
|
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameStartResponse>;
|
||||||
|
/**
|
||||||
|
* Handle client/game/logout
|
||||||
|
* @returns IGameLogoutResponseData
|
||||||
|
*/
|
||||||
|
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameLogoutResponseData>;
|
||||||
|
/**
|
||||||
|
* Handle client/game/config
|
||||||
|
* @returns IGameConfigResponse
|
||||||
|
*/
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
||||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
||||||
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
/**
|
||||||
|
* Handle client/game/keepalive
|
||||||
|
* @returns IGameKeepAliveResponse
|
||||||
|
*/
|
||||||
|
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/version
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
4
types/callbacks/HandbookCallbacks.d.ts
vendored
4
types/callbacks/HandbookCallbacks.d.ts
vendored
@ -1,8 +1,8 @@
|
|||||||
import { HandbookController } from "../controllers/HandbookController";
|
import { HandbookController } from "../controllers/HandbookController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class HandbookCallbacks extends OnLoad {
|
export declare class HandbookCallbacks implements OnLoad {
|
||||||
protected handbookController: HandbookController;
|
protected handbookController: HandbookController;
|
||||||
constructor(handbookController: HandbookController);
|
constructor(handbookController: HandbookController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
21
types/callbacks/HealthCallbacks.d.ts
vendored
21
types/callbacks/HealthCallbacks.d.ts
vendored
@ -7,6 +7,7 @@ import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealReques
|
|||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class HealthCallbacks {
|
export declare class HealthCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
@ -21,7 +22,27 @@ export declare class HealthCallbacks {
|
|||||||
* @returns empty response, no data sent back to client
|
* @returns empty response, no data sent back to client
|
||||||
*/
|
*/
|
||||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
/**
|
||||||
|
* Custom aki server request found in modules/QTEPatch.cs
|
||||||
|
* @param url
|
||||||
|
* @param info HealthListener.Instance.CurrentHealth class
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns empty response, no data sent back to client
|
||||||
|
*/
|
||||||
|
handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
/**
|
||||||
|
* Handle Eat
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle Heal
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle RestoreHealth
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
50
types/callbacks/HideoutCallbacks.d.ts
vendored
50
types/callbacks/HideoutCallbacks.d.ts
vendored
@ -1,7 +1,9 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
import { HideoutController } from "../controllers/HideoutController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||||
|
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
|
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
@ -10,24 +12,64 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
|
|||||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class HideoutCallbacks extends OnUpdate {
|
export declare class HideoutCallbacks implements OnUpdate {
|
||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||||
configServer: ConfigServer);
|
configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Handle HideoutUpgrade
|
||||||
|
*/
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutUpgradeComplete
|
||||||
|
*/
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutPutItemsInAreaSlots
|
||||||
|
*/
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutTakeItemsFromAreaSlots
|
||||||
|
*/
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutToggleArea
|
||||||
|
*/
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutSingleProductionStart
|
||||||
|
*/
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutScavCaseProductionStart
|
||||||
|
*/
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
/**
|
||||||
|
* Handle HideoutContinuousProductionStart
|
||||||
|
*/
|
||||||
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle HideoutTakeProduction
|
||||||
|
*/
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
/**
|
||||||
|
* Handle HideoutQuickTimeEvent
|
||||||
|
*/
|
||||||
|
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||||
|
*/
|
||||||
|
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||||
|
*/
|
||||||
|
improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
10
types/callbacks/HttpCallbacks.d.ts
vendored
10
types/callbacks/HttpCallbacks.d.ts
vendored
@ -1,9 +1,9 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
import { HttpServer } from "../servers/HttpServer";
|
||||||
export declare class HttpCallbacks extends OnLoad {
|
export declare class HttpCallbacks implements OnLoad {
|
||||||
protected httpServer: IHttpServer;
|
protected httpServer: HttpServer;
|
||||||
constructor(httpServer: IHttpServer);
|
constructor(httpServer: HttpServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getImage(): string;
|
getImage(): string;
|
||||||
}
|
}
|
||||||
|
48
types/callbacks/InraidCallbacks.d.ts
vendored
48
types/callbacks/InraidCallbacks.d.ts
vendored
@ -1,23 +1,49 @@
|
|||||||
import { InraidController } from "../controllers/InraidController";
|
import { InraidController } from "../controllers/InraidController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
/**
|
||||||
|
* Handle client requests
|
||||||
|
*/
|
||||||
export declare class InraidCallbacks {
|
export declare class InraidCallbacks {
|
||||||
protected inraidController: InraidController;
|
protected inraidController: InraidController;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected configServer: ConfigServer;
|
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
||||||
protected airdropConfig: IAirdropConfig;
|
/**
|
||||||
protected inraidConfig: IInRaidConfig;
|
* Handle client/location/getLocalloot
|
||||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
* @param url
|
||||||
|
* @param info register player request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Null http response
|
||||||
|
*/
|
||||||
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle raid/profile/save
|
||||||
|
* @param url
|
||||||
|
* @param info Save progress request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Null http response
|
||||||
|
*/
|
||||||
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/raid/endstate
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getRaidEndState(): string;
|
getRaidEndState(): string;
|
||||||
getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string;
|
/**
|
||||||
getWeaponDurability(url: string, info: any, sessionID: string): string;
|
* Handle singleplayer/settings/raid/menu
|
||||||
getAirdropConfig(url: string, info: any, sessionID: string): string;
|
* @returns JSON as string
|
||||||
|
*/
|
||||||
|
getRaidMenuSettings(): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/settings/weapon/durability
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getWeaponDurability(): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/airdrop/config
|
||||||
|
* @returns JSON as string
|
||||||
|
*/
|
||||||
|
getAirdropConfig(): string;
|
||||||
}
|
}
|
||||||
|
12
types/callbacks/InsuranceCallbacks.d.ts
vendored
12
types/callbacks/InsuranceCallbacks.d.ts
vendored
@ -10,15 +10,23 @@ import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class InsuranceCallbacks extends OnUpdate {
|
export declare class InsuranceCallbacks implements OnUpdate {
|
||||||
protected insuranceController: InsuranceController;
|
protected insuranceController: InsuranceController;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Handle client/insurance/items/list/cost
|
||||||
|
* @returns IGetInsuranceCostResponseData
|
||||||
|
*/
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
||||||
|
/**
|
||||||
|
* Handle Insure
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(secondsSinceLastRun: number): boolean;
|
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
2
types/callbacks/InventoryCallbacks.d.ts
vendored
2
types/callbacks/InventoryCallbacks.d.ts
vendored
@ -16,6 +16,7 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
|||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
@ -36,4 +37,5 @@ export declare class InventoryCallbacks {
|
|||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
2
types/callbacks/ItemEventCallbacks.d.ts
vendored
2
types/callbacks/ItemEventCallbacks.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
||||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
@ -8,4 +9,5 @@ export declare class ItemEventCallbacks {
|
|||||||
protected itemEventRouter: ItemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
|
protected getErrorCode(warnings: Warning[]): number;
|
||||||
}
|
}
|
||||||
|
8
types/callbacks/MatchCallbacks.d.ts
vendored
8
types/callbacks/MatchCallbacks.d.ts
vendored
@ -7,10 +7,10 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
|||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
|
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
|
||||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -34,9 +34,13 @@ export declare class MatchCallbacks {
|
|||||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
|
/**
|
||||||
|
* Handle client/match/group/status
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
|
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
15
types/callbacks/ModCallbacks.d.ts
vendored
15
types/callbacks/ModCallbacks.d.ts
vendored
@ -1,22 +1,21 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks extends OnLoad {
|
declare class ModCallbacks implements OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpServer: IHttpServer;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
protected postAkiModLoader: PostAkiModLoader;
|
protected postAkiModLoader: PostAkiModLoader;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
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 };
|
export { ModCallbacks };
|
||||||
|
7
types/callbacks/NotifierCallbacks.d.ts
vendored
7
types/callbacks/NotifierCallbacks.d.ts
vendored
@ -4,6 +4,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||||
|
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class NotifierCallbacks {
|
export declare class NotifierCallbacks {
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
@ -19,6 +20,10 @@ export declare class NotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
/**
|
||||||
|
* Handle client/game/profile/select
|
||||||
|
* @returns ISelectProfileResponse
|
||||||
|
*/
|
||||||
|
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
4
types/callbacks/PresetCallbacks.d.ts
vendored
4
types/callbacks/PresetCallbacks.d.ts
vendored
@ -1,8 +1,8 @@
|
|||||||
import { PresetController } from "../controllers/PresetController";
|
import { PresetController } from "../controllers/PresetController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class PresetCallbacks extends OnLoad {
|
export declare class PresetCallbacks implements OnLoad {
|
||||||
protected presetController: PresetController;
|
protected presetController: PresetController;
|
||||||
constructor(presetController: PresetController);
|
constructor(presetController: PresetController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
7
types/callbacks/QuestCallbacks.d.ts
vendored
7
types/callbacks/QuestCallbacks.d.ts
vendored
@ -21,6 +21,13 @@ export declare class QuestCallbacks {
|
|||||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/quest/list
|
||||||
|
* @param url
|
||||||
|
* @param info
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||||
}
|
}
|
||||||
|
19
types/callbacks/RagfairCallbacks.d.ts
vendored
19
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 { RagfairController } from "../controllers/RagfairController";
|
||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -14,7 +15,6 @@ import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferReque
|
|||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -22,23 +22,26 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
/**
|
/**
|
||||||
* Handle ragfair related callback events
|
* Handle ragfair related callback events
|
||||||
*/
|
*/
|
||||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
/**
|
||||||
|
* Handle /client/items/prices
|
||||||
|
* Called when clicking an item to list on flea
|
||||||
|
*/
|
||||||
|
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
||||||
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
14
types/callbacks/RepairCallbacks.d.ts
vendored
14
types/callbacks/RepairCallbacks.d.ts
vendored
@ -6,6 +6,20 @@ import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepa
|
|||||||
export declare class RepairCallbacks {
|
export declare class RepairCallbacks {
|
||||||
protected repairController: RepairController;
|
protected repairController: RepairController;
|
||||||
constructor(repairController: RepairController);
|
constructor(repairController: RepairController);
|
||||||
|
/**
|
||||||
|
* use trader to repair item
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Use repair kit to repair item
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param sessionID
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
9
types/callbacks/SaveCallbacks.d.ts
vendored
9
types/callbacks/SaveCallbacks.d.ts
vendored
@ -1,9 +1,10 @@
|
|||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
export declare class SaveCallbacks implements OnLoad, OnUpdate {
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(saveServer: SaveServer);
|
constructor(saveServer: SaveServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
onUpdate(secondsSinceLastRun: number): boolean;
|
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
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 {
|
export declare class TradeCallbacks {
|
||||||
protected tradeController: TradeController;
|
protected tradeController: TradeController;
|
||||||
constructor(tradeController: TradeController);
|
constructor(tradeController: TradeController);
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/items/moving TradingConfirm
|
||||||
|
*/
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
13
types/callbacks/TraderCallbacks.d.ts
vendored
13
types/callbacks/TraderCallbacks.d.ts
vendored
@ -1,17 +1,22 @@
|
|||||||
|
import { OnLoad } from "../di/OnLoad";
|
||||||
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { TraderController } from "../controllers/TraderController";
|
import { TraderController } from "../controllers/TraderController";
|
||||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected traderController: TraderController;
|
protected traderController: TraderController;
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
onUpdate(): boolean;
|
onUpdate(): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
|
/**
|
||||||
|
* Handle client/trading/api/getUserAssortPrice/trader
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
|
7
types/callbacks/WeatherCallbacks.d.ts
vendored
7
types/callbacks/WeatherCallbacks.d.ts
vendored
@ -1,10 +1,15 @@
|
|||||||
import { WeatherController } from "../controllers/WeatherController";
|
import { WeatherController } from "../controllers/WeatherController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class WeatherCallbacks {
|
export declare class WeatherCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected weatherController: WeatherController;
|
protected weatherController: WeatherController;
|
||||||
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
||||||
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
/**
|
||||||
|
* Handle client/weather
|
||||||
|
* @returns IWeatherData
|
||||||
|
*/
|
||||||
|
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IWeatherData>;
|
||||||
}
|
}
|
||||||
|
9
types/context/ApplicationContext.d.ts
vendored
9
types/context/ApplicationContext.d.ts
vendored
@ -3,6 +3,15 @@ import { ContextVariableType } from "./ContextVariableType";
|
|||||||
export declare class ApplicationContext {
|
export declare class ApplicationContext {
|
||||||
private variables;
|
private variables;
|
||||||
private static holderMaxSize;
|
private static holderMaxSize;
|
||||||
|
/**
|
||||||
|
* Called like:
|
||||||
|
*
|
||||||
|
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
||||||
|
*
|
||||||
|
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue<IStartOfflineRaidRequestData>();
|
||||||
|
* @param type
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||||
getValues(type: ContextVariableType): ContextVariable[];
|
getValues(type: ContextVariableType): ContextVariable[];
|
||||||
addValue(type: ContextVariableType, value: any): void;
|
addValue(type: ContextVariableType, value: any): void;
|
||||||
|
8
types/context/ContextVariableType.d.ts
vendored
8
types/context/ContextVariableType.d.ts
vendored
@ -1,4 +1,10 @@
|
|||||||
export declare enum ContextVariableType {
|
export declare enum ContextVariableType {
|
||||||
|
/** Logged in users session id */
|
||||||
SESSION_ID = 0,
|
SESSION_ID = 0,
|
||||||
MATCH_INFO = 1
|
/** Currently acive raid information */
|
||||||
|
RAID_CONFIGURATION = 1,
|
||||||
|
/** Timestamp when client first connected */
|
||||||
|
CLIENT_START_TIMESTAMP = 2,
|
||||||
|
/** When player is loading into map and loot is requested */
|
||||||
|
REGISTER_PLAYER_REQUEST = 3
|
||||||
}
|
}
|
||||||
|
40
types/controllers/BotController.d.ts
vendored
40
types/controllers/BotController.d.ts
vendored
@ -1,5 +1,8 @@
|
|||||||
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
import { BotGenerator } from "../generators/BotGenerator";
|
import { BotGenerator } from "../generators/BotGenerator";
|
||||||
|
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||||
@ -9,23 +12,33 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||||
import { PmcAiService } from "../services/PmcAiService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class BotController {
|
export declare class BotController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected botGenerator: BotGenerator;
|
protected botGenerator: BotGenerator;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected pmcAiService: PmcAiService;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
protected botGenerationCacheService: BotGenerationCacheService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected applicationContext: ApplicationContext;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, pmcAiService: PmcAiService, botGenerationCacheService: BotGenerationCacheService, configServer: ConfigServer);
|
static readonly pmcTypeLabel = "PMC";
|
||||||
|
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
|
* Return the number of bot loadout varieties to be generated
|
||||||
* @param type bot Type we want the loadout gen count for
|
* @param type bot Type we want the loadout gen count for
|
||||||
* @returns
|
* @returns number of bots to generate
|
||||||
*/
|
*/
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
|
/**
|
||||||
|
* Get the core.json difficulty settings from database\bots
|
||||||
|
* @returns IBotCore
|
||||||
|
*/
|
||||||
getBotCoreDifficulty(): IBotCore;
|
getBotCoreDifficulty(): IBotCore;
|
||||||
/**
|
/**
|
||||||
* Get bot difficulty settings
|
* Get bot difficulty settings
|
||||||
@ -35,7 +48,24 @@ export declare class BotController {
|
|||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||||
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
/**
|
||||||
|
* Generate bot profiles and store in cache
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param info bot generation request info
|
||||||
|
* @returns IBotBase array
|
||||||
|
*/
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
||||||
|
* @param requestedDifficulty
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Get the max number of bots allowed on a map
|
||||||
|
* Looks up location player is entering when getting cap value
|
||||||
|
* @returns cap number
|
||||||
|
*/
|
||||||
getBotCap(): number;
|
getBotCap(): number;
|
||||||
|
getPmcBotTypes(): Record<string, Record<string, Record<string, number>>>;
|
||||||
}
|
}
|
||||||
|
@ -5,16 +5,18 @@ import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothin
|
|||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
export declare class CustomizationController {
|
export declare class CustomizationController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
68
types/controllers/DialogueController.d.ts
vendored
68
types/controllers/DialogueController.d.ts
vendored
@ -2,24 +2,78 @@ import { DialogueHelper } from "../helpers/DialogueHelper";
|
|||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueController {
|
export declare class DialogueController {
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
||||||
|
update(): void;
|
||||||
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
||||||
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
/**
|
||||||
|
* Create array holding trader dialogs and mail interactions with player
|
||||||
|
* Set the content of the dialogue on the list tab.
|
||||||
|
* @param sessionID Session Id
|
||||||
|
* @returns array of dialogs
|
||||||
|
*/
|
||||||
|
generateDialogueList(sessionID: string): DialogueInfo[];
|
||||||
|
/**
|
||||||
|
* Get the content of a dialogue
|
||||||
|
* @param dialogueID Dialog id
|
||||||
|
* @param sessionID Session Id
|
||||||
|
* @returns DialogueInfo
|
||||||
|
*/
|
||||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||||
|
/**
|
||||||
|
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
||||||
|
* Set the content of the dialogue on the details panel, showing all the messages
|
||||||
|
* for the specified dialogue.
|
||||||
|
* @param dialogueID Dialog id
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IGetMailDialogViewResponseData object
|
||||||
|
*/
|
||||||
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
||||||
|
/**
|
||||||
|
* Get a count of messages with attachments from a particular dialog
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param dialogueID Dialog id
|
||||||
|
* @returns Count of messages with attachments
|
||||||
|
*/
|
||||||
|
protected getUnreadMessagesWithAttachmentsCount(sessionID: string, dialogueID: string): number;
|
||||||
|
/**
|
||||||
|
* Does array have messages with uncollected rewards (includes expired rewards)
|
||||||
|
* @param messages Messages to check
|
||||||
|
* @returns true if uncollected rewards found
|
||||||
|
*/
|
||||||
|
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
||||||
removeDialogue(dialogueID: string, sessionID: string): void;
|
removeDialogue(dialogueID: string, sessionID: string): void;
|
||||||
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
||||||
setRead(dialogueIDs: string[], sessionID: string): void;
|
setRead(dialogueIDs: string[], sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get all uncollected items attached to mail in a particular dialog
|
||||||
|
* @param dialogueID Dialog to get mail attachments from
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
||||||
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
/**
|
||||||
|
* Get messages from a specific dialog that have items not expired
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param dialogueId Dialog to get mail attachments from
|
||||||
|
* @returns Message array
|
||||||
|
*/
|
||||||
|
protected getActiveMessagesFromDialog(sessionId: string, dialogueId: string): Message[];
|
||||||
|
/**
|
||||||
|
* Return array of messages with uncollected items (includes expired)
|
||||||
|
* @param messages Messages to parse
|
||||||
|
* @returns messages with items to collect
|
||||||
|
*/
|
||||||
|
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
||||||
|
/**
|
||||||
|
* Delete expired items. triggers when updating traders.
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
protected removeExpiredItems(sessionID: string): void;
|
protected removeExpiredItems(sessionID: string): void;
|
||||||
update(): void;
|
|
||||||
}
|
}
|
||||||
|
67
types/controllers/GameController.d.ts
vendored
67
types/controllers/GameController.d.ts
vendored
@ -1,29 +1,80 @@
|
|||||||
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
|
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
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 { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class GameController {
|
export declare class GameController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected watermark: Watermark;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected localeService: LocaleService;
|
protected hideoutHelper: HideoutHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected customLocationWaveService: CustomLocationWaveService;
|
||||||
|
protected openZoneService: OpenZoneService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
protected locationConfig: ILocationConfig;
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
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
|
||||||
|
*/
|
||||||
|
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
||||||
|
/**
|
||||||
|
* Add the logged in players name to PMC name pool
|
||||||
|
* @param pmcProfile
|
||||||
|
*/
|
||||||
|
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Blank out the "test" mail message from prapor
|
||||||
|
*/
|
||||||
|
protected removePraporTestMessage(): void;
|
||||||
|
/**
|
||||||
|
* Make non-trigger-spawned raiders spawn earlier + always
|
||||||
|
*/
|
||||||
|
protected adjustLabsRaiderSpawnRate(): void;
|
||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
getServer(): any[];
|
getServer(): IServerDetails[];
|
||||||
getValidGameVersion(): any;
|
getValidGameVersion(): ICheckVersionResponse;
|
||||||
}
|
}
|
||||||
|
45
types/controllers/HealthController.d.ts
vendored
45
types/controllers/HealthController.d.ts
vendored
@ -1,23 +1,28 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
|
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
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 {
|
export declare class HealthController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
||||||
/**
|
/**
|
||||||
* stores in-raid player health
|
* stores in-raid player health
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -25,7 +30,7 @@ export declare class HealthController {
|
|||||||
* @param sessionID
|
* @param sessionID
|
||||||
* @param addEffects Should effects found be added or removed from profile
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
*/
|
*/
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||||
/**
|
/**
|
||||||
* When healing in menu
|
* When healing in menu
|
||||||
* @param pmcData
|
* @param pmcData
|
||||||
@ -34,13 +39,35 @@ export declare class HealthController {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
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;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Occurs on post-raid healing page
|
* Occurs on post-raid healing page
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param info Request data from client
|
* @param healthTreatmentRequest Request data from client
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* applies skills from hideout workout.
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param info Request data
|
||||||
|
* @param sessionID
|
||||||
|
*/
|
||||||
|
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
||||||
|
/**
|
||||||
|
* 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, output: IItemEventRouterResponse): void;
|
||||||
}
|
}
|
||||||
|
156
types/controllers/HideoutController.d.ts
vendored
156
types/controllers/HideoutController.d.ts
vendored
@ -7,7 +7,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||||
|
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
|
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
@ -16,19 +18,23 @@ import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTa
|
|||||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
import { IQteData } from "../models/eft/hideout/IQteData";
|
||||||
|
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class HideoutController {
|
export declare class HideoutController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
@ -40,19 +46,36 @@ export declare class HideoutController {
|
|||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected hideoutHelper: HideoutHelper;
|
protected hideoutHelper: HideoutHelper;
|
||||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected fenceService: FenceService;
|
||||||
protected static nameBackendCountersCrafting: string;
|
protected static nameBackendCountersCrafting: string;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
|
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);
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
/**
|
||||||
|
* 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
|
* Create item in hideout slot item array, remove item from player inventory
|
||||||
* @param pmcData Profile data
|
* @param pmcData Profile data
|
||||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||||
@ -60,7 +83,14 @@ export declare class HideoutController {
|
|||||||
* @returns IItemEventRouterResponse object
|
* @returns IItemEventRouterResponse object
|
||||||
*/
|
*/
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
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
|
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -71,7 +101,21 @@ export declare class HideoutController {
|
|||||||
* @returns IItemEventRouterResponse response
|
* @returns IItemEventRouterResponse response
|
||||||
*/
|
*/
|
||||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
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;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handles event after clicking 'start' on the scav case hideout page
|
* Handles event after clicking 'start' on the scav case hideout page
|
||||||
@ -81,24 +125,96 @@ export declare class HideoutController {
|
|||||||
* @returns item event router response
|
* @returns item event router response
|
||||||
*/
|
*/
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
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
|
* Add generated scav case rewards to player profile
|
||||||
* @param pmcData player profile to add rewards to
|
* @param pmcData player profile to add rewards to
|
||||||
* @param rewards reward items to add to profile
|
* @param rewards reward items to add to profile
|
||||||
|
* @param recipieId recipie id to save into Production dict
|
||||||
*/
|
*/
|
||||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
/**
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
* Start production of continuously created item
|
||||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
* @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'
|
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||||
* @param sessionID
|
* @param sessionID Session id
|
||||||
* @param pmcData
|
* @param pmcData Player profile
|
||||||
* @param body
|
* @param request Get rewards from scavcase craft request
|
||||||
* @param output
|
* @param output Output object to update
|
||||||
* @returns
|
* @returns 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
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns IQteData array
|
||||||
|
*/
|
||||||
|
getQteList(sessionId: string): IQteData[];
|
||||||
|
/**
|
||||||
|
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||||
|
* Called after completing workout at gym
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Profile to adjust
|
||||||
|
* @param request QTE result object
|
||||||
|
*/
|
||||||
|
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Record a high score from the shooting range into a player profiles overallcounters
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Profile to update
|
||||||
|
* @param request shooting range score request
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle client/game/profile/items/moving - HideoutImproveArea
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param pmcData profile to improve area in
|
||||||
|
* @param request improve area request data
|
||||||
|
*/
|
||||||
|
improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Function called every x seconds as part of onUpdate event
|
||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
update(): void;
|
update(): void;
|
||||||
}
|
}
|
||||||
|
71
types/controllers/InraidController.d.ts
vendored
71
types/controllers/InraidController.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
@ -6,8 +7,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
|||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
@ -16,6 +19,9 @@ import { SaveServer } from "../servers/SaveServer";
|
|||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
/**
|
||||||
|
* Logic for handling In Raid callbacks
|
||||||
|
*/
|
||||||
export declare class InraidController {
|
export declare class InraidController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -30,17 +36,47 @@ export declare class InraidController {
|
|||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected inRaidHelper: InRaidHelper;
|
protected inRaidHelper: InRaidHelper;
|
||||||
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
|
||||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
|
||||||
/**
|
/**
|
||||||
* Handle updating the profile post-pmc raid
|
* Save locationId to active profiles inraid object AND app context
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param info Register player request
|
||||||
|
*/
|
||||||
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
|
/**
|
||||||
|
* Save profile state to disk
|
||||||
|
* Handles pmc/pscav
|
||||||
|
* @param offraidData post-raid request data
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
savePostRaidProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Handle updating player profile post-pmc raid
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @param offraidData post-raid data of raid
|
* @param offraidData post-raid data
|
||||||
*/
|
*/
|
||||||
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||||
|
/**
|
||||||
|
* Make changes to pmc profile after they left raid dead,
|
||||||
|
* alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
||||||
|
* @param postRaidSaveRequest post-raid save request
|
||||||
|
* @param pmcData pmc profile
|
||||||
|
* @param insuranceEnabled is insurance enabled
|
||||||
|
* @param preRaidGear gear player had before raid
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns Updated profile object
|
||||||
|
*/
|
||||||
|
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Adjust player characters bodypart hp if they left raid early
|
||||||
|
* @param postRaidSaveRequest post raid data
|
||||||
|
* @param pmcData player profile
|
||||||
|
*/
|
||||||
|
protected updatePmcHealthPostRaid(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Reduce body part hp to % of max
|
* Reduce body part hp to % of max
|
||||||
* @param pmcData profile to edit
|
* @param pmcData profile to edit
|
||||||
@ -66,6 +102,31 @@ export declare class InraidController {
|
|||||||
* @param isPlayerScav Was the player a pScav
|
* @param isPlayerScav Was the player a pScav
|
||||||
*/
|
*/
|
||||||
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
||||||
|
/**
|
||||||
|
* Update profile after player completes scav raid
|
||||||
|
* @param scavData Scav profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param offraidData Post-raid save request
|
||||||
|
* @param pmcData Pmc profile
|
||||||
|
* @param isDead Is player dead
|
||||||
|
*/
|
||||||
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
||||||
|
/**
|
||||||
|
* Update profile with scav karma values based on in-raid actions
|
||||||
|
* @param pmcData Pmc profile
|
||||||
|
* @param offraidData Post-raid save request
|
||||||
|
* @param scavData Scav profile
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Get the inraid config from configs/inraid.json
|
||||||
|
* @returns InRaid Config
|
||||||
|
*/
|
||||||
|
getInraidConfig(): IInRaidConfig;
|
||||||
|
/**
|
||||||
|
* Get airdrop config from configs/airdrop.json
|
||||||
|
* @returns Airdrop config
|
||||||
|
*/
|
||||||
|
getAirdropConfig(): IAirdropConfig;
|
||||||
}
|
}
|
||||||
|
19
types/controllers/InsuranceController.d.ts
vendored
19
types/controllers/InsuranceController.d.ts
vendored
@ -8,7 +8,7 @@ import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
@ -19,7 +19,7 @@ import { TimeUtil } from "../utils/TimeUtil";
|
|||||||
export declare class InsuranceController {
|
export declare class InsuranceController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -30,15 +30,24 @@ export declare class InsuranceController {
|
|||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, itemEventRouter: ItemEventRouter, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required
|
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);
|
||||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
/**
|
||||||
|
* Process insurance items prior to being given to player in mail
|
||||||
|
*/
|
||||||
processReturn(): void;
|
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;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Calculate insurance cost
|
* Calculate insurance cost
|
||||||
* @param info request object
|
* @param info request object
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @returns response object to send to client
|
* @returns IGetInsuranceCostResponseData object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
|
38
types/controllers/InventoryController.d.ts
vendored
38
types/controllers/InventoryController.d.ts
vendored
@ -2,6 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
|
|||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -20,34 +21,46 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
|||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
|
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class InventoryController {
|
export declare class InventoryController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected localisationService: LocalisationService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||||
* otherwise, move is contained within the same profile_f.
|
* otherwise, move is contained within the same profile_f.
|
||||||
|
* @param pmcData Profile
|
||||||
|
* @param moveRequest Move request data
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
@ -116,10 +129,23 @@ export declare class InventoryController {
|
|||||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
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;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||||
|
* @param pmcData Profile data
|
||||||
|
* @param body open loot container request data
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
4
types/controllers/LocationController.d.ts
vendored
4
types/controllers/LocationController.d.ts
vendored
@ -7,6 +7,7 @@ import { LootItem } from "../models/spt/services/LootItem";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -15,12 +16,13 @@ export declare class LocationController {
|
|||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected locationGenerator: LocationGenerator;
|
protected locationGenerator: LocationGenerator;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||||
get(location: string): ILocationBase;
|
get(location: string): ILocationBase;
|
||||||
generate(name: string): ILocationBase;
|
generate(name: string): ILocationBase;
|
||||||
generateAll(): ILocationsGenerateAllResponse;
|
generateAll(): ILocationsGenerateAllResponse;
|
||||||
|
19
types/controllers/MatchController.d.ts
vendored
19
types/controllers/MatchController.d.ts
vendored
@ -6,9 +6,9 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
|||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
|
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||||
@ -18,7 +18,6 @@ import { SaveServer } from "../servers/SaveServer";
|
|||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
import { MatchLocationService } from "../services/MatchLocationService";
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
import { PmcAiService } from "../services/PmcAiService";
|
|
||||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||||
export declare class MatchController {
|
export declare class MatchController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -29,13 +28,12 @@ export declare class MatchController {
|
|||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
protected pmcAiService: PmcAiService;
|
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
protected botGenerationCacheService: BotGenerationCacheService;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected matchConfig: IMatchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, pmcAiService: PmcAiService, 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;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
@ -43,6 +41,17 @@ export declare class MatchController {
|
|||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
protected getMatch(location: string): any;
|
protected getMatch(location: string): any;
|
||||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
/**
|
||||||
|
* Handle /client/raid/configuration
|
||||||
|
* @param request
|
||||||
|
* @param sessionID
|
||||||
|
*/
|
||||||
|
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Convert a difficulty value from pre-raid screen to a bot difficulty
|
||||||
|
* @param botDifficulty dropdown difficulty value
|
||||||
|
* @returns bot difficulty
|
||||||
|
*/
|
||||||
|
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||||
}
|
}
|
||||||
|
6
types/controllers/NoteController.d.ts
vendored
6
types/controllers/NoteController.d.ts
vendored
@ -1,10 +1,10 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
export declare class NoteController {
|
export declare class NoteController {
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
constructor(itemEventRouter: ItemEventRouter);
|
constructor(eventOutputHolder: EventOutputHolder);
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
6
types/controllers/PresetBuildController.d.ts
vendored
6
types/controllers/PresetBuildController.d.ts
vendored
@ -3,15 +3,15 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
export declare class PresetBuildController {
|
export declare class PresetBuildController {
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
|
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
getUserBuilds(sessionID: string): WeaponBuild[];
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
4
types/controllers/ProfileController.d.ts
vendored
4
types/controllers/ProfileController.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||||
@ -24,8 +25,9 @@ export declare class ProfileController {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
getMiniProfiles(): IMiniProfile[];
|
getMiniProfiles(): IMiniProfile[];
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): any;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
|
51
types/controllers/QuestController.d.ts
vendored
51
types/controllers/QuestController.d.ts
vendored
@ -5,22 +5,26 @@ import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
|||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class QuestController {
|
export declare class QuestController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
@ -29,9 +33,10 @@ export declare class QuestController {
|
|||||||
protected questConditionHelper: QuestConditionHelper;
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get all quests visible to player
|
* Get all quests visible to player
|
||||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||||
@ -55,7 +60,30 @@ export declare class QuestController {
|
|||||||
* @returns client response
|
* @returns client response
|
||||||
*/
|
*/
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead
|
||||||
|
* @param startedMessageTextId startedMessageText property from IQuest
|
||||||
|
* @param questDescriptionId description property from IQuest
|
||||||
|
* @returns message id
|
||||||
|
*/
|
||||||
|
protected getMessageIdForQuestStart(startedMessageTextId: string, questDescriptionId: string): string;
|
||||||
|
/**
|
||||||
|
* Handle the client accepting a repeatable quest and starting it
|
||||||
|
* Send starting rewards if any to player and
|
||||||
|
* Send start notification if any to player
|
||||||
|
* @param pmcData Profile to update with new quest
|
||||||
|
* @param acceptedQuest Quest being accepted
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Look for an accepted quest inside player profile, return matching
|
||||||
|
* @param pmcData Profile to search through
|
||||||
|
* @param acceptedQuest Quest to search for
|
||||||
|
* @returns IRepeatableQuest
|
||||||
|
*/
|
||||||
|
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Update completed quest in profile
|
* Update completed quest in profile
|
||||||
* Add newly unlocked quests to profile
|
* Add newly unlocked quests to profile
|
||||||
@ -67,13 +95,20 @@ export declare class QuestController {
|
|||||||
*/
|
*/
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Send a popup to player on completion of a quest
|
* Send a popup to player on successful completion of a quest
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @param pmcData player profile
|
* @param pmcData Player profile
|
||||||
* @param completedQuestId completed quest id
|
* @param completedQuestId Completed quest id
|
||||||
* @param questRewards rewards given to player
|
* @param questRewards Rewards given to player
|
||||||
*/
|
*/
|
||||||
protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
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
|
* Returns a list of quests that should be failed when a quest is completed
|
||||||
* @param completedQuestId quest completed id
|
* @param completedQuestId quest completed id
|
||||||
|
56
types/controllers/RagfairController.d.ts
vendored
56
types/controllers/RagfairController.d.ts
vendored
@ -12,6 +12,7 @@ import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
|||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
@ -23,11 +24,12 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
|||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
@ -41,7 +43,7 @@ export declare class RagfairController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -61,22 +63,64 @@ export declare class RagfairController {
|
|||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
||||||
|
/**
|
||||||
|
* Get offers for the client based on type of search being performed
|
||||||
|
* @param searchRequest Client search request data
|
||||||
|
* @param itemsToAdd
|
||||||
|
* @param traderAssorts Trader assorts
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
* @returns array of offers
|
||||||
|
*/
|
||||||
|
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get categories for the type of search being performed, linked/required/all
|
||||||
|
* @param searchRequest Client search request data
|
||||||
|
* @param offers ragfair offers to get categories for
|
||||||
|
* @returns record with tpls + counts
|
||||||
|
*/
|
||||||
|
protected getSpecificCategories(searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
|
/**
|
||||||
|
* Add Required offers to offers result
|
||||||
|
* @param searchRequest Client search request data
|
||||||
|
* @param assorts
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
* @param result Result object being sent back to client
|
||||||
|
*/
|
||||||
|
protected addRequiredOffersToResult(searchRequest: ISearchRequestData, assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData, result: IGetOffersResult): void;
|
||||||
|
/**
|
||||||
|
* Add index to all offers passed in (0-indexed)
|
||||||
|
* @param offers Offers to add index value to
|
||||||
|
*/
|
||||||
|
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
||||||
/**
|
/**
|
||||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
* Update a trader flea offer with buy restrictions stored in the traders assort
|
||||||
* @param offer flea offer to update
|
* @param offer flea offer to update
|
||||||
|
* @param profile full profile of player
|
||||||
*/
|
*/
|
||||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer): void;
|
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 isLinkedSearch(info: ISearchRequestData): boolean;
|
||||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||||
update(): void;
|
update(): void;
|
||||||
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
/**
|
||||||
|
* Called when creating an offer on flea, fills values in top right corner
|
||||||
|
* @param getPriceRequest
|
||||||
|
* @returns min/avg/max values for an item based on flea offers available
|
||||||
|
*/
|
||||||
|
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||||
getAllFleaPrices(): Record<string, number>;
|
getAllFleaPrices(): Record<string, number>;
|
||||||
|
getStaticPrices(): Record<string, number>;
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
22
types/controllers/RepairController.d.ts
vendored
22
types/controllers/RepairController.d.ts
vendored
@ -7,35 +7,35 @@ import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionData
|
|||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { RepairService } from "../services/RepairService";
|
||||||
export declare class RepairController {
|
export declare class RepairController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected repairHelper: RepairHelper;
|
protected repairHelper: RepairHelper;
|
||||||
protected configServer: ConfigServer;
|
protected repairService: RepairService;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
||||||
/**
|
/**
|
||||||
* Repair with trader
|
* Repair with trader
|
||||||
* @param pmcData player profile
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param pmcData player profile
|
||||||
* @returns item event router action
|
* @returns item event router action
|
||||||
*/
|
*/
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Repair with repair kit
|
* Repair with repair kit
|
||||||
* @param pmcData player profile
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param pmcData player profile
|
||||||
* @returns item event router action
|
* @returns item event router action
|
||||||
*/
|
*/
|
||||||
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
35
types/controllers/RepeatableQuestController.d.ts
vendored
35
types/controllers/RepeatableQuestController.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
@ -13,12 +14,14 @@ import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQ
|
|||||||
import { ELocationName } from "../models/enums/ELocationName";
|
import { ELocationName } from "../models/enums/ELocationName";
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
@ -55,6 +58,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -62,14 +66,16 @@ export declare class RepeatableQuestController {
|
|||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, itemEventRouter: ItemEventRouter, 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
|
* 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.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -96,6 +102,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
|
* @param repeatableConfig daily/weekly config
|
||||||
|
* @param pmcData Profile to search
|
||||||
|
* @returns IPmcDataRepeatableQuest
|
||||||
|
*/
|
||||||
|
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
@ -104,17 +117,18 @@ export declare class RepeatableQuestController {
|
|||||||
/**
|
/**
|
||||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
* 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
|
* 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
|
* The templates include Elimination, Completion and Extraction quest types
|
||||||
*
|
*
|
||||||
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
* @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
|
* @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)
|
* (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
|
* Generates a valid Exploration quest
|
||||||
*
|
*
|
||||||
@ -144,6 +158,12 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||||
|
/**
|
||||||
|
* Cpnvert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
||||||
|
* @param locationKey e.g factory4_day
|
||||||
|
* @returns guid
|
||||||
|
*/
|
||||||
|
protected getQuestLocationByMapId(locationKey: string): string;
|
||||||
/**
|
/**
|
||||||
* Exploration repeatable quests can specify a required extraction point.
|
* Exploration repeatable quests can specify a required extraction point.
|
||||||
* This method creates the according object which will be appended to the conditions array
|
* This method creates the according object which will be appended to the conditions array
|
||||||
@ -219,16 +239,17 @@ export declare class RepeatableQuestController {
|
|||||||
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
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)
|
* 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],...]
|
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
||||||
*/
|
*/
|
||||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
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
|
* 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.
|
* 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
|
* @returns boolean: true if item is valid reward
|
||||||
*/
|
*/
|
||||||
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||||
|
22
types/controllers/TradeController.d.ts
vendored
22
types/controllers/TradeController.d.ts
vendored
@ -1,20 +1,30 @@
|
|||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { TradeHelper } from "../helpers/TradeHelper";
|
import { TradeHelper } from "../helpers/TradeHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
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 { Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
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 {
|
declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected itemEventRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
|
protected 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;
|
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
13
types/controllers/TraderController.d.ts
vendored
13
types/controllers/TraderController.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
@ -6,6 +7,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
|
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class TraderController {
|
export declare class TraderController {
|
||||||
@ -16,9 +18,11 @@ export declare class TraderController {
|
|||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected traderAssortService: TraderAssortService;
|
protected traderAssortService: TraderAssortService;
|
||||||
|
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
|
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, jsonUtil: JsonUtil);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
||||||
/**
|
/**
|
||||||
* Runs when onLoad event is fired
|
* Runs when onLoad event is fired
|
||||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||||
@ -38,6 +42,13 @@ export declare class TraderController {
|
|||||||
* @returns array if ITraderBase objects
|
* @returns array if ITraderBase objects
|
||||||
*/
|
*/
|
||||||
getAllTraders(sessionID: string): ITraderBase[];
|
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;
|
getTrader(sessionID: string, traderID: string): ITraderBase;
|
||||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
||||||
|
9
types/controllers/WeatherController.d.ts
vendored
9
types/controllers/WeatherController.d.ts
vendored
@ -1,11 +1,18 @@
|
|||||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class WeatherController {
|
export declare class WeatherController {
|
||||||
protected weatherGenerator: WeatherGenerator;
|
protected weatherGenerator: WeatherGenerator;
|
||||||
|
protected logger: ILogger;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
||||||
generate(): IWeatherData;
|
generate(): IWeatherData;
|
||||||
|
/**
|
||||||
|
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
||||||
|
* @returns Date object
|
||||||
|
*/
|
||||||
|
getCurrentInRaidTime(): Date;
|
||||||
}
|
}
|
||||||
|
8
types/controllers/WishlistController.d.ts
vendored
8
types/controllers/WishlistController.d.ts
vendored
@ -1,10 +1,10 @@
|
|||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
export declare class WishlistController {
|
export declare class WishlistController {
|
||||||
protected itemEvenRouter: ItemEventRouter;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
constructor(itemEvenRouter: ItemEventRouter);
|
constructor(eventOutputHolder: EventOutputHolder);
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
1
types/di/Container.d.ts
vendored
1
types/di/Container.d.ts
vendored
@ -3,6 +3,7 @@ import { DependencyContainer } from "tsyringe";
|
|||||||
* Handle the registration of classes to be used by the Dependency Injection code
|
* Handle the registration of classes to be used by the Dependency Injection code
|
||||||
*/
|
*/
|
||||||
export declare class Container {
|
export declare class Container {
|
||||||
|
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
|
||||||
static registerTypes(depContainer: DependencyContainer): void;
|
static registerTypes(depContainer: DependencyContainer): void;
|
||||||
static registerListTypes(depContainer: DependencyContainer): void;
|
static registerListTypes(depContainer: DependencyContainer): void;
|
||||||
private static registerUtils;
|
private static registerUtils;
|
||||||
|
4
types/di/OnLoad.d.ts
vendored
4
types/di/OnLoad.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
export declare class OnLoad {
|
export interface OnLoad {
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
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): boolean;
|
|
||||||
onLoad(): void;
|
|
||||||
getRoute(): string;
|
|
||||||
}
|
|
4
types/di/OnUpdate.d.ts
vendored
4
types/di/OnUpdate.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
export declare class OnUpdate {
|
export interface OnUpdate {
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
5
types/di/Serializer.d.ts
vendored
5
types/di/Serializer.d.ts
vendored
@ -1,5 +1,6 @@
|
|||||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
/// <reference types="node" />
|
||||||
|
import { IncomingMessage, ServerResponse } from "http";
|
||||||
export declare class Serializer {
|
export declare class Serializer {
|
||||||
serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void;
|
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
||||||
canHandle(something: string): boolean;
|
canHandle(something: string): boolean;
|
||||||
}
|
}
|
||||||
|
200
types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
200
types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProbabilityHelper } from "../helpers/ProbabilityHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
|
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotEquipmentModGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected probabilityHelper: ProbabilityHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Check mods are compatible and add to array
|
||||||
|
* @param equipment Equipment item to add mods to
|
||||||
|
* @param modPool Mod list to choose frm
|
||||||
|
* @param parentId parentid of item to add mod to
|
||||||
|
* @param parentTemplate template objet of item to add mods to
|
||||||
|
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
||||||
|
* @param botRole the bot role being generated for
|
||||||
|
* @param forceSpawn should this mod be forced to spawn
|
||||||
|
* @returns Item + compatible mods as an array
|
||||||
|
*/
|
||||||
|
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
||||||
|
/**
|
||||||
|
* Add mods to a weapon using the provided mod pool
|
||||||
|
* @param sessionId session id
|
||||||
|
* @param weapon Weapon to add mods to
|
||||||
|
* @param modPool Pool of compatible mods to attach to weapon
|
||||||
|
* @param weaponParentId parentId of weapon
|
||||||
|
* @param parentTemplate Weapon which mods will be generated on
|
||||||
|
* @param modSpawnChances Mod spawn chances
|
||||||
|
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
||||||
|
* @param botRole Role of bot weapon is generated for
|
||||||
|
* @param botLevel lvel of the bot weapon is being generated for
|
||||||
|
* @param modLimits limits placed on certian mod types per gun
|
||||||
|
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
||||||
|
* @returns Weapon + mods array
|
||||||
|
*/
|
||||||
|
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
||||||
|
/**
|
||||||
|
* Is this modslot a front or rear sight
|
||||||
|
* @param modSlot Slot to check
|
||||||
|
* @returns true if it's a front/rear sight
|
||||||
|
*/
|
||||||
|
protected modIsFrontOrRearSight(modSlot: string): boolean;
|
||||||
|
/**
|
||||||
|
* Does the provided mod details show the mod can hold a scope
|
||||||
|
* @param modSlot e.g. mod_scope, mod_mount
|
||||||
|
* @param modsParentId Parent id of mod item
|
||||||
|
* @returns true if it can hold a scope
|
||||||
|
*/
|
||||||
|
protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Set all scope mod chances to 100%
|
||||||
|
* @param modSpawnChances Chances objet to update
|
||||||
|
*/
|
||||||
|
protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void;
|
||||||
|
protected sortModKeys(unsortedKeys: string[]): string[];
|
||||||
|
/**
|
||||||
|
* Get a Slot property for an item (chamber/cartridge/slot)
|
||||||
|
* @param modSlot e.g patron_in_weapon
|
||||||
|
* @param parentTemplate item template
|
||||||
|
* @returns Slot item
|
||||||
|
*/
|
||||||
|
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||||
|
/**
|
||||||
|
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||||
|
* never return true for an item that has 0% spawn chance
|
||||||
|
* @param itemSlot slot the item sits in
|
||||||
|
* @param modSlot slot the mod sits in
|
||||||
|
* @param modSpawnChances Chances for various mod spawns
|
||||||
|
* @returns boolean true if it should spawn
|
||||||
|
*/
|
||||||
|
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param modSlot Slot mod will fit into
|
||||||
|
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||||
|
* @param modsParent Parent slot the item will be a part of
|
||||||
|
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
||||||
|
* @param itemModPool Pool of items to pick from
|
||||||
|
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
||||||
|
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
||||||
|
* @param parentTemplate Parent item the mod will go into
|
||||||
|
* @returns ITemplateItem
|
||||||
|
*/
|
||||||
|
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
||||||
|
/**
|
||||||
|
* Create a mod item with parameters as properties
|
||||||
|
* @param modId _id
|
||||||
|
* @param modTpl _tpl
|
||||||
|
* @param parentId parentId
|
||||||
|
* @param modSlot slotId
|
||||||
|
* @param modTemplate Used to add additional properites in the upd object
|
||||||
|
* @returns Item object
|
||||||
|
*/
|
||||||
|
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||||
|
/**
|
||||||
|
* Get a list of containers that hold ammo
|
||||||
|
* e.g. mod_magazine / patron_in_weapon_000
|
||||||
|
* @returns string array
|
||||||
|
*/
|
||||||
|
protected getAmmoContainers(): string[];
|
||||||
|
/**
|
||||||
|
* Get a random mod from an items compatible mods Filter array
|
||||||
|
* @param modTpl ???? default value to return if nothing found
|
||||||
|
* @param parentSlot item mod will go into, used to get combatible items
|
||||||
|
* @param modSlot Slot to get mod to fill
|
||||||
|
* @param items items to ensure picked mod is compatible with
|
||||||
|
* @returns item tpl
|
||||||
|
*/
|
||||||
|
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||||
|
/**
|
||||||
|
* Log errors if mod is not compatible with slot
|
||||||
|
* @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 template of the mods parent item
|
||||||
|
* @returns true if valid
|
||||||
|
*/
|
||||||
|
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
||||||
|
/**
|
||||||
|
* Find mod tpls of a provided type and add to modPool
|
||||||
|
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
||||||
|
* @param modTemplate db object for modItem we get compatible mods from
|
||||||
|
* @param modPool Pool of mods we are adding to
|
||||||
|
*/
|
||||||
|
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
||||||
|
/**
|
||||||
|
* Get the possible items that fit a slot
|
||||||
|
* @param parentItemId item tpl to get compatible items for
|
||||||
|
* @param modSlot Slot item should fit in
|
||||||
|
* @param botEquipBlacklist equipment that should not be picked
|
||||||
|
* @returns array of compatible items for that slot
|
||||||
|
*/
|
||||||
|
protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[];
|
||||||
|
/**
|
||||||
|
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
||||||
|
* @param allowedMods base mods to filter
|
||||||
|
* @param botEquipBlacklist equipment blacklist
|
||||||
|
* @param modSlot slot mods belong to
|
||||||
|
* @returns Filtered array of mod tpls
|
||||||
|
*/
|
||||||
|
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
||||||
|
/**
|
||||||
|
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||||
|
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
||||||
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
|
* @param modPool modPool which should include available cartrigdes
|
||||||
|
* @param parentId The CylinderMagazine's UID
|
||||||
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
|
*/
|
||||||
|
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Take a record of camoras and merge the compatable shells into one array
|
||||||
|
* @param camorasWithShells camoras we want to merge into one array
|
||||||
|
* @returns string array of shells fro luitple camora sources
|
||||||
|
*/
|
||||||
|
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||||
|
/**
|
||||||
|
* Filter out non-whitelisted weapon scopes
|
||||||
|
* @param weapon Weapon scopes will be added to
|
||||||
|
* @param scopes Full scope pool
|
||||||
|
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
||||||
|
* @returns array of scope tpls that have been filtered
|
||||||
|
*/
|
||||||
|
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
||||||
|
}
|
82
types/generators/BotGenerator.d.ts
vendored
82
types/generators/BotGenerator.d.ts
vendored
@ -1,40 +1,40 @@
|
|||||||
|
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
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, Inventory } from "../models/eft/common/tables/IBotType";
|
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
import { PmcAiService } from "../services/PmcAiService";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
declare namespace BotGenerator {
|
import { BotLevelGenerator } from "./BotLevelGenerator";
|
||||||
interface IRandomisedBotLevelResult {
|
|
||||||
level: number;
|
|
||||||
exp: number;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export declare class BotGenerator {
|
export declare class BotGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected botInventoryGenerator: BotInventoryGenerator;
|
protected botInventoryGenerator: BotInventoryGenerator;
|
||||||
|
protected botLevelGenerator: BotLevelGenerator;
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected gameEventHelper: GameEventHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected pmcAiService: PmcAiService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, pmcAiService: PmcAiService, 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
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -44,17 +44,12 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Generate an array of bot objects for populate a raid with
|
* Create x number of bots of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId session id
|
* @param sessionId Session id
|
||||||
* @param info request object
|
* @param botGenerationDetails details on how to generate bots
|
||||||
* @returns bot array
|
* @returns array of bots
|
||||||
*/
|
*/
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
||||||
/**
|
|
||||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
|
||||||
* @returns pmc side as string
|
|
||||||
*/
|
|
||||||
protected getRandomisedPmcSide(): string;
|
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -64,26 +59,24 @@ export declare class BotGenerator {
|
|||||||
* Create a IBotBase object with equipment/loot/exp etc
|
* Create a IBotBase object with equipment/loot/exp etc
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param bot bots base file
|
* @param bot bots base file
|
||||||
* @param role botRole bot will use
|
* @param botJsonTemplate Bot template from db/bots/x.json
|
||||||
* @param node Bot template from db/bots/x.json
|
* @param botGenerationDetails details on how to generate the bot
|
||||||
* @param isPmc Is bot to be a PMC
|
|
||||||
* @param isPlayerScav is bot to be a p scav bot
|
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateBot(sessionId: string, bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
|
/**
|
||||||
|
* Create a bot nickname
|
||||||
|
* @param botJsonTemplate x.json from database
|
||||||
|
* @param isPlayerScav Will bot be player scav
|
||||||
|
* @param botRole role of bot e.g. assault
|
||||||
|
* @returns Nickname for bot
|
||||||
|
*/
|
||||||
|
protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
*/
|
*/
|
||||||
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
/**
|
|
||||||
* Return a randomised bot level and exp value
|
|
||||||
* @param role botRole being generated for
|
|
||||||
* @param min Min exp value
|
|
||||||
* @param max Max exp value
|
|
||||||
* @returns IRandomisedBotLevelResult object
|
|
||||||
*/
|
|
||||||
protected generateRandomLevel(role: string, min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
|
||||||
/**
|
/**
|
||||||
* Converts health object to the required format
|
* Converts health object to the required format
|
||||||
* @param healthObj health object from bot json
|
* @param healthObj health object from bot json
|
||||||
@ -92,11 +85,6 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
/**
|
|
||||||
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
|
||||||
* @param nodeInventory Bots inventory to iterate over
|
|
||||||
*/
|
|
||||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
|
||||||
/**
|
/**
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
@ -105,11 +93,12 @@ export declare class BotGenerator {
|
|||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
* Randomise a bots game version and account category
|
||||||
* @param requestedDifficulty
|
* Chooses from all the game versions (standard, eod etc)
|
||||||
* @returns
|
* Chooses account type (default, Sherpa, etc)
|
||||||
|
* @param botInfo bot info object to update
|
||||||
*/
|
*/
|
||||||
protected getPMCDifficulty(requestedDifficulty: string): string;
|
protected getRandomisedGameVersionAndCategory(botInfo: Info): void;
|
||||||
/**
|
/**
|
||||||
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
* @param bot bot to add dogtag to
|
* @param bot bot to add dogtag to
|
||||||
@ -117,4 +106,3 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
}
|
}
|
||||||
export {};
|
|
||||||
|
93
types/generators/BotInventoryGenerator.d.ts
vendored
93
types/generators/BotInventoryGenerator.d.ts
vendored
@ -1,14 +1,18 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Generation, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||||
import { BotLootGenerator } from "./BotLootGenerator";
|
import { BotLootGenerator } from "./BotLootGenerator";
|
||||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
export declare class BotInventoryGenerator {
|
export declare class BotInventoryGenerator {
|
||||||
@ -19,15 +23,90 @@ export declare class BotInventoryGenerator {
|
|||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
protected botLootGenerator: BotLootGenerator;
|
protected botLootGenerator: BotLootGenerator;
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
||||||
generateInventory(sessionId: string, templateInventory: Inventory, equipmentChances: Chances, itemGenerationLimitsMinMax: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
/**
|
||||||
|
* Add equipment/weapons/loot to bot
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param botJsonTemplate bot/x.json data from db
|
||||||
|
* @param botRole Role bot has (assault/pmcBot)
|
||||||
|
* @param isPmc Is bot being converted into a pmc
|
||||||
|
* @param botLevel Level of bot being generated
|
||||||
|
* @returns PmcInventory object with equipment/weapons/loot
|
||||||
|
*/
|
||||||
|
generateInventory(sessionId: string, botJsonTemplate: IBotType, botRole: string, isPmc: boolean, botLevel: number): PmcInventory;
|
||||||
|
/**
|
||||||
|
* Create a pmcInventory object with all the base/generic items needed
|
||||||
|
* @returns PmcInventory object
|
||||||
|
*/
|
||||||
|
protected generateInventoryBase(): PmcInventory;
|
||||||
|
/**
|
||||||
|
* Add equipment to a bot
|
||||||
|
* @param templateInventory bot/x.json data from db
|
||||||
|
* @param equipmentChances Chances items will be added to bot
|
||||||
|
* @param botRole Role bot has (assault/pmcBot)
|
||||||
|
* @param botInventory Inventory to add equipment to
|
||||||
|
* @param botLevel Level of bot
|
||||||
|
*/
|
||||||
|
protected generateAndAddEquipmentToBot(templateInventory: Inventory, equipmentChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
||||||
|
/**
|
||||||
|
* Add a piece of equipment with mods to inventory from the provided pools
|
||||||
|
* @param equipmentSlot Slot to select an item for
|
||||||
|
* @param equipmentPool Possible items to choose from
|
||||||
|
* @param modPool Possible mods to apply to item chosen
|
||||||
|
* @param spawnChances Chances items will be chosen to be added
|
||||||
|
* @param botRole Role of bot e.g. assault
|
||||||
|
* @param inventory Inventory to add item into
|
||||||
|
* @param randomisationDetails settings from bot.json to adjust how item is generated
|
||||||
|
*/
|
||||||
|
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void;
|
||||||
|
/**
|
||||||
|
* Get all possible mods for item and filter down based on equipment blacklist from bot.json config
|
||||||
|
* @param itemTpl Item mod pool is being retreived and filtered
|
||||||
|
* @param equipmentBlacklist blacklist to filter mod pool with
|
||||||
|
* @returns Filtered pool of mods
|
||||||
|
*/
|
||||||
|
protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record<string, string[]>;
|
||||||
|
/**
|
||||||
|
* Work out what weapons bot should have equipped and add them to bot inventory
|
||||||
|
* @param templateInventory bot/x.json data from db
|
||||||
|
* @param equipmentChances Chances bot can have equipment equipped
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param botInventory Inventory to add weapons to
|
||||||
|
* @param botRole assault/pmcBot/bossTagilla etc
|
||||||
|
* @param isPmc Is the bot being generated as a pmc
|
||||||
|
* @param botLevel level of bot having weapon generated
|
||||||
|
* @param itemGenerationLimitsMinMax Limits for items the bot can have
|
||||||
|
*/
|
||||||
|
protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void;
|
||||||
|
/**
|
||||||
|
* Calculate if the bot should have weapons in Primary/Secondary/Holster slots
|
||||||
|
* @param equipmentChances Chances bot has certain equipment
|
||||||
|
* @returns What slots bot should have weapons generated for
|
||||||
|
*/
|
||||||
|
protected getDesiredWeaponsForBot(equipmentChances: Chances): {
|
||||||
|
slot: EquipmentSlots;
|
||||||
|
shouldSpawn: boolean;
|
||||||
|
}[];
|
||||||
|
/**
|
||||||
|
* Add weapon + spare mags/ammo to bots inventory
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param weaponSlot Weapon slot being generated
|
||||||
|
* @param templateInventory bot/x.json data from db
|
||||||
|
* @param botInventory Inventory to add weapon+mags/ammo to
|
||||||
|
* @param equipmentChances Chances bot can have equipment equipped
|
||||||
|
* @param botRole assault/pmcBot/bossTagilla etc
|
||||||
|
* @param isPmc Is the bot being generated as a pmc
|
||||||
|
* @param itemGenerationLimitsMinMax
|
||||||
|
*/
|
||||||
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
||||||
slot: EquipmentSlots;
|
slot: EquipmentSlots;
|
||||||
shouldSpawn: boolean;
|
shouldSpawn: boolean;
|
||||||
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation): void;
|
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation, botLevel: number): void;
|
||||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
|
||||||
protected generateInventoryBase(): PmcInventory;
|
|
||||||
}
|
}
|
||||||
|
29
types/generators/BotLevelGenerator.d.ts
vendored
Normal file
29
types/generators/BotLevelGenerator.d.ts
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { MinMax } from "../models/common/MinMax";
|
||||||
|
import { IRandomisedBotLevelResult } from "../models/eft/bot/IRandomisedBotLevelResult";
|
||||||
|
import { ExpTable } from "../models/eft/common/IGlobals";
|
||||||
|
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotLevelGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Return a randomised bot level and exp value
|
||||||
|
* @param levelDetails min and max of level for bot
|
||||||
|
* @param botGenerationDetails Deatils to help generate a bot
|
||||||
|
* @param bot being level is being generated for
|
||||||
|
* @returns IRandomisedBotLevelResult object
|
||||||
|
*/
|
||||||
|
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||||
|
/**
|
||||||
|
* Get the highest level a bot can be relative to the players level, but no futher than the max size from globals.exp_table
|
||||||
|
* @param playerLevel Players current level
|
||||||
|
* @param relativeDeltaMax max delta above player level to go
|
||||||
|
* @returns highest level possible for bot
|
||||||
|
*/
|
||||||
|
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: ExpTable[]): number;
|
||||||
|
}
|
23
types/generators/BotLootGenerator.d.ts
vendored
23
types/generators/BotLootGenerator.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
import { Chances, Inventory, ItemMinMax, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
@ -10,6 +11,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
@ -17,16 +19,29 @@ export declare class BotLootGenerator {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, 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);
|
||||||
generateLoot(sessionId: string, templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances): void;
|
/**
|
||||||
|
* Add loot to bots containers
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param templateInventory x.json from database/bots
|
||||||
|
* @param itemCounts Liits on item types to be added as loot
|
||||||
|
* @param isPmc Will bot be a pmc
|
||||||
|
* @param botRole Role of bot, e.g. asssult
|
||||||
|
* @param botInventory Inventory to add loot to
|
||||||
|
* @param equipmentChances
|
||||||
|
* @param botLevel Level of bot
|
||||||
|
*/
|
||||||
|
generateLoot(sessionId: string, templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances, botLevel: number): void;
|
||||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||||
/**
|
/**
|
||||||
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
||||||
@ -49,7 +64,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role, .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
/**
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
* Get a random item from the pool parameter using the biasedRandomNumber system
|
||||||
* @param pool pool of items to pick an item from
|
* @param pool pool of items to pick an item from
|
||||||
@ -113,7 +128,7 @@ export declare class BotLootGenerator {
|
|||||||
* If no limit found for a non pmc bot, fall back to defaults
|
* If no limit found for a non pmc bot, fall back to defaults
|
||||||
* @param isPmc is the bot we want limits for a pmc
|
* @param isPmc is the bot we want limits for a pmc
|
||||||
* @param botRole what role does the bot have
|
* @param botRole what role does the bot have
|
||||||
* @returns dictionary of tplIds and limit
|
* @returns Dictionary of tplIds and limit
|
||||||
*/
|
*/
|
||||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
|
29
types/generators/BotWeaponGenerator.d.ts
vendored
29
types/generators/BotWeaponGenerator.d.ts
vendored
@ -12,9 +12,12 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||||
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -27,10 +30,13 @@ export declare class BotWeaponGenerator {
|
|||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
protected inventoryMagGenComponents: IInventoryMagGen[];
|
||||||
protected readonly modMagazineSlotId = "mod_magazine";
|
protected readonly modMagazineSlotId = "mod_magazine";
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, inventoryMagGenComponents: IInventoryMagGen[]);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||||
/**
|
/**
|
||||||
* Pick a random weapon based on weightings and generate a functional weapon
|
* Pick a random weapon based on weightings and generate a functional weapon
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
@ -41,7 +47,7 @@ export declare class BotWeaponGenerator {
|
|||||||
* @param isPmc Is weapon generated for a pmc
|
* @param isPmc Is weapon generated for a pmc
|
||||||
* @returns GenerateWeaponResult object
|
* @returns GenerateWeaponResult object
|
||||||
*/
|
*/
|
||||||
generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
generateRandomWeapon(sessionId: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
||||||
/**
|
/**
|
||||||
* Get a random weighted weapon from a bots pool of weapons
|
* Get a random weighted weapon from a bots pool of weapons
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
@ -60,7 +66,7 @@ export declare class BotWeaponGenerator {
|
|||||||
* @param isPmc
|
* @param isPmc
|
||||||
* @returns GenerateWeaponResult object
|
* @returns GenerateWeaponResult object
|
||||||
*/
|
*/
|
||||||
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean): GenerateWeaponResult;
|
generateWeaponByTpl(sessionId: string, weaponTpl: string, equipmentSlot: string, botTemplateInventory: Inventory, weaponParentId: string, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): GenerateWeaponResult;
|
||||||
/**
|
/**
|
||||||
* Create array with weapon base as only element and
|
* Create array with weapon base as only element and
|
||||||
* add additional properties based on weapon type
|
* add additional properties based on weapon type
|
||||||
@ -83,9 +89,10 @@ export declare class BotWeaponGenerator {
|
|||||||
/**
|
/**
|
||||||
* Checks if all required slots are occupied on a weapon and all it's mods
|
* Checks if all required slots are occupied on a weapon and all it's mods
|
||||||
* @param weaponItemArray Weapon + mods
|
* @param weaponItemArray Weapon + mods
|
||||||
|
* @param botRole role of bot weapon is for
|
||||||
* @returns true if valid
|
* @returns true if valid
|
||||||
*/
|
*/
|
||||||
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
protected isWeaponValid(weaponItemArray: Item[], botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||||
* Additionally, adds extra bullets to SecuredContainer
|
* Additionally, adds extra bullets to SecuredContainer
|
||||||
@ -95,6 +102,13 @@ export declare class BotWeaponGenerator {
|
|||||||
* @param botRole The bot type we're getting generating extra mags for
|
* @param botRole The bot type we're getting generating extra mags for
|
||||||
*/
|
*/
|
||||||
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
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
|
* Add ammo to the secure container
|
||||||
* @param stackCount How many stacks of ammo to add
|
* @param stackCount How many stacks of ammo to add
|
||||||
@ -131,6 +145,13 @@ export declare class BotWeaponGenerator {
|
|||||||
* @param ammoTpl
|
* @param ammoTpl
|
||||||
*/
|
*/
|
||||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
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
|
* Add cartridge item to weapon Item array, if it already exists, update
|
||||||
* @param weaponMods Weapon items array to amend
|
* @param weaponMods Weapon items array to amend
|
||||||
|
28
types/generators/FenceBaseAssortGenerator.d.ts
vendored
Normal file
28
types/generators/FenceBaseAssortGenerator.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
export declare class FenceBaseAssortGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected traderConfig: ITraderConfig;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Create base fence assorts dynamically and store in db
|
||||||
|
*/
|
||||||
|
generateFenceBaseAssorts(): void;
|
||||||
|
/**
|
||||||
|
* Check if item is valid for being added to fence assorts
|
||||||
|
* @param item Item to check
|
||||||
|
* @returns true if valid fence item
|
||||||
|
*/
|
||||||
|
protected isValidFenceItem(item: ITemplateItem): boolean;
|
||||||
|
}
|
11
types/generators/LocationGenerator.d.ts
vendored
11
types/generators/LocationGenerator.d.ts
vendored
@ -1,5 +1,4 @@
|
|||||||
import { ContainerHelper } from "../helpers/ContainerHelper";
|
import { ContainerHelper } from "../helpers/ContainerHelper";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
@ -9,6 +8,8 @@ import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticL
|
|||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
@ -26,12 +27,13 @@ export declare class LocationGenerator {
|
|||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected gameEventHelper: GameEventHelper;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
@ -47,7 +49,8 @@ export declare class LocationGenerator {
|
|||||||
* Add forced spawn point loot into loot parameter array
|
* Add forced spawn point loot into loot parameter array
|
||||||
* @param loot array to add forced loot to
|
* @param loot array to add forced loot to
|
||||||
* @param forcedSpawnPoints forced loot to add
|
* @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;
|
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||||
}
|
}
|
||||||
|
22
types/generators/LootGenerator.d.ts
vendored
22
types/generators/LootGenerator.d.ts
vendored
@ -6,6 +6,7 @@ import { LootRequest } from "../models/spt/services/LootRequest";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class LootGenerator {
|
export declare class LootGenerator {
|
||||||
@ -14,11 +15,12 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on options passed in
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust what loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
* @returns An array of loot items
|
* @returns An array of loot items
|
||||||
*/
|
*/
|
||||||
createRandomloot(options: LootRequest): LootItem[];
|
createRandomloot(options: LootRequest): LootItem[];
|
||||||
@ -35,23 +37,31 @@ export declare class LootGenerator {
|
|||||||
* Find a random item in items.json and add to result array
|
* Find a random item in items.json and add to result array
|
||||||
* @param items items to choose from
|
* @param items items to choose from
|
||||||
* @param itemTypeCounts item limit counts
|
* @param itemTypeCounts item limit counts
|
||||||
|
* @param options item filters
|
||||||
* @param result array to add found item to
|
* @param result array to add found item to
|
||||||
* @returns true if item was valid and added to pool
|
* @returns true if item was valid and added to pool
|
||||||
*/
|
*/
|
||||||
protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record<string, {
|
protected findAndAddRandomItemToLoot(items: [string, ITemplateItem][], itemTypeCounts: Record<string, {
|
||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, whitelistedArmorLevels: number[], result: LootItem[]): boolean;
|
}>, options: LootRequest, result: LootItem[]): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised stack count for an item between its StackMinRandom and StackMaxSize values
|
||||||
|
* @param item item to get stack count of
|
||||||
|
* @param options loot options
|
||||||
|
* @returns stack count
|
||||||
|
*/
|
||||||
|
protected getRandomisedStackCount(item: ITemplateItem, options: LootRequest): number;
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Find a random item in items.json and add to result array
|
* Find a random item in items.json and add to result array
|
||||||
* @param globalDefaultPresets presets to choose from
|
* @param globalDefaultPresets presets to choose from
|
||||||
* @param itemTypeCounts item limit counts
|
* @param itemTypeCounts item limit counts
|
||||||
|
* @param itemBlacklist items to skip
|
||||||
* @param result array to add found preset to
|
* @param result array to add found preset to
|
||||||
* @returns true if preset was valid and added to pool
|
* @returns true if preset was valid and added to pool
|
||||||
*/
|
*/
|
||||||
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, Preset][], itemTypeCounts: Record<string, {
|
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, Preset][], itemTypeCounts: Record<string, {
|
||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
}
|
}
|
||||||
|
26
types/generators/PMCLootGenerator.d.ts
vendored
26
types/generators/PMCLootGenerator.d.ts
vendored
@ -1,8 +1,10 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
/**
|
/**
|
||||||
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
||||||
* and the removal of blacklisted items
|
* and the removal of blacklisted items
|
||||||
@ -12,10 +14,32 @@ export declare class PMCLootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected pocketLootPool: string[];
|
protected pocketLootPool: string[];
|
||||||
|
protected vestLootPool: string[];
|
||||||
protected backpackLootPool: string[];
|
protected backpackLootPool: string[];
|
||||||
protected botConfig: IBotConfig;
|
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[];
|
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[];
|
generatePMCBackpackLootPool(): string[];
|
||||||
}
|
}
|
||||||
|
14
types/generators/PlayerScavGenerator.d.ts
vendored
14
types/generators/PlayerScavGenerator.d.ts
vendored
@ -1,4 +1,7 @@
|
|||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
||||||
@ -10,21 +13,30 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotGenerator } from "./BotGenerator";
|
import { BotGenerator } from "./BotGenerator";
|
||||||
export declare class PlayerScavGenerator {
|
export declare class PlayerScavGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected botGenerator: BotGenerator;
|
protected botGenerator: BotGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected playerScavConfig: IPlayerScavConfig;
|
protected playerScavConfig: IPlayerScavConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, 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
|
* Update a player profile to include a new player scav profile
|
||||||
* @param sessionID session id to specify what profile is updated
|
* @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 { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
export declare class RagfairAssortGenerator {
|
export declare class RagfairAssortGenerator {
|
||||||
@ -11,10 +12,11 @@ export declare class RagfairAssortGenerator {
|
|||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected generatedAssortItems: Item[];
|
protected generatedAssortItems: Item[];
|
||||||
protected ragfairConfig: IRagfairConfig;
|
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
|
* Get an array of unique items that can be sold on the flea
|
||||||
* @returns array of unique items
|
* @returns array of unique items
|
||||||
|
106
types/generators/RagfairOfferGenerator.d.ts
vendored
106
types/generators/RagfairOfferGenerator.d.ts
vendored
@ -1,16 +1,19 @@
|
|||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { Dynamic, IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
@ -27,18 +30,45 @@ export declare class RagfairOfferGenerator {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected paymentHelper: PaymentHelper;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
protected allowedFleaPriceItemsForBarter: {
|
||||||
|
tpl: string;
|
||||||
|
price: number;
|
||||||
|
}[];
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||||
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
|
/**
|
||||||
|
* Calculate the offer price that's listed on the flea listing
|
||||||
|
* @param offerRequirements barter requirements for offer
|
||||||
|
* @returns rouble cost of offer
|
||||||
|
*/
|
||||||
|
protected calculateOfferListingPrice(offerRequirements: OfferRequirement[]): number;
|
||||||
|
/**
|
||||||
|
* Get avatar url from trader table in db
|
||||||
|
* @param isTrader Is user we're getting avatar for a trader
|
||||||
|
* @param userId persons id to get avatar of
|
||||||
|
* @returns url of avatar
|
||||||
|
*/
|
||||||
|
protected getAvatarUrl(isTrader: boolean, userId: string): string;
|
||||||
|
/**
|
||||||
|
* Convert a count of currency into roubles
|
||||||
|
* @param currencyCount amount of currency to convert into roubles
|
||||||
|
* @param currencyType Type of currency (euro/dollar/rouble)
|
||||||
|
* @returns count of roubles
|
||||||
|
*/
|
||||||
|
protected calculateRoublePrice(currencyCount: number, currencyType: string): number;
|
||||||
protected getTraderId(userID: string): string;
|
protected getTraderId(userID: string): string;
|
||||||
protected getRating(userID: string): number;
|
protected getRating(userID: string): number;
|
||||||
/**
|
/**
|
||||||
@ -58,13 +88,49 @@ export declare class RagfairOfferGenerator {
|
|||||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||||
* @param expiredOffers optional, expired offers to regenerate
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): void;
|
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||||
|
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Create one flea offer for a specific item
|
||||||
|
* @param items Item to create offer for
|
||||||
|
* @param isPreset Is item a weapon preset
|
||||||
|
* @param itemDetails raw db item details
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
||||||
/**
|
/**
|
||||||
* Generate trader offers on flea using the traders assort data
|
* Generate trader offers on flea using the traders assort data
|
||||||
* @param traderID Trader to generate offers for
|
* @param traderID Trader to generate offers for
|
||||||
*/
|
*/
|
||||||
generateFleaOffersForTrader(traderID: string): void;
|
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
|
* Add missing conditions to an item if needed
|
||||||
* Durabiltiy for repairable items
|
* Durabiltiy for repairable items
|
||||||
@ -72,21 +138,37 @@ export declare class RagfairOfferGenerator {
|
|||||||
* @param item item to add conditions to
|
* @param item item to add conditions to
|
||||||
* @returns Item with conditions added
|
* @returns Item with conditions added
|
||||||
*/
|
*/
|
||||||
protected addMissingCondition(item: Item): Item;
|
protected addMissingConditions(item: Item): Item;
|
||||||
protected getOfferRequirements(items: Item[]): {
|
/**
|
||||||
count: number;
|
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||||
_tpl: string;
|
* @param offerItems Items for sale in offer
|
||||||
|
* @returns barter scheme
|
||||||
|
*/
|
||||||
|
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
||||||
|
/**
|
||||||
|
* Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter`
|
||||||
|
* @returns array with tpl/price values
|
||||||
|
*/
|
||||||
|
protected getFleaPricesAsArray(): {
|
||||||
|
tpl: string;
|
||||||
|
price: number;
|
||||||
}[];
|
}[];
|
||||||
|
/**
|
||||||
|
* Create a random currency-based barter scheme for an array of items
|
||||||
|
* @param offerItems Items on offer
|
||||||
|
* @returns Barter scheme for offer
|
||||||
|
*/
|
||||||
|
protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[];
|
||||||
/**
|
/**
|
||||||
* Create a flea offer and store it in the Ragfair server offers array
|
* Create a flea offer and store it in the Ragfair server offers array
|
||||||
* @param userID owner of the offer
|
* @param userID owner of the offer
|
||||||
* @param time time offer is put up
|
* @param time time offer is put up
|
||||||
* @param items items in the offer
|
* @param items items in the offer
|
||||||
* @param barterScheme
|
* @param barterScheme cost of item (currency or barter)
|
||||||
* @param loyalLevel
|
* @param loyalLevel Loyalty level needed to buy item
|
||||||
* @param price price of offer
|
* @param price price of offer
|
||||||
* @param sellInOnePiece
|
* @param sellInOnePiece
|
||||||
* @returns
|
* @returns Ragfair offer
|
||||||
*/
|
*/
|
||||||
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||||
}
|
}
|
||||||
|
11
types/generators/ScavCaseRewardGenerator.d.ts
vendored
11
types/generators/ScavCaseRewardGenerator.d.ts
vendored
@ -2,7 +2,6 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
|||||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
|
||||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||||
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -28,21 +27,15 @@ export declare class ScavCaseRewardGenerator {
|
|||||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
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
|
* 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
|
* @returns Product array
|
||||||
*/
|
*/
|
||||||
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
generate(recipeId: string): Product[];
|
||||||
/**
|
/**
|
||||||
* Get all db items that are not blacklisted in scavcase config
|
* Get all db items that are not blacklisted in scavcase config
|
||||||
* @returns filtered array of db items
|
* @returns filtered array of db items
|
||||||
*/
|
*/
|
||||||
protected getDbItems(): ITemplateItem[];
|
protected getDbItems(): ITemplateItem[];
|
||||||
/**
|
|
||||||
* Check if a template id has a blacklisted parent id
|
|
||||||
* @param tplid template id to check
|
|
||||||
* @returns true if item is blacklisted
|
|
||||||
*/
|
|
||||||
protected itemHasBlacklistedParent(tplid: string): boolean;
|
|
||||||
/**
|
/**
|
||||||
* Pick a number of items to be rewards, the count is defined by the values in
|
* Pick a number of items to be rewards, the count is defined by the values in
|
||||||
* @param items item pool to pick rewards from
|
* @param items item pool to pick rewards from
|
||||||
|
40
types/generators/WeatherGenerator.d.ts
vendored
40
types/generators/WeatherGenerator.d.ts
vendored
@ -1,38 +1,54 @@
|
|||||||
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
import { IWeather, IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
|
import { WindDirection } from "../models/enums/WindDirection";
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class WeatherGenerator {
|
export declare class WeatherGenerator {
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
calculateTime(data: IWeatherData): IWeatherData;
|
calculateGameTime(data: IWeatherData): IWeatherData;
|
||||||
/**
|
/**
|
||||||
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
||||||
* Format to BSGs requirements
|
* Format to BSGs requirements
|
||||||
* @param computedDate current date
|
* @param currentDate current date
|
||||||
* @returns formatted time
|
* @returns formatted time
|
||||||
*/
|
*/
|
||||||
protected getAcceleratedTime(computedDate: Date): string;
|
protected getBsgFormattedInRaidTime(currentDate: Date): string;
|
||||||
|
/**
|
||||||
|
* Get the current in-raid time
|
||||||
|
* @param currentDate (new Date())
|
||||||
|
* @returns Date object of current in-raid time
|
||||||
|
*/
|
||||||
|
getInRaidTime(currentDate: Date): Date;
|
||||||
/**
|
/**
|
||||||
* Get current time formatted to fit BSGs requirement
|
* Get current time formatted to fit BSGs requirement
|
||||||
* @param computedDate date to format into bsg style
|
* @param date date to format into bsg style
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
protected getNormalTime(computedDate: Date): string;
|
protected getBSGFormattedTime(date: Date): string;
|
||||||
/**
|
/**
|
||||||
* Return randomised Weather data
|
* Return randomised Weather data with help of config/weather.json
|
||||||
* @param weatherData weather input data
|
|
||||||
* @returns Randomised weather data
|
* @returns Randomised weather data
|
||||||
*/
|
*/
|
||||||
generateWeather(weatherData: IWeatherData): IWeatherData;
|
generateWeather(): IWeather;
|
||||||
protected getWeightedFog(): string;
|
/**
|
||||||
|
* Set IWeather date/time/timestamp values to now
|
||||||
|
* @param weather Object to update
|
||||||
|
*/
|
||||||
|
protected setCurrentDateTime(weather: IWeather): void;
|
||||||
|
protected getWeightedWindDirection(): WindDirection;
|
||||||
|
protected getWeightedWindSpeed(): number;
|
||||||
|
protected getWeightedFog(): number;
|
||||||
protected getWeightedRain(): number;
|
protected getWeightedRain(): number;
|
||||||
protected getRandomFloat(node: string): number;
|
protected getRandomFloat(node: string): number;
|
||||||
protected getRandomInt(node: string): number;
|
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
||||||
import { ItemHelper } from "../../../helpers/ItemHelper";
|
import { ItemHelper } from "../../../helpers/ItemHelper";
|
||||||
import { ILogger } from "../../../models/spt/utils/ILogger";
|
import { ILogger } from "../../../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "../../../services/LocalisationService";
|
||||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
import { IInventoryMagGen } from "../IInventoryMagGen";
|
||||||
import { InventoryMagGen } from "../InventoryMagGen";
|
import { InventoryMagGen } from "../InventoryMagGen";
|
||||||
export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
||||||
getPriority(): number;
|
getPriority(): number;
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
process(inventoryMagGen: InventoryMagGen): void;
|
||||||
|
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;
|
||||||
|
}
|
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