Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
509cdff8b6 | |||
30744551f0 | |||
23ab7efadf | |||
c3866d0360 | |||
a1f8fe37a1 | |||
cc58998345 | |||
90db74d535 | |||
cce9f573ba | |||
37d356736c | |||
41c3dd6c83 | |||
df9a522516 | |||
c145035717 | |||
1fc77d6bdf | |||
7d9783d7b5 | |||
4f863a37b0 | |||
5ec21767c5 | |||
74de872205 | |||
a4d907a76b | |||
2c7493853f | |||
96301881d1 | |||
b9c77b1c13 | |||
c85b851a38 | |||
efb5872836 | |||
280c1c6021 | |||
e6765e8c5b | |||
8d67fcf901 | |||
49455958e9 | |||
49cdcbc984 | |||
fff75ca63e | |||
1a80b7b26e | |||
2c37fd2276 | |||
a85fd833b9 | |||
34bcd62d14 | |||
53cd6cc232 | |||
8a0e32a251 | |||
3d56c6119c | |||
053294c48a | |||
2488092fc9 | |||
070beec63b | |||
5201f75fd7 |
Binary file not shown.
118
config/airdrop.json
Normal file
118
config/airdrop.json
Normal file
@ -0,0 +1,118 @@
|
||||
{
|
||||
"airdropChancePercent":
|
||||
{
|
||||
"bigmap": 20,
|
||||
"woods": 25,
|
||||
"lighthouse": 20,
|
||||
"shoreline": 20,
|
||||
"interchange": 20,
|
||||
"reserve": 10,
|
||||
"tarkovStreets": 12
|
||||
},
|
||||
"airdropMinStartTimeSeconds": 60,
|
||||
"airdropMaxStartTimeSeconds": 300,
|
||||
"planeMinFlyHeight": 400,
|
||||
"planeMaxFlyHeight": 500,
|
||||
"planeVolume": 0.5,
|
||||
"planeSpeed": 65,
|
||||
"crateFallSpeed": 3,
|
||||
"loot": {
|
||||
"presetCount": {
|
||||
"min": 3,
|
||||
"max": 5
|
||||
},
|
||||
"itemCount": {
|
||||
"min": 12,
|
||||
"max": 25
|
||||
},
|
||||
"itemBlacklist": [
|
||||
"5e997f0b86f7741ac73993e2",
|
||||
"5b44abe986f774283e2e3512",
|
||||
"5e99711486f7744bfc4af328",
|
||||
"5e99735686f7744bfc4af32c",
|
||||
"6087e570b998180e9f76dc24",
|
||||
"5d52d479a4b936793d58c76b",
|
||||
"5e85aac65505fa48730d8af2",
|
||||
"63495c500c297e20065a08b1",
|
||||
"5cde8864d7f00c0010373be1",
|
||||
"5b3b713c5acfc4330140bd8d"
|
||||
],
|
||||
"itemTypeWhitelist": [
|
||||
"543be5dd4bdc2deb348b4569",
|
||||
"5485a8684bdc2da71d8b4567",
|
||||
"5d650c3e815116009f6201d2",
|
||||
"5448e8d64bdc2dce718b4568",
|
||||
"5448e8d04bdc2ddf718b4569",
|
||||
"5447e1d04bdc2dff2f8b4567",
|
||||
"57864ee62459775490116fc1",
|
||||
"5448e54d4bdc2dcc718b4568",
|
||||
"5448e5284bdc2dcb718b4567",
|
||||
"5448e53e4bdc2d60728b4567",
|
||||
"5448f3a64bdc2d60728b456a",
|
||||
"5448f3ac4bdc2dce718b4569",
|
||||
"55818ad54bdc2ddc698b4569",
|
||||
"55818af64bdc2d5b648b4570",
|
||||
"55818b0e4bdc2dde698b456e",
|
||||
"5448bc234bdc2d3c308b4569",
|
||||
"57864ada245977548638de91",
|
||||
"5645bcb74bdc2ded0b8b4578",
|
||||
"5448e5724bdc2ddf718b4568",
|
||||
"55818add4bdc2d5b648b456f",
|
||||
"543be6564bdc2df4348b4568",
|
||||
"57864bb7245977548b3b66c2",
|
||||
"550aa4cd4bdc2dd8348b456c",
|
||||
"5448f39d4bdc2d0a728b4568",
|
||||
"5448f3a14bdc2d27728b4569",
|
||||
"5447e1d04bdc2dff2f8b4567",
|
||||
"55818b164bdc2ddc698b456c",
|
||||
"55818ae44bdc2dde698b456c"
|
||||
],
|
||||
"itemLimits": {
|
||||
"5447b5cf4bdc2d65278b4567": 1,
|
||||
"5448e8d04bdc2ddf718b4569": 3,
|
||||
"5448e8d64bdc2dce718b4568": 3,
|
||||
"5448bc234bdc2d3c308b4569": 3,
|
||||
"5448f3a64bdc2d60728b456a": 3,
|
||||
"5448e54d4bdc2dcc718b4568": 3,
|
||||
"5485a8684bdc2da71d8b4567": 4,
|
||||
"57864bb7245977548b3b66c2": 2,
|
||||
"57864ada245977548638de91": 3,
|
||||
"5d650c3e815116009f6201d2": 2,
|
||||
"5645bcb74bdc2ded0b8b4578": 2,
|
||||
"5448e5724bdc2ddf718b4568": 2,
|
||||
"55818add4bdc2d5b648b456f": 2,
|
||||
"543be6564bdc2df4348b4568": 3,
|
||||
"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]
|
||||
}
|
||||
}
|
@ -25,5 +25,30 @@
|
||||
"a20Gauge": 20,
|
||||
"a30x29": 1,
|
||||
"a26x75": 1
|
||||
},
|
||||
|
||||
"zero":
|
||||
{
|
||||
"g127x55": "5cadf6ddae9215051e1c23b2",
|
||||
"g86x70": "5fc275cf85fd526b824a571a",
|
||||
"g762x54": "5887431f2459777e1612938f",
|
||||
"g762x51": "58dd3ad986f77403051cba8f",
|
||||
"g9x39": "57a0dfb82459774d3078b56c",
|
||||
"g366TKM": "59e655cb86f77411dc52a77b",
|
||||
"g762x39": "5656d7c34bdc2d9d198b4587",
|
||||
"g762x35": "5fbe3ffdf8b6a877a729ea82",
|
||||
"g556x45": "54527a984bdc2d4e668b4567",
|
||||
"g545x39": "56dff3afd2720bba668b4567",
|
||||
"g57x28": "5cc80f38e4a949001152b560",
|
||||
"g46x30": "5ba2678ad4351e44f824b344",
|
||||
"g9x33R": "62330b3ed4dc74626d570b95",
|
||||
"g1143x23ACP": "5e81f423763d9f754677bf2e",
|
||||
"g762x25": "5736026a245977644601dc61",
|
||||
"g9x21": "5a269f97c4a282000b151807",
|
||||
"g9x19": "56d59d3ad2720bdb418b4577",
|
||||
"g9x18": "573719762459775a626ccbc1",
|
||||
"g23x75": "5e85aa1a988a8701445df1f5",
|
||||
"g12Gauge": "560d5e524bdc2d25448b4571",
|
||||
"g20Gauge": "5a38ebd9c4a282000d722a5b"
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
"removeGearRestrictions": false,
|
||||
|
||||
"armorMaterials":
|
||||
{
|
||||
"uhmwpe":
|
||||
|
@ -1,15 +1,27 @@
|
||||
{
|
||||
"bossChance":
|
||||
{
|
||||
"activated": false,
|
||||
"chance": 100
|
||||
},
|
||||
{
|
||||
"activated": false,
|
||||
"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":
|
||||
{
|
||||
"chanceSameSideIsHostile": 50,
|
||||
"chanceSameSideIsHostilePercent": 80,
|
||||
"containersOnPMCs": true,
|
||||
"isUsec": 50,
|
||||
"lootNValue": 3,
|
||||
@ -21,41 +33,44 @@
|
||||
{
|
||||
"assault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 40
|
||||
"min": 20,
|
||||
"max": 30
|
||||
},
|
||||
"cursedAssault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 40
|
||||
},
|
||||
"pmcBot":
|
||||
"cursedassault":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 30
|
||||
},
|
||||
"exUsec":
|
||||
"pmcbot":
|
||||
{
|
||||
"min": 15,
|
||||
"max": 25
|
||||
},
|
||||
"exusec":
|
||||
{
|
||||
"min": 5,
|
||||
"max": 20
|
||||
"max": 5
|
||||
}
|
||||
},
|
||||
|
||||
"useDifficultyOverride": false,
|
||||
"difficulty": "AsOnline",
|
||||
"botRelativeLevelDeltaMax": 10,
|
||||
|
||||
"difficultyWeights":
|
||||
{
|
||||
"difficulty": "asonline",
|
||||
"useWeights": false,
|
||||
"weights":
|
||||
{
|
||||
"easy": 0,
|
||||
"normal": 60,
|
||||
"hard": 20,
|
||||
"impossible": 20
|
||||
"normal": 40,
|
||||
"hard": 30,
|
||||
"impossible": 30
|
||||
}
|
||||
},
|
||||
|
||||
"looseWeaponInBackpackChance": 15,
|
||||
"looseWeaponInBackpackLoot":
|
||||
"looseWeaponInBackpackLootMinMax":
|
||||
{
|
||||
"min": 1,
|
||||
"max": 1
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"minUserLevel": 15,
|
||||
"runIntervalSeconds": 45,
|
||||
|
||||
"blacklist":
|
||||
{
|
||||
@ -9,9 +10,48 @@
|
||||
|
||||
"condition":
|
||||
{
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1.0
|
||||
"5422acb9af1c889c16000029": {
|
||||
"_name": "WEAPON",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1
|
||||
},
|
||||
"543be5664bdc2dd4348b4569": {
|
||||
"_name": "MEDS",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.6,
|
||||
"max": 1
|
||||
},
|
||||
"5447e0e74bdc2d3c308b4567": {
|
||||
"_name": "SPEC_ITEM",
|
||||
"conditionChance": 0.3,
|
||||
"min": 0.02,
|
||||
"max": 1
|
||||
},
|
||||
"543be5e94bdc2df1348b4568": {
|
||||
"_name": "KEY",
|
||||
"conditionChance": 0.02,
|
||||
"min": 0.97,
|
||||
"max": 1
|
||||
},
|
||||
"5448e5284bdc2dcb718b4567": {
|
||||
"_name": "VEST",
|
||||
"conditionChance": 0.2,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
},
|
||||
"57bef4c42459772e8d35a53b": {
|
||||
"_name": "ARMORED_EQUIPMENT",
|
||||
"conditionChance": 0.6,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
},
|
||||
"543be6674bdc2df1348b4569": {
|
||||
"_name": "FOOD_DRINK",
|
||||
"conditionChance": 0.05,
|
||||
"min": 0.05,
|
||||
"max": 1
|
||||
}
|
||||
},
|
||||
|
||||
"currencies":
|
||||
|
@ -1,8 +1,5 @@
|
||||
{
|
||||
"airFilterUnitFlowRate": 0.0047222222222222,
|
||||
"constructionTime": 1,
|
||||
"fuelDrainRate": 0.0013194444444444,
|
||||
"gpuBoostRate": 0.015,
|
||||
"productionTime": 1,
|
||||
"scavCaseTime": 1
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"maxHr": 36,
|
||||
"storageMaxHr": 96,
|
||||
"priceCoef": 0.16,
|
||||
"returnChance": 80
|
||||
"returnChance": 75
|
||||
},
|
||||
|
||||
"therapist":
|
||||
|
@ -24,10 +24,18 @@
|
||||
},
|
||||
|
||||
"examinedByDefault": false,
|
||||
"removeBackpackFilter": true,
|
||||
"examineTime":
|
||||
{
|
||||
"enabled": false,
|
||||
"examineTime": 1
|
||||
},
|
||||
|
||||
"removeBackpacksRestrictions": true,
|
||||
"removeContainersRestrictions": true,
|
||||
"removeDiscardLimit": true,
|
||||
"removeItemRestrictions": false,
|
||||
"removeKeyUsageMax": false,
|
||||
"removeInRaidItemRestrictions": true,
|
||||
"removeKeyUsageMax": true,
|
||||
"removeSecureContainersRestrictions": true,
|
||||
"roublesMaxStack": 500000,
|
||||
"dollarsMaxStack": 50000,
|
||||
"eurosMaxStack": 50000,
|
||||
|
@ -3,5 +3,6 @@
|
||||
"freeLabsEntry": false,
|
||||
"exfilTime": 8,
|
||||
"extractionsExtended": false,
|
||||
"enableCoopExtracts": false,
|
||||
"noExtractRestrictions": false
|
||||
}
|
@ -3,9 +3,15 @@
|
||||
"chompiesBossFix": true,
|
||||
"fixOpenZones": true,
|
||||
"scavExtractGain": 0.01,
|
||||
"timeLimit": 60,
|
||||
"aiAmount": "asonline",
|
||||
"aiDifficulty": "asonline",
|
||||
|
||||
"timeLimit":
|
||||
{
|
||||
"enabled": false,
|
||||
"raidTime": 60
|
||||
},
|
||||
|
||||
"aiAmount": "AsOnline",
|
||||
"aiDifficulty": "AsOnline",
|
||||
"bossEnabled": true,
|
||||
"scavWars": false,
|
||||
"taggedAndCursed": false,
|
||||
|
116
config/traders.json
Normal file
116
config/traders.json
Normal file
@ -0,0 +1,116 @@
|
||||
{
|
||||
"updateTime":
|
||||
{
|
||||
"enabled": false,
|
||||
"updateTime": [
|
||||
{
|
||||
"traderId": "54cb50c76803fa8b248b4571",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "54cb57776803fa99248b456e",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "579dc571d53a0658a154fbec",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "58330581ace78e27b8b10cee",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "5935c25fb3acc3127c3d8cd9",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "5a7c2eca46aef81a7ca2145d",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "5ac3b934156ae10c4430e83c",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "5c0647fdd443bc2504c2d371",
|
||||
"seconds": 3600
|
||||
},
|
||||
{
|
||||
"traderId": "ragfair",
|
||||
"seconds": 3600
|
||||
}]
|
||||
},
|
||||
|
||||
"updateTimeDefault": 3600,
|
||||
"durabilityPurchaseThreshhold": {
|
||||
"54cb50c76803fa8b248b4571": 60,
|
||||
"54cb57776803fa99248b456e": 60,
|
||||
"579dc571d53a0658a154fbec": 0,
|
||||
"58330581ace78e27b8b10cee": 60,
|
||||
"5935c25fb3acc3127c3d8cd9": 60,
|
||||
"5a7c2eca46aef81a7ca2145d": 60,
|
||||
"5ac3b934156ae10c4430e83c": 60,
|
||||
"5c0647fdd443bc2504c2d371": 60,
|
||||
"default": 60
|
||||
},
|
||||
"traderPriceMultipler": 1,
|
||||
"persistPurchaseDataInProfile": true,
|
||||
"fence": {
|
||||
"partialRefreshTimeSeconds": 240,
|
||||
"partialRefreshChangePercent": 15,
|
||||
"assortSize": 50,
|
||||
"maxPresetsPercent": 5,
|
||||
"itemPriceMult": 0.8,
|
||||
"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",
|
||||
"543be6674bdc2df1348b4569",
|
||||
"5448bf274bdc2dfc2f8b456a",
|
||||
"5447bedf4bdc2d87278b4568",
|
||||
"6275303a9f372d6ea97f9ec7"
|
||||
]
|
||||
}
|
||||
}
|
192
config/ts/WeaponTypes.ts
Normal file
192
config/ts/WeaponTypes.ts
Normal file
@ -0,0 +1,192 @@
|
||||
export enum Weapons127x55
|
||||
{
|
||||
ASH_12 = "5cadfbf7ae92152ac412eeef"
|
||||
}
|
||||
|
||||
export enum Weapons86x70
|
||||
{
|
||||
MK_18 = "5fc22d7c187fea44d52eda44",
|
||||
AXMC = "627e14b21713922ded6f2c15"
|
||||
}
|
||||
|
||||
export enum Weapons9x39
|
||||
{
|
||||
AS_VAL = "57c44b372459772d2b39b8ce",
|
||||
VSS_VINTOREZ = "57838ad32459774a17445cd2"
|
||||
}
|
||||
|
||||
export enum Weapons762x54R
|
||||
{
|
||||
SVDS = "5c46fbd72e2216398b5a8c9c",
|
||||
MP_18 = "61f7c9e189e6fb1a5e3ea78d",
|
||||
MOSIN_INFANTRY = "5bfd297f0db834001a669119",
|
||||
MOSIN_SNIPER = "5ae08f0a5acfc408fb1398a1",
|
||||
SV_98 = "55801eed4bdc2d89578b4588"
|
||||
}
|
||||
|
||||
export enum Weapons762x51
|
||||
{
|
||||
VPO_101 = "5c501a4d2e221602b412b540",
|
||||
DT_MDR_762 = "5dcbd56fdbd3d91b3e5468d5",
|
||||
SA_58 = "5b0bbe4e5acfc40dc528a72d",
|
||||
SCARH_BLACK = "6183afd850224f204c1da514",
|
||||
SCARH_FDE = "6165ac306ef05c2ce828ef74",
|
||||
HK_G28 = "6176aca650224f204c1da3fb",
|
||||
M1A = "5aafa857e5b5b00018480968",
|
||||
RFB = "5f2a9575926fd9352339381f",
|
||||
RSASS = "5a367e5dc4a282000e49738f",
|
||||
SR_25 = "5df8ce05b11454561e39243b",
|
||||
DVL_10 = "588892092459774ac91d4b11",
|
||||
M700 = "5bfea6e90db834001b7347f3",
|
||||
T5000M = "5df24cf80dee1b22f862e9bc"
|
||||
}
|
||||
|
||||
export enum Weapons366TKM
|
||||
{
|
||||
VPO_209 = "59e6687d86f77411d949b251",
|
||||
VPO_215 = "5de652c31b7e3716273428be"
|
||||
}
|
||||
|
||||
export enum Weapons762x39
|
||||
{
|
||||
OP_SKS = "587e02ff24597743df3deaeb",
|
||||
SKS = "574d967124597745970e7c94",
|
||||
AK_103 = "5ac66d2e5acfc43b321d4b53",
|
||||
AK_104 = "5ac66d725acfc43b321d4b60",
|
||||
AKM = "59d6088586f774275f37482f",
|
||||
AKMN = "5a0ec13bfcdbcb00165aa685",
|
||||
AKMS = "59ff346386f77477562ff5e2",
|
||||
AKMSN = "5abcbc27d8ce8700182eceeb",
|
||||
MK47_MUTANT = "606587252535c57a13424cfd",
|
||||
RD_704 = "628a60ae6b1d481ff772e9c8",
|
||||
VPO_136 = "59e6152586f77473dc057aa1"
|
||||
}
|
||||
|
||||
export enum Weapons762x35
|
||||
{
|
||||
MCX = "5fbcc1d9016cce60e8341ab3"
|
||||
}
|
||||
|
||||
export enum Weapons556x45
|
||||
{
|
||||
ADAR_2_15 = "5c07c60e0db834002330051f",
|
||||
AK_101 = "5ac66cb05acfc40198510a10",
|
||||
AK_102 = "5ac66d015acfc400180ae6e4",
|
||||
DT_MDR_556 = "5c488a752e221602b412af63",
|
||||
HK_416A5 = "5bb2475ed4351e00853264e3",
|
||||
HK_G36 = "623063e994fc3f7b302a9696",
|
||||
M4A1 = "5447a9cd4bdc2dbd208b4567",
|
||||
SCARL_BLACK = "6184055050224f204c1da540",
|
||||
SCARL_FDE = "618428466ef05c2ce828f218",
|
||||
TX15_DML = "5d43021ca4b9362eab4b5e25"
|
||||
}
|
||||
|
||||
export enum Weapons545x39
|
||||
{
|
||||
AK_105 = "5ac66d9b5acfc4001633997a",
|
||||
AK_74 = "5bf3e03b0db834001d2c4a9c",
|
||||
AK_74M = "5ac4cd105acfc40016339859",
|
||||
AK_74N = "5644bd2b4bdc2d3b4c8b4572",
|
||||
AKS_74 = "5bf3e0490db83400196199af",
|
||||
AKS_74N = "5ab8e9fcd8ce870019439434",
|
||||
AKS_74U = "57dc2fa62459775949412633",
|
||||
AKS_74UB = "5839a40f24597726f856b511",
|
||||
AKS_74UN = "583990e32459771419544dd2",
|
||||
SAG_AK = "628b5638ad252a16da6dd245",
|
||||
SAG_AK_SHORT = "628b9c37a733087d0d7fe84b",
|
||||
RPK_16 = "5beed0f50db834001c062b12"
|
||||
}
|
||||
|
||||
export enum Weapons57x28FN
|
||||
{
|
||||
FN_57_BLACK = "5d3eb3b0a4b93615055e84d2",
|
||||
FN_57_FDE = "5d67abc1a4b93614ec50137f",
|
||||
FN_P90 = "5cc82d76e24e8d00134b4b83"
|
||||
}
|
||||
|
||||
export enum Weapons46x30HK
|
||||
{
|
||||
MP7A1 = "5ba26383d4351e00334c93d9",
|
||||
MP7A2 = "5bd70322209c4d00d7167b8f"
|
||||
}
|
||||
|
||||
export enum Weapons1143x23
|
||||
{
|
||||
M1911A1 = "5e81c3cbac2bb513793cdc75",
|
||||
M45A1 = "5f36a0e5fbf956000b716b65",
|
||||
USP45 = "6193a720f8ee7e52e42109ed",
|
||||
UMP45 = "5fc3e272f8b6a877a729eac5",
|
||||
VECTOR45 = "5fb64bc92b1b027b1f50bcf2"
|
||||
}
|
||||
|
||||
export enum Weapons9x33R
|
||||
{
|
||||
CR_50DS = "61a4c8884f95bc3b2c5dc96f"
|
||||
}
|
||||
|
||||
export enum Weapons9x21
|
||||
{
|
||||
SR_1MP = "59f98b4986f7746f546d2cef"
|
||||
}
|
||||
|
||||
export enum Weapons9x19
|
||||
{
|
||||
GLOCK_17 = "5a7ae0c351dfba0017554310",
|
||||
GLOCK_18C = "5b1fa9b25acfc40018633c01",
|
||||
M9A3 = "5cadc190ae921500103bb3b6",
|
||||
MP_443 = "576a581d2459771e7b1bc4f1",
|
||||
P226R = "56d59856d2720bd8418b456a",
|
||||
PL_15 = "602a9740da11d6478d5a06dc",
|
||||
CR_200DS = "624c2e8614da335f1e034d8c",
|
||||
MP5 = "5926bb2186f7744b1c6c6e60",
|
||||
MP5K = "5d2f0d8048f0356c925bc3b0",
|
||||
MP9 = "5e00903ae9dc277128008b87",
|
||||
MP9_N = "5de7bd7bfd6b4e6e2276dc25",
|
||||
MPX = "58948c8e86f77409493f7266",
|
||||
PP_19_01 = "59984ab886f7743e98271174",
|
||||
SAIGA_9 = "59f9cabd86f7743a10721f46",
|
||||
STM_9 = "60339954d62c9b14ed777c06",
|
||||
VECTOR_9MM = "5fc3f2d5900b1d5091531e57"
|
||||
}
|
||||
|
||||
export enum Weapons9x18
|
||||
{
|
||||
APB = "5abccb7dd8ce87001773e277",
|
||||
APS = "5a17f98cfcdbcb0980087290",
|
||||
PB_SILENCED = "56e0598dd2720bb5668b45a6",
|
||||
PM = "5448bd6b4bdc2dfc2f8b4569",
|
||||
PM_T = "579204f224597773d619e051",
|
||||
PP9_KLIN = "57f4c844245977379d5c14d1",
|
||||
PP91_KEDR = "57d14d2524597714373db789",
|
||||
PP91_KEDRB = "57f3c6bd24597738e730fa2f"
|
||||
}
|
||||
|
||||
export enum Weapons762x25
|
||||
{
|
||||
TT = "571a12c42459771f627b58a0",
|
||||
TT_GOLD = "5b3b713c5acfc4330140bd8d",
|
||||
PPSH_41 = "5ea03f7400685063ec28bfa8"
|
||||
}
|
||||
|
||||
export enum Weapons12Gauge
|
||||
{
|
||||
M3_SUPER90 = "6259b864ebedf17603599e88",
|
||||
M590A1 = "5e870397991fd70db46995c8",
|
||||
M870 = "5a7828548dc32e5a9c28b516",
|
||||
MP_133 = "54491c4f4bdc2db1078b4568",
|
||||
MP_153 = "56dee2bdd2720bc8328b4567",
|
||||
MP_155 = "606dae0ab0e443224b421bb7",
|
||||
MP_43_1C = "5580223e4bdc2d1c128b457f",
|
||||
MTS_255_12 = "60db29ce99594040e04c4a27",
|
||||
SAIGA_12GA = "576165642459773c7a400233"
|
||||
}
|
||||
|
||||
export enum Weapons20Gauge
|
||||
{
|
||||
TOZ_106 = "5a38e6bac4a2826c6e06d79b"
|
||||
}
|
||||
|
||||
export enum Weapons23x75
|
||||
{
|
||||
KS_23M = "5e848cc2988a8701445df1e8"
|
||||
}
|
14
config/ts/airdrop.ts
Normal file
14
config/ts/airdrop.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { AirdropChancePercent, AirdropLoot } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
|
||||
export interface AirdropConfig
|
||||
{
|
||||
airdropChancePercent: AirdropChancePercent;
|
||||
planeMinFlyHeight: number;
|
||||
planeMaxFlyHeight: number;
|
||||
planeVolume: number;
|
||||
planeSpeed: number;
|
||||
crateFallSpeed: number;
|
||||
airdropMinStartTimeSeconds: number;
|
||||
airdropMaxStartTimeSeconds: number;
|
||||
loot: AirdropLoot;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
export interface AmmoConfig
|
||||
{
|
||||
stacks: Ammo
|
||||
zero: Zero
|
||||
}
|
||||
|
||||
export interface Ammo
|
||||
@ -30,3 +31,28 @@ export interface Ammo
|
||||
a30x29: number
|
||||
a26x75: number
|
||||
}
|
||||
|
||||
export interface Zero
|
||||
{
|
||||
g86x70: string
|
||||
g127x55: string
|
||||
g762x54: string
|
||||
g762x51: string
|
||||
g9x39: string
|
||||
g366TKM: string
|
||||
g762x39: string
|
||||
g762x35: string
|
||||
g556x45: string
|
||||
g545x39: string
|
||||
g57x28: string
|
||||
g46x30: string
|
||||
g9x33R: string
|
||||
g1143x23ACP: string
|
||||
g762x25: string
|
||||
g9x21: string
|
||||
g9x19: string
|
||||
g9x18: string
|
||||
g23x75: string
|
||||
g12Gauge: string
|
||||
g20Gauge: string
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
export interface ArmorConfig
|
||||
{
|
||||
removeGearRestrictions: boolean
|
||||
armorMaterials: Armor
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,37 @@
|
||||
import { MinMax } from "@spt-aki/models/common/MinMax";
|
||||
import { DynamicLoot } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||
|
||||
export interface BotsConfig
|
||||
{
|
||||
bossChance: BossChance
|
||||
maxBotCap: number
|
||||
pmc: Pmc
|
||||
scav: Scav
|
||||
bossChance: BossChance;
|
||||
botGenerationBatchSizePerType: number;
|
||||
maxBotCap: MaxBotCap;
|
||||
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
|
||||
@ -12,24 +40,8 @@ export interface BossChance
|
||||
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
|
||||
{
|
||||
difficulty: string
|
||||
useWeights: boolean
|
||||
weights: Record<string, number>
|
||||
}
|
||||
@ -58,3 +70,16 @@ export interface Scav
|
||||
{
|
||||
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
|
||||
{
|
||||
minUserLevel: number
|
||||
blacklist: Blacklist
|
||||
condition: Condition
|
||||
currencies: Currencies
|
||||
offerItemCount: OfferItemCount
|
||||
reputation: Reputation
|
||||
time: Time
|
||||
runIntervalSeconds: number;
|
||||
minUserLevel: number;
|
||||
blacklist: Blacklist;
|
||||
condition: Condition;
|
||||
currencies: Currencies;
|
||||
offerItemCount: OfferItemCount;
|
||||
reputation: Reputation;
|
||||
time: Time;
|
||||
}
|
||||
|
||||
export interface Blacklist
|
||||
{
|
||||
enableBsgList: boolean
|
||||
enableQuestList: boolean
|
||||
enableBsgList: boolean;
|
||||
enableQuestList: boolean;
|
||||
}
|
||||
|
||||
export interface Condition
|
||||
{
|
||||
conditionChance: number
|
||||
min: number
|
||||
max: number
|
||||
conditionChance: number;
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface Currencies
|
||||
{
|
||||
roubles: number
|
||||
dollars: number
|
||||
euros: number
|
||||
roubles: number;
|
||||
dollars: number;
|
||||
euros: number;
|
||||
}
|
||||
|
||||
export interface OfferItemCount
|
||||
{
|
||||
min: number
|
||||
max: number
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
|
||||
export interface Reputation
|
||||
{
|
||||
gain: number
|
||||
loss: number
|
||||
gain: number;
|
||||
loss: number;
|
||||
}
|
||||
|
||||
export interface Time
|
||||
{
|
||||
baseSellTime: number
|
||||
minSellTime: number
|
||||
maxSellTime: number
|
||||
baseSellTime: number;
|
||||
minSellTime: number;
|
||||
maxSellTime: number;
|
||||
}
|
||||
|
@ -1,9 +1,6 @@
|
||||
export interface HideoutConfig
|
||||
{
|
||||
airFilterUnitFlowRate: number
|
||||
constructionTime: number
|
||||
generatorFuelFlowRate: number
|
||||
gpuBoostRate: number
|
||||
productionTime: number
|
||||
scavCaseTime: number
|
||||
}
|
@ -5,16 +5,25 @@ export interface ItemsConfig
|
||||
escapeStash: Stash
|
||||
eodStash: Stash
|
||||
examinedByDefault: boolean
|
||||
removeBackpackFilter: boolean
|
||||
examineTime: ExamineTime
|
||||
removeBackpacksRestrictions: boolean
|
||||
removeContainersRestrictions: boolean
|
||||
removeDiscardLimit: boolean
|
||||
removeItemRestrictions: boolean
|
||||
removeInRaidItemRestrictions: boolean
|
||||
removeKeyUsageMax: boolean
|
||||
removeSecureContainersRestrictions: boolean
|
||||
dollarsMaxStack: number
|
||||
eurosMaxStack: number
|
||||
roublesMaxStack: number
|
||||
weightModifier: number
|
||||
}
|
||||
|
||||
export interface ExamineTime
|
||||
{
|
||||
enabled: boolean
|
||||
examineTime: number
|
||||
}
|
||||
|
||||
export interface Stash
|
||||
{
|
||||
vertical: number
|
||||
|
@ -4,5 +4,6 @@ export interface LocationsConfig
|
||||
freeLabsEntry: boolean
|
||||
exfilTime: number
|
||||
extractionsExtended: boolean
|
||||
enableCoopExtracts: boolean
|
||||
noExtractRestrictions: boolean
|
||||
}
|
@ -1,14 +1,20 @@
|
||||
export interface RaidConfig
|
||||
{
|
||||
carExtractBaseStandingGain: number
|
||||
chompiesBossFix: boolean
|
||||
fixOpenZones: boolean
|
||||
scavExtractGain: number
|
||||
timeLimit: number
|
||||
aiAmount: string
|
||||
aiDifficulty: string
|
||||
bossEnabled: boolean
|
||||
scavWars: boolean
|
||||
taggedAndCursed: boolean
|
||||
enablePve: boolean
|
||||
carExtractBaseStandingGain: number;
|
||||
chompiesBossFix: boolean;
|
||||
fixOpenZones: boolean;
|
||||
scavExtractGain: number;
|
||||
timeLimit: TimeLimit;
|
||||
aiAmount: string;
|
||||
aiDifficulty: string;
|
||||
bossEnabled: boolean;
|
||||
scavWars: boolean;
|
||||
taggedAndCursed: boolean;
|
||||
enablePve: boolean;
|
||||
}
|
||||
|
||||
export interface TimeLimit
|
||||
{
|
||||
enabled: boolean;
|
||||
raidTime: number;
|
||||
}
|
24
config/ts/traders.ts
Normal file
24
config/ts/traders.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { FenceConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
|
||||
export interface TradersConfig
|
||||
{
|
||||
updateTime: UpdateTime;
|
||||
updateTimeDefault: number;
|
||||
/** What % of max durability an item needs to sell to a trader*/
|
||||
durabilityPurchaseThreshhold: Record<string, number>;
|
||||
traderPriceMultipler: number;
|
||||
persistPurchaseDataInProfile: boolean;
|
||||
fence: FenceConfig;
|
||||
}
|
||||
|
||||
export interface UpdateTime
|
||||
{
|
||||
enabled: boolean;
|
||||
updateTime: UpdateTime1[];
|
||||
}
|
||||
|
||||
export interface UpdateTime1
|
||||
{
|
||||
traderId: string;
|
||||
seconds: number;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
export interface WeaponsConfig
|
||||
{
|
||||
malfunctions: Malfunctions
|
||||
recoilTweaks: boolean
|
||||
smgInHolsters: boolean
|
||||
}
|
||||
|
||||
|
@ -8,5 +8,6 @@
|
||||
"slide": false
|
||||
},
|
||||
|
||||
"recoilTweaks": true,
|
||||
"smgInHolsters": false
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Valens-AIO",
|
||||
"version": "1.4.0",
|
||||
"version": "1.8.2",
|
||||
"main": "src/mod.js",
|
||||
"license": "CC BY-NC-ND 4.0",
|
||||
"author": "Valens",
|
||||
"akiVersion": "3.2.*",
|
||||
"akiVersion": ">=3.5.0",
|
||||
"scripts": {
|
||||
"setup:environment": "npm i",
|
||||
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
||||
|
143
src/airdrop.ts
143
src/airdrop.ts
@ -1,14 +1,16 @@
|
||||
/*import { Config } from "../config/config";
|
||||
import { Logger } from "./logger";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { AirdropConfig } from "../config/ts/airdrop";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Airdrop
|
||||
{
|
||||
private modConfig: Config = require("../config/config.jsonc");
|
||||
private modConfig: AirdropConfig = require("../config/airdrop.json");
|
||||
private logger: Logger;
|
||||
private databaseServer: IDatabaseTables;
|
||||
private databaseServer: DatabaseServer;
|
||||
private airdropConfig: IAirdropConfig;
|
||||
private tables: IDatabaseTables
|
||||
|
||||
constructor(logger: Logger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
||||
{
|
||||
@ -17,23 +19,126 @@ export class Airdrop
|
||||
this.airdropConfig = airdropConfig;
|
||||
}
|
||||
|
||||
public updateAirdrops();
|
||||
public updateAirdrops(): void
|
||||
{
|
||||
if (this.modConfig.airdropChancePercent != 25)
|
||||
const mod = this.modConfig;
|
||||
const airdrop = this.airdropConfig;
|
||||
|
||||
|
||||
// Sets airdropChancePercent to what is configured.
|
||||
if (mod.airdropChancePercent != airdrop.airdropChancePercent)
|
||||
{
|
||||
this.airdropConfig.airdropChancePercent["bigmap"] = this.modConfig.airdrop.airdropChancePercent.bigmap;
|
||||
this.airdropConfig.airdropChancePercent["woods"] = this.modConfig.airdrop.airdropChancePercent.woods;
|
||||
this.airdropConfig.airdropChancePercent["lighthouse"] = this.modConfig.airdrop.airdropChancePercent.lighthouse;
|
||||
this.airdropConfig.airdropChancePercent["shoreline"] = this.modConfig.airdrop.airdropChancePercent.shoreline;
|
||||
this.airdropConfig.airdropChancePercent["interchange"] = this.modConfig.airdrop.airdropChancePercent.interchange;
|
||||
this.airdropConfig.airdropChancePercent["reserve"] = this.modConfig.airdrop.airdropChancePercent.reserve;
|
||||
this.logger.info(`Customs Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.bigmap}`);
|
||||
this.logger.info(`Woods Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.woods}`);
|
||||
this.logger.info(`Lighthouse Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.lighthouse}`);
|
||||
this.logger.info(`Shoreline Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.shoreline}`);
|
||||
this.logger.info(`Interchange Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.interchange}`);
|
||||
this.logger.info(`Reserve Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.reserve}`);
|
||||
this.setAirdropChance();
|
||||
}
|
||||
|
||||
// Sets airdropMinStartTime and airdropMaxStartTime in Seconds to what is configured.
|
||||
if (mod.airdropMinStartTimeSeconds != airdrop.airdropMinStartTimeSeconds || mod.airdropMaxStartTimeSeconds != airdrop.airdropMaxStartTimeSeconds)
|
||||
{
|
||||
airdrop.airdropMinStartTimeSeconds = mod.airdropMinStartTimeSeconds;
|
||||
airdrop.airdropMaxStartTimeSeconds = mod.airdropMaxStartTimeSeconds;
|
||||
this.logger.info(`Min Start Time is ${mod.airdropMinStartTimeSeconds} seconds. Max is ${mod.airdropMaxStartTimeSeconds}.`)
|
||||
}
|
||||
|
||||
// Sets planeMinFlyHeight and planeMaxFlyHeight in Meters to what is configured.
|
||||
if (mod.planeMaxFlyHeight != airdrop.planeMaxFlyHeight || mod.planeMinFlyHeight != airdrop.planeMinFlyHeight)
|
||||
{
|
||||
airdrop.planeMaxFlyHeight = mod.planeMaxFlyHeight;
|
||||
airdrop.planeMinFlyHeight = mod.planeMinFlyHeight;
|
||||
this.logger.info(`Max Fly Height is ${mod.planeMaxFlyHeight}. Min is ${mod.planeMinFlyHeight}.`);
|
||||
}
|
||||
|
||||
// Sets the volume (loudness) of the plane as it flies to what is configured.
|
||||
if (mod.planeVolume != airdrop.planeVolume)
|
||||
{
|
||||
airdrop.planeVolume = 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.
|
||||
if (mod.loot.presetCount != airdrop.loot.presetCount)
|
||||
{
|
||||
airdrop.loot.presetCount = mod.loot.presetCount;
|
||||
this.logger.info(`Preset Count is ${mod.loot.presetCount}`);
|
||||
}
|
||||
|
||||
// Sets the Item Count to what is configured.
|
||||
if (mod.loot.itemCount != airdrop.loot.itemCount)
|
||||
{
|
||||
airdrop.loot.itemCount = mod.loot.itemCount;
|
||||
this.logger.info(`Item Count is ${mod.loot.itemCount}`);
|
||||
}
|
||||
|
||||
// Sets the Item Blacklist to what is configured.
|
||||
if (mod.loot.itemBlacklist != airdrop.loot.itemBlacklist)
|
||||
{
|
||||
airdrop.loot.itemBlacklist = mod.loot.itemBlacklist;
|
||||
this.logger.info(`Item Blacklist is ${mod.loot.itemBlacklist}`);
|
||||
}
|
||||
|
||||
// Sets the itemTypeWhitelist to what is configured.
|
||||
if (mod.loot.itemTypeWhitelist != airdrop.loot.itemTypeWhitelist)
|
||||
{
|
||||
airdrop.loot.itemTypeWhitelist = mod.loot.itemTypeWhitelist;
|
||||
this.logger.info(`Item Type Whitelist is ${mod.loot.itemTypeWhitelist}`);
|
||||
}
|
||||
|
||||
// Sets the itemLimits to what is configured.
|
||||
if (mod.loot.itemLimits != airdrop.loot.itemLimits)
|
||||
{
|
||||
airdrop.loot.itemLimits = 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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Begin Functions.
|
||||
private setAirdropChance(): void
|
||||
{
|
||||
const mod = this.modConfig.airdropChancePercent;
|
||||
const chance = this.airdropConfig.airdropChancePercent;
|
||||
chance["bigmap"] = mod.bigmap;
|
||||
chance["woods"] = mod.woods;
|
||||
chance["lighthouse"] = mod.lighthouse;
|
||||
chance["shoreline"] = mod.shoreline;
|
||||
chance["interchange"] = mod.interchange;
|
||||
chance["reserve"] = mod.reserve;
|
||||
chance["tarkovStreets"] = mod.tarkovStreets;
|
||||
this.logger.info(`Customs Airdrop Chance is ${mod.bigmap}`);
|
||||
this.logger.info(`Woods Airdrop Chance is ${mod.woods}`);
|
||||
this.logger.info(`Lighthouse Airdrop Chance is ${mod.lighthouse}`);
|
||||
this.logger.info(`Shoreline Airdrop Chance is ${mod.shoreline}`);
|
||||
this.logger.info(`Interchange Airdrop Chance is ${mod.interchange}`);
|
||||
this.logger.info(`Reserve Airdrop Chance is ${mod.reserve}`);
|
||||
this.logger.info(`Streets Airdrop Chance is ${mod.tarkovStreets}`);
|
||||
}
|
||||
}
|
||||
*/
|
383
src/ammo.ts
383
src/ammo.ts
@ -1,263 +1,458 @@
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { Grenade, Ammo762x51, Ammo762x54, Ammo338Lapua, Ammo46x30, Ammo57x28, Ammo762x25, Ammo9x18, Ammo9x19, Ammo9x21, Ammo357Mag, Ammo45ACP, Ammo545x39, Ammo556x45, Ammo300Blackout, Ammo762x39, Ammo9x39, Ammo366TKM, Ammo127x55, Ammo12Gauge, Ammo20Gauge, Ammo23x75, Ammo30x29, Ammo26x75 } from "@spt-aki/models/enums/AmmoTypes";
|
||||
import { Grenade, Ammo762x51, Ammo762x54, Ammo86x70, Ammo46x30, Ammo57x28, Ammo762x25, Ammo9x18, Ammo9x19, Ammo9x21, Ammo9x33R, Ammo1143x23ACP, Ammo545x39, Ammo556x45, Ammo762x35, Ammo762x39, Ammo9x39, Ammo366TKM, Ammo127x55, Ammo12Gauge, Ammo20Gauge, Ammo23x75, Ammo30x29, Ammo26x75 } from "@spt-aki/models/enums/AmmoTypes";
|
||||
import { Weapons127x55, Weapons86x70, Weapons9x39, Weapons762x54R, Weapons762x51, Weapons366TKM, Weapons762x39, Weapons762x35, Weapons556x45, Weapons545x39, Weapons57x28FN, Weapons46x30HK, Weapons1143x23, Weapons9x33R, Weapons9x21, Weapons9x19, Weapons9x18, Weapons762x25, Weapons12Gauge, Weapons20Gauge, Weapons23x75 } from "@spt-aki/models/enums/WeaponTypes";
|
||||
import { AmmoConfig } from "../config/ts/ammo";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
|
||||
export class Ammo
|
||||
{
|
||||
private modConfig: AmmoConfig = require("../config/ammo.json")
|
||||
private logger: Logger;
|
||||
private tables: DatabaseServer;
|
||||
private databaseServer: DatabaseServer
|
||||
private tables: IDatabaseTables;
|
||||
|
||||
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer;
|
||||
this.tables = databaseServer.getTables().templates.items;
|
||||
}
|
||||
|
||||
public updateAmmo(): void
|
||||
{
|
||||
const items = this.tables.getTables().templates.items;
|
||||
const mod = this.modConfig.stacks;
|
||||
const items = this.tables;
|
||||
const stacks = this.modConfig.stacks;
|
||||
|
||||
|
||||
// Sets HE grenades from GLaunchers max stacks.
|
||||
if (mod.grenades != 1)
|
||||
if (stacks.grenades != 1)
|
||||
{
|
||||
for (const value of Object.values(Grenade))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.grenades;
|
||||
this.logger.info(`Grenade Max Stacks set to ${mod.grenades}`);
|
||||
items[value]._props.StackMaxSize = stacks.grenades;
|
||||
this.logger.info(`Grenade Max Stacks set to ${stacks.grenades}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets .338 Lapua Magnum max stacks.
|
||||
if (mod.a86x70 != 30)
|
||||
if (stacks.a86x70 != 30)
|
||||
{
|
||||
for (const value of Object.values(Ammo338Lapua))
|
||||
for (const value of Object.values(Ammo86x70))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a86x70;
|
||||
this.logger.info(`.338 Lapua Magnum Max Stacks set to ${mod.a86x70}`);
|
||||
items[value]._props.StackMaxSize = stacks.a86x70;
|
||||
this.logger.info(`.338 Lapua Magnum Max Stacks set to ${stacks.a86x70}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 12.7x55mm max stacks.
|
||||
if (mod.a127x55 != 30)
|
||||
if (stacks.a127x55 != 30)
|
||||
{
|
||||
for (const value of Object.values(Ammo127x55))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a127x55;
|
||||
this.logger.info(`12.7x55mm Max Stacks set to ${mod.a127x55}`);
|
||||
items[value]._props.StackMaxSize = stacks.a127x55;
|
||||
this.logger.info(`12.7x55mm Max Stacks set to ${stacks.a127x55}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 7.62x54mm max stacks.
|
||||
if (mod.a762x54 != 40)
|
||||
if (stacks.a762x54 != 40)
|
||||
{
|
||||
for (const value of Object.values(Ammo762x54))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a762x54;
|
||||
this.logger.info(`7.62x54R Max Stacks set to ${mod.a762x54}`);
|
||||
items[value]._props.StackMaxSize = stacks.a762x54;
|
||||
this.logger.info(`7.62x54R Max Stacks set to ${stacks.a762x54}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 7.62x51mm max stacks.
|
||||
if (mod.a762x51 != 40)
|
||||
if (stacks.a762x51 != 40)
|
||||
{
|
||||
for (const value of Object.values(Ammo762x51))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a762x51;
|
||||
this.logger.info(`7.62x51mm Max Stacks set to ${mod.a762x51}`);
|
||||
items[value]._props.StackMaxSize = stacks.a762x51;
|
||||
this.logger.info(`7.62x51mm Max Stacks set to ${stacks.a762x51}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 9x39mm max stacks.
|
||||
if (mod.a9x39 != 50)
|
||||
if (stacks.a9x39 != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo9x39))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a9x39;
|
||||
this.logger.info(`9x39mm Max Stacks set to ${mod.a9x39}`);
|
||||
items[value]._props.StackMaxSize = stacks.a9x39;
|
||||
this.logger.info(`9x39mm Max Stacks set to ${stacks.a9x39}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets .366 TKM max stacks.
|
||||
if (mod.a366TKM != 50)
|
||||
if (stacks.a366TKM != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo366TKM))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a366TKM;
|
||||
this.logger.info(`.366 TKM Max Stacks set to ${mod.a366TKM}`);
|
||||
items[value]._props.StackMaxSize = stacks.a366TKM;
|
||||
this.logger.info(`.366 TKM Max Stacks set to ${stacks.a366TKM}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 7.62x39mm max stacks.
|
||||
if (mod.a762x39 != 60)
|
||||
if (stacks.a762x39 != 60)
|
||||
{
|
||||
for (const value of Object.values(Ammo762x39))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a762x39;
|
||||
this.logger.info(`7.62x39mm Max Stacks set to ${mod.a762x39}`);
|
||||
items[value]._props.StackMaxSize = stacks.a762x39;
|
||||
this.logger.info(`7.62x39mm Max Stacks set to ${stacks.a762x39}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 7.62x35mm (.300 Blackout) max stacks.
|
||||
if (mod.a762x35 != 60)
|
||||
if (stacks.a762x35 != 60)
|
||||
{
|
||||
for (const value of Object.values(Ammo300Blackout))
|
||||
for (const value of Object.values(Ammo762x35))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a762x35;
|
||||
this.logger.info(`762x35mm Max Stacks set to ${mod.a762x35}`);
|
||||
items[value]._props.StackMaxSize = stacks.a762x35;
|
||||
this.logger.info(`762x35mm Max Stacks set to ${stacks.a762x35}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 5.56x45mm max stacks.
|
||||
if (mod.a556x45 != 60)
|
||||
if (stacks.a556x45 != 60)
|
||||
{
|
||||
for (const value of Object.values(Ammo556x45))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a556x45;
|
||||
this.logger.info(`5.56x45mm Max Stacks set to ${mod.a556x45}`);
|
||||
items[value]._props.StackMaxSize = stacks.a556x45;
|
||||
this.logger.info(`5.56x45mm Max Stacks set to ${stacks.a556x45}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Sets 5.45x39mm max stacks.
|
||||
if (mod.a545x39 != 60)
|
||||
if (stacks.a545x39 != 60)
|
||||
{
|
||||
for (const value of Object.values(Ammo545x39))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a545x39;
|
||||
this.logger.info(`5.45x39mm Max Stacks set to ${mod.a545x39}`);
|
||||
items[value]._props.StackMaxSize = stacks.a545x39;
|
||||
this.logger.info(`5.45x39mm Max Stacks set to ${stacks.a545x39}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a57x28 != 60)
|
||||
// Sets 5.7x28mm max stacks.
|
||||
if (stacks.a57x28 != 60)
|
||||
{
|
||||
for (const value of Object.values(Ammo57x28))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a57x28;
|
||||
this.logger.info(`5.7x28mm Max Stacks set to ${mod.a57x28}`);
|
||||
items[value]._props.StackMaxSize = stacks.a57x28;
|
||||
this.logger.info(`5.7x28mm Max Stacks set to ${stacks.a57x28}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a46x30 != 70)
|
||||
// Sets 4.6x30mm max stacks.
|
||||
if (stacks.a46x30 != 70)
|
||||
{
|
||||
for (const value of Object.values(Ammo46x30))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a46x30;
|
||||
this.logger.info(`4.6x30mm Max Stacks set to ${mod.a46x30}`);
|
||||
items[value]._props.StackMaxSize = stacks.a46x30;
|
||||
this.logger.info(`4.6x30mm Max Stacks set to ${stacks.a46x30}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a9x33R != 30)
|
||||
// Sets 9x33R or .357 Mag max stacks.
|
||||
if (stacks.a9x33R != 30)
|
||||
{
|
||||
for (const value of Object.values(Ammo357Mag))
|
||||
for (const value of Object.values(Ammo9x33R))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a9x33R;
|
||||
this.logger.info(`.357 Magnum Max Stacks set to ${mod.a9x33R}`);
|
||||
items[value]._props.StackMaxSize = stacks.a9x33R;
|
||||
this.logger.info(`.357 Magnum Max Stacks set to ${stacks.a9x33R}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a1143x23ACP != 50)
|
||||
// Sets 1143x23ACP or .45 ACP max stacks.
|
||||
if (stacks.a1143x23ACP != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo45ACP))
|
||||
for (const value of Object.values(Ammo1143x23ACP))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a1143x23ACP;
|
||||
this.logger.info(`.45 ACP Max Stacks set to ${mod.a1143x23ACP}`);
|
||||
items[value]._props.StackMaxSize = stacks.a1143x23ACP;
|
||||
this.logger.info(`.45 ACP Max Stacks set to ${stacks.a1143x23ACP}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a762x25 != 50)
|
||||
// Sets 7.62x25mm or .300BLK max stacks.
|
||||
if (stacks.a762x25 != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo762x25))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a762x25;
|
||||
this.logger.info(`7.62x25mm TT Max Stacks set to ${mod.a762x25}`);
|
||||
items[value]._props.StackMaxSize = stacks.a762x25;
|
||||
this.logger.info(`7.62x25mm TT Max Stacks set to ${stacks.a762x25}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a9x21 != 50)
|
||||
// Sets 9x21mm max stacks.
|
||||
if (stacks.a9x21 != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo9x21))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a9x21;
|
||||
this.logger.info(`9x21mm Max Stacks set to ${mod.a9x21}`);
|
||||
items[value]._props.StackMaxSize = stacks.a9x21;
|
||||
this.logger.info(`9x21mm Max Stacks set to ${stacks.a9x21}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a9x19 != 50)
|
||||
// Sets 9x19mm parabellum max stacks.
|
||||
if (stacks.a9x19 != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo9x19))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a9x19;
|
||||
this.logger.info(`9x19mm Max Stacks set to ${mod.a9x19}`);
|
||||
items[value]._props.StackMaxSize = stacks.a9x19;
|
||||
this.logger.info(`9x19mm Max Stacks set to ${stacks.a9x19}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a9x18 != 50)
|
||||
// Sets 9x18mm max stacks.
|
||||
if (stacks.a9x18 != 50)
|
||||
{
|
||||
for (const value of Object.values(Ammo9x18))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a9x18;
|
||||
this.logger.info(`9x18mm Max Stacks set to ${mod.a9x18}`);
|
||||
items[value]._props.StackMaxSize = stacks.a9x18;
|
||||
this.logger.info(`9x18mm Max Stacks set to ${stacks.a9x18}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a23x75 != 15)
|
||||
// Sets 23x75 KS-23 max stacks.
|
||||
if (stacks.a23x75 != 15)
|
||||
{
|
||||
for (const value of Object.values(Ammo23x75))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a23x75;
|
||||
this.logger.info(`23x75mm KS-23 Max Stacks set to ${mod.a23x75}`);
|
||||
items[value]._props.StackMaxSize = stacks.a23x75;
|
||||
this.logger.info(`23x75mm KS-23 Max Stacks set to ${stacks.a23x75}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a12Gauge != 20)
|
||||
// Sets 12x70 12 Gauge max stacks.
|
||||
if (stacks.a12Gauge != 20)
|
||||
{
|
||||
for (const value of Object.values(Ammo12Gauge))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a12Gauge;
|
||||
this.logger.info(`12 Gauge Max Stacks set to ${mod.a12Gauge}`);
|
||||
items[value]._props.StackMaxSize = stacks.a12Gauge;
|
||||
this.logger.info(`12 Gauge Max Stacks set to ${stacks.a12Gauge}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a20Gauge != 20)
|
||||
// Sets 20x70 20 Gauge max stacks.
|
||||
if (stacks.a20Gauge != 20)
|
||||
{
|
||||
for (const value of Object.values(Ammo20Gauge))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a20Gauge;
|
||||
this.logger.info(`20 Gauge Max Stacks set to ${mod.a20Gauge}`);
|
||||
items[value]._props.StackMaxSize = stacks.a20Gauge;
|
||||
this.logger.info(`20 Gauge Max Stacks set to ${stacks.a20Gauge}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a30x29 != 1)
|
||||
// Sets 30x29mm max stacks.
|
||||
if (stacks.a30x29 != 1)
|
||||
{
|
||||
for (const value of Object.values(Ammo30x29))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a30x29;
|
||||
this.logger.info(`VOG-30x29mm Max Stacks set to ${mod.a30x29}`);
|
||||
items[value]._props.StackMaxSize = stacks.a30x29;
|
||||
this.logger.info(`VOG-30x29mm Max Stacks set to ${stacks.a30x29}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mod.a26x75 != 1)
|
||||
// Sets 26x75mm max stacks.
|
||||
if (stacks.a26x75 != 1)
|
||||
{
|
||||
for (const value of Object.values(Ammo26x75))
|
||||
{
|
||||
items[value]._props.StackMaxSize = mod.a26x75;
|
||||
this.logger.info(`Flare Max Stacks set to ${mod.a26x75}`);
|
||||
items[value]._props.StackMaxSize = stacks.a26x75;
|
||||
this.logger.info(`Flare Max Stacks set to ${stacks.a26x75}`);
|
||||
}
|
||||
}
|
||||
|
||||
const zero = this.modConfig.zero;
|
||||
|
||||
// Sets 127x55mm Zeroing default ammo to the configured value.
|
||||
if (zero.g127x55 != "5cadf6ddae9215051e1c23b2")
|
||||
{
|
||||
for (const value of Object.values(Weapons127x55))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g127x55;
|
||||
this.logger.info("12.7x55mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g86x70 != "5fc275cf85fd526b824a571a")
|
||||
{
|
||||
for (const value of Object.values(Weapons86x70))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g86x70;
|
||||
this.logger.info("86x70mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g762x54 != "5887431f2459777e1612938f")
|
||||
{
|
||||
for (const value of Object.values(Weapons762x54R))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g762x54;
|
||||
this.logger.info("7.62x54mmR Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g762x51 != "58dd3ad986f77403051cba8f")
|
||||
{
|
||||
for (const value of Object.values(Weapons762x51))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g762x51;
|
||||
this.logger.info("7.62x51mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g9x39 != "57a0dfb82459774d3078b56c")
|
||||
{
|
||||
for (const value of Object.values(Weapons9x39))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g9x39;
|
||||
this.logger.info("9x39mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g366TKM != "59e655cb86f77411dc52a77b")
|
||||
{
|
||||
for (const value of Object.values(Weapons366TKM))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g366TKM;
|
||||
this.logger.info(".366 TKM Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g762x39 != "5656d7c34bdc2d9d198b4587")
|
||||
{
|
||||
for (const value of Object.values(Weapons762x39))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g762x39;
|
||||
this.logger.info("7.62x39mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g762x35 != "5fbe3ffdf8b6a877a729ea82")
|
||||
{
|
||||
for (const value of Object.values(Weapons762x35))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g762x35;
|
||||
this.logger.info("7.62x35mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g556x45 != "54527a984bdc2d4e668b4567")
|
||||
{
|
||||
for (const value of Object.values(Weapons556x45))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g556x45;
|
||||
this.logger.info("5.56x45mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g545x39 != "56dff3afd2720bba668b4567")
|
||||
{
|
||||
for (const value of Object.values(Weapons545x39))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g545x39;
|
||||
this.logger.info("5.45x39mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g57x28 != "5cc80f38e4a949001152b560")
|
||||
{
|
||||
for (const value of Object.values(Weapons57x28FN))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g57x28;
|
||||
this.logger.info("5.7x28mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g46x30 != "5ba2678ad4351e44f824b344")
|
||||
{
|
||||
for (const value of Object.values(Weapons46x30HK))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g46x30;
|
||||
this.logger.info("4.6x30mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g9x33R != "62330b3ed4dc74626d570b95")
|
||||
{
|
||||
for (const value of Object.values(Weapons9x33R))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g9x33R;
|
||||
this.logger.info("9x33R Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g1143x23ACP != "5e81f423763d9f754677bf2e")
|
||||
{
|
||||
for (const value of Object.values(Weapons1143x23))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g1143x23ACP;
|
||||
this.logger.info("1143x23ACP Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g762x25 != "5736026a245977644601dc61")
|
||||
{
|
||||
for (const value of Object.values(Weapons762x25))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g762x25;
|
||||
this.logger.info("7.62x25mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g9x21 != "5a269f97c4a282000b151807")
|
||||
{
|
||||
for (const value of Object.values(Weapons9x21))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g9x21;
|
||||
this.logger.info("9x21mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g9x19 != "56d59d3ad2720bdb418b4577")
|
||||
{
|
||||
for (const value of Object.values(Weapons9x19))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g9x19;
|
||||
this.logger.info("9x19mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g9x18 != "573719762459775a626ccbc1")
|
||||
{
|
||||
for (const value of Object.values(Weapons9x18))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g9x18;
|
||||
this.logger.info("9x18mm Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g23x75 != "5e85aa1a988a8701445df1f5")
|
||||
{
|
||||
for (const value of Object.values(Weapons23x75))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g23x75;
|
||||
this.logger.info("KS-23M Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g12Gauge != "560d5e524bdc2d25448b4571")
|
||||
{
|
||||
for (const value of Object.values(Weapons12Gauge))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g12Gauge;
|
||||
this.logger.info("12 Gauge Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
|
||||
if (zero.g20Gauge != "5a38ebd9c4a282000d722a5b")
|
||||
{
|
||||
for (const value of Object.values(Weapons20Gauge))
|
||||
{
|
||||
items[value]._props.defAmmo = zero.g20Gauge;
|
||||
this.logger.info("20 Gauge Weapons Zero Changed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
187
src/armor.ts
187
src/armor.ts
@ -27,105 +27,194 @@ export class Armor
|
||||
const steel = this.modConfig.armorMaterials.armoredSteel;
|
||||
const ceramic = this.modConfig.armorMaterials.ceramic;
|
||||
const glass = this.modConfig.armorMaterials.glass;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials;
|
||||
|
||||
if (mod.removeGearRestrictions)
|
||||
{
|
||||
this.removeGearRestrictions();
|
||||
this.logger.info("Gear Restrictions Removed");
|
||||
}
|
||||
|
||||
if (uhmwpe.destructibility != 0.45 || uhmwpe.minRepairDegradation != 0.01 || uhmwpe.maxRepairDegradation != 0.03
|
||||
|| uhmwpe.explosionDestructibility != 0.4 || uhmwpe.minRepairKitDegradation != 0.005 || uhmwpe.maxRepairKitDegradation != 0.025)
|
||||
{
|
||||
armor.UHMWPE.Destructibility = uhmwpe.destructibility;
|
||||
armor.UHMWPE.MinRepairDegradation = uhmwpe.minRepairDegradation;
|
||||
armor.UHMWPE.MaxRepairDegradation = uhmwpe.maxRepairDegradation;
|
||||
armor.UHMWPE.ExplosionDestructibility = uhmwpe.explosionDestructibility;
|
||||
armor.UHMWPE.MinRepairKitDegradation = uhmwpe.minRepairKitDegradation;
|
||||
armor.UHMWPE.MaxRepairKitDegradation = uhmwpe.maxRepairKitDegradation;
|
||||
this.uhmwpe();
|
||||
this.logger.info("UHMWPE Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (aramid.destructibility != 0.25 || aramid.minRepairDegradation != 0.03 || aramid.maxRepairDegradation != 0.07
|
||||
|| aramid.explosionDestructibility != 0.2 || aramid.minRepairKitDegradation != 0.025 || aramid.maxRepairKitDegradation != 0.065)
|
||||
{
|
||||
armor.Aramid.Destructibility = aramid.destructibility;
|
||||
armor.Aramid.MinRepairDegradation = aramid.minRepairDegradation;
|
||||
armor.Aramid.MaxRepairDegradation = aramid.maxRepairDegradation;
|
||||
armor.Aramid.ExplosionDestructibility = aramid.explosionDestructibility;
|
||||
armor.Aramid.MinRepairKitDegradation = aramid.minRepairKitDegradation;
|
||||
armor.Aramid.MaxRepairKitDegradation = aramid.maxRepairKitDegradation;
|
||||
this.aramid();
|
||||
this.logger.info("Aramid Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (combined.destructibility != 0.5 || combined.minRepairDegradation != 0.1 || combined.maxRepairDegradation != 0.15
|
||||
|| combined.explosionDestructibility != 0.4 || combined.minRepairKitDegradation != 0.009 || combined.maxRepairKitDegradation != 0.014)
|
||||
{
|
||||
armor.Combined.Destructibility = combined.destructibility;
|
||||
armor.Combined.MinRepairDegradation = combined.minRepairDegradation;
|
||||
armor.Combined.MaxRepairDegradation = combined.maxRepairDegradation;
|
||||
armor.Combined.ExplosionDestructibility = combined.explosionDestructibility;
|
||||
armor.Combined.MinRepairKitDegradation = combined.minRepairKitDegradation;
|
||||
armor.Combined.MaxRepairKitDegradation = combined.maxRepairKitDegradation;
|
||||
this.combined();
|
||||
this.logger.info("Combined Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (titan.destructibility != 0.55 || titan.minRepairDegradation != 0.06 || titan.maxRepairDegradation != 0.1
|
||||
|| titan.explosionDestructibility != 0.5 || titan.minRepairKitDegradation != 0.055 || titan.maxRepairKitDegradation != 0.09)
|
||||
{
|
||||
armor.Titan.Destructibility = titan.destructibility;
|
||||
armor.Titan.MinRepairDegradation = titan.minRepairDegradation;
|
||||
armor.Titan.MaxRepairDegradation = titan.maxRepairDegradation;
|
||||
armor.Titan.ExplosionDestructibility = titan.explosionDestructibility;
|
||||
armor.Titan.MinRepairKitDegradation = titan.minRepairKitDegradation;
|
||||
armor.Titan.MaxRepairKitDegradation = titan.maxRepairKitDegradation;
|
||||
this.titan();
|
||||
this.logger.info("Titan Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (aluminium.destructibility != 0.6 || aluminium.minRepairDegradation != 0.06 || aluminium.maxRepairDegradation != 0.1
|
||||
|| aluminium.explosionDestructibility != 0.6 || aluminium.minRepairKitDegradation != 0.055 || aluminium.maxRepairKitDegradation != 0.09)
|
||||
{
|
||||
armor.Aluminium.Destructibility = aluminium.destructibility;
|
||||
armor.Aluminium.MinRepairDegradation = aluminium.minRepairDegradation;
|
||||
armor.Aluminium.MaxRepairDegradation = aluminium.maxRepairDegradation;
|
||||
armor.Aluminium.ExplosionDestructibility = aluminium.explosionDestructibility;
|
||||
armor.Aluminium.MinRepairKitDegradation = aluminium.minRepairKitDegradation;
|
||||
armor.Aluminium.MaxRepairKitDegradation = aluminium.maxRepairKitDegradation;
|
||||
this.aluminium();
|
||||
this.logger.info("Aluminium Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (steel.destructibility != 0.7 || steel.minRepairDegradation != 0.01 || steel.maxRepairDegradation != 0.03
|
||||
|| steel.explosionDestructibility != 0.6 || steel.minRepairKitDegradation != 0.005 || steel.maxRepairKitDegradation != 0.025)
|
||||
{
|
||||
armor.ArmoredSteel.Destructibility = steel.destructibility;
|
||||
armor.ArmoredSteel.MinRepairDegradation = steel.minRepairDegradation;
|
||||
armor.ArmoredSteel.MaxRepairDegradation = steel.maxRepairDegradation;
|
||||
armor.ArmoredSteel.ExplosionDestructibility = steel.explosionDestructibility;
|
||||
armor.ArmoredSteel.MinRepairKitDegradation = steel.minRepairKitDegradation;
|
||||
armor.ArmoredSteel.MaxRepairKitDegradation = steel.maxRepairKitDegradation;
|
||||
this.steel();
|
||||
this.logger.info("Steel Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (ceramic.destructibility != 0.8 || ceramic.minRepairDegradation != 0.17 || ceramic.maxRepairDegradation != 0.22
|
||||
|| ceramic.explosionDestructibility != 0.7 || ceramic.minRepairKitDegradation != 0.155 || ceramic.maxRepairKitDegradation != 0.2)
|
||||
{
|
||||
armor.Ceramic.Destructibility = ceramic.destructibility;
|
||||
armor.Ceramic.MinRepairDegradation = ceramic.minRepairDegradation;
|
||||
armor.Ceramic.MaxRepairDegradation = ceramic.maxRepairDegradation;
|
||||
armor.Ceramic.ExplosionDestructibility = ceramic.explosionDestructibility;
|
||||
armor.Ceramic.MinRepairKitDegradation = ceramic.minRepairKitDegradation;
|
||||
armor.Ceramic.MaxRepairKitDegradation = ceramic.maxRepairKitDegradation;
|
||||
this.ceramic();
|
||||
this.logger.info("Ceramic Armor Materials Patched");
|
||||
}
|
||||
|
||||
if (glass.destructibility != 0.8 || glass.minRepairDegradation != 0.23 || glass.maxRepairDegradation != 0.42
|
||||
|| glass.explosionDestructibility != 0.8 || glass.minRepairKitDegradation != 0.21 || glass.maxRepairKitDegradation != 0.38)
|
||||
{
|
||||
armor.Glass.Destructibility = glass.destructibility;
|
||||
armor.Glass.MinRepairDegradation = glass.minRepairDegradation;
|
||||
armor.Glass.MaxRepairDegradation = glass.maxRepairDegradation;
|
||||
armor.Glass.ExplosionDestructibility = glass.explosionDestructibility;
|
||||
armor.Glass.MinRepairKitDegradation = glass.minRepairKitDegradation;
|
||||
armor.Glass.MaxRepairKitDegradation = glass.maxRepairKitDegradation;
|
||||
this.glass();
|
||||
this.logger.info("Glass Armor Materials Patched");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Functions start
|
||||
// Removes all restrictions from gear/equipment.
|
||||
private removeGearRestrictions():void
|
||||
{
|
||||
const armors = this.tables.getTables().templates.items;
|
||||
for (const armor in armors)
|
||||
{
|
||||
const item = armors[armor]._props;
|
||||
item.BlocksArmorVest = false;
|
||||
item.BlocksCollapsible = false;
|
||||
item.BlocksEarpiece = false;
|
||||
item.BlocksEyewear = false;
|
||||
item.BlocksFaceCover = false;
|
||||
item.BlocksFolding = false;
|
||||
item.BlocksHeadwear = false;
|
||||
}
|
||||
}
|
||||
|
||||
private uhmwpe(): void
|
||||
{
|
||||
const uhmwpe = this.modConfig.armorMaterials.uhmwpe;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.UHMWPE;
|
||||
|
||||
armor.Destructibility = uhmwpe.destructibility;
|
||||
armor.MinRepairDegradation = uhmwpe.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = uhmwpe.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = uhmwpe.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = uhmwpe.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = uhmwpe.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private aramid(): void
|
||||
{
|
||||
const aramid = this.modConfig.armorMaterials.aramid;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Aramid;
|
||||
|
||||
armor.Destructibility = aramid.destructibility;
|
||||
armor.MinRepairDegradation = aramid.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = aramid.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = aramid.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = aramid.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = aramid.maxRepairKitDegradation;
|
||||
this.logger.info("Aramid Armor Materials Patched");
|
||||
}
|
||||
|
||||
private combined(): void
|
||||
{
|
||||
const combined = this.modConfig.armorMaterials.combined;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Combined;
|
||||
|
||||
armor.Destructibility = combined.destructibility;
|
||||
armor.MinRepairDegradation = combined.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = combined.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = combined.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = combined.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = combined.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private titan(): void
|
||||
{
|
||||
const titan = this.modConfig.armorMaterials.titan;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Titan;
|
||||
|
||||
armor.Destructibility = titan.destructibility;
|
||||
armor.MinRepairDegradation = titan.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = titan.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = titan.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = titan.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = titan.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private aluminium(): void
|
||||
{
|
||||
const aluminium = this.modConfig.armorMaterials.aluminium;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Aluminium;
|
||||
|
||||
armor.Destructibility = aluminium.destructibility;
|
||||
armor.MinRepairDegradation = aluminium.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = aluminium.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = aluminium.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = aluminium.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = aluminium.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private steel(): void
|
||||
{
|
||||
const steel = this.modConfig.armorMaterials.armoredSteel;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.ArmoredSteel;
|
||||
|
||||
armor.Destructibility = steel.destructibility;
|
||||
armor.MinRepairDegradation = steel.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = steel.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = steel.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = steel.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = steel.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private ceramic(): void
|
||||
{
|
||||
const ceramic = this.modConfig.armorMaterials.ceramic;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Ceramic;
|
||||
|
||||
armor.Destructibility = ceramic.destructibility;
|
||||
armor.MinRepairDegradation = ceramic.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = ceramic.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = ceramic.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = ceramic.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = ceramic.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
private glass(): void
|
||||
{
|
||||
const glass = this.modConfig.armorMaterials.glass;
|
||||
const armor = this.tables.getTables().globals.config.ArmorMaterials.Glass;
|
||||
|
||||
armor.Destructibility = glass.destructibility;
|
||||
armor.MinRepairDegradation = glass.minRepairDegradation;
|
||||
armor.MaxRepairDegradation = glass.maxRepairDegradation;
|
||||
armor.ExplosionDestructibility = glass.explosionDestructibility;
|
||||
armor.MinRepairKitDegradation = glass.minRepairKitDegradation;
|
||||
armor.MaxRepairKitDegradation = glass.maxRepairKitDegradation;
|
||||
}
|
||||
|
||||
}
|
110
src/bots.ts
110
src/bots.ts
@ -1,8 +1,9 @@
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { BotsConfig } from "../config/ts/bots";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Bots
|
||||
{
|
||||
private modConfig: BotsConfig = require("../config/bots.json");
|
||||
@ -28,27 +29,28 @@ export class Bots
|
||||
|
||||
// Server side variables
|
||||
const pmc = this.botConfig.pmc;
|
||||
const bot = this.botConfig;
|
||||
const lootNValue = this.botConfig.lootNValue;
|
||||
|
||||
// Start modifications
|
||||
|
||||
|
||||
// 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")
|
||||
if (modPMC.difficultyWeights.useWeights)
|
||||
{
|
||||
// Uses PMC difficulty weighting if straight up difficulty selection is not used.
|
||||
if (modPMC.difficultyWeights.useWeights)
|
||||
{
|
||||
const chosenDifficulty = this.chooseRandomWeightedDifficulty();
|
||||
this.logger.info("PMC Difficulty Chance Weights Patched");
|
||||
this.logger.info(`PMC Difficulty Chosen: ${chosenDifficulty}`);
|
||||
}
|
||||
// Uses PMC difficulty if weighting is disabled.
|
||||
else
|
||||
{
|
||||
pmc.difficulty = modPMC.difficultyWeights.difficulty;
|
||||
this.logger.info(`PMC Bot Difficulty set to ${modPMC.difficultyWeights.difficulty}`);
|
||||
}
|
||||
const chosenDifficulty = this.chooseRandomWeightedDifficulty();
|
||||
this.logger.info("PMC Difficulty Chance Weights Patched");
|
||||
this.logger.info(`PMC Difficulty Chosen: ${chosenDifficulty}`)
|
||||
}
|
||||
else if (modPMC.difficulty != pmc.difficulty)
|
||||
{
|
||||
pmc.difficulty = modPMC.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");
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +63,7 @@ export class Bots
|
||||
|
||||
|
||||
// Chance that PMC bot will be USEC or BEAR. Default is 50%
|
||||
if (modPMC.isUsec != 50)
|
||||
if (modPMC.isUsec != pmc.isUsec)
|
||||
{
|
||||
pmc.isUsec = modPMC.isUsec;
|
||||
this.logger.info(`PMC isUsec Chance is: ${modPMC.isUsec}`);
|
||||
@ -69,9 +71,9 @@ export class Bots
|
||||
|
||||
|
||||
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
||||
if (modPMC.maxBackpackLootTotalRub != 150000
|
||||
|| modPMC.maxPocketLootTotalRub !=50000
|
||||
|| modPMC.maxVestLootTotalRub != 50000)
|
||||
if (modPMC.maxBackpackLootTotalRub != pmc.maxBackpackLootTotalRub
|
||||
|| modPMC.maxPocketLootTotalRub != pmc.maxPocketLootTotalRub
|
||||
|| modPMC.maxVestLootTotalRub != pmc.maxVestLootTotalRub)
|
||||
{
|
||||
this.changeMaxLootvalue();
|
||||
this.logger.info(`PMC Loot Value totals changed! \n Max Backpack Total Value: ${modPMC.maxBackpackLootTotalRub} \n Max Pocket Total Value: ${modPMC.maxPocketLootTotalRub} \n Max Vest Total Value: ${modPMC.maxVestLootTotalRub}`);
|
||||
@ -79,23 +81,25 @@ export class Bots
|
||||
|
||||
|
||||
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||
if (modPMC.chanceSameSideIsHostile != 50)
|
||||
if (modPMC.chanceSameSideIsHostilePercent != pmc.chanceSameSideIsHostilePercent)
|
||||
{
|
||||
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostile;
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
||||
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostilePercent;
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostilePercent}`);
|
||||
}
|
||||
|
||||
|
||||
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
||||
if (mod.maxBotCap != 20)
|
||||
{
|
||||
this.botConfig.maxBotCap = mod.maxBotCap;
|
||||
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
||||
for (const [key] of Object.entries(bot.maxBotCap))
|
||||
{
|
||||
bot.maxBotCap[key] = mod.maxBotCap[key];
|
||||
this.logger.info(mod.maxBotCap[key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Modifies the lootNValue of PMC or Scav if configured outside of the defaults.
|
||||
if (modPMC.lootNValue != 3 || modScav.lootNValue != 4)
|
||||
if (modPMC.lootNValue != lootNValue.pmc || modScav.lootNValue != lootNValue.scav)
|
||||
{
|
||||
lootNValue.scav = modScav.lootNValue;
|
||||
lootNValue.pmc = modPMC.lootNValue;
|
||||
@ -104,26 +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.
|
||||
const pmcChance = modPMC.convertIntoPmcChance;
|
||||
if (pmcChance.assault.min != 15 || pmcChance.assault.max != 40
|
||||
|| pmcChance.cursedAssault.min != 15 || pmcChance.cursedAssault.max != 40
|
||||
|| pmcChance.pmcBot.min != 15 || pmcChance.pmcBot.max != 30
|
||||
|| pmcChance.exUsec.min != 5 || pmcChance.exUsec.max != 20)
|
||||
if (this.modConfig.pmc.convertIntoPmcChance.assault.min != this.botConfig.pmc.convertIntoPmcChance.assault.min || this.modConfig.pmc.convertIntoPmcChance.assault.max != this.botConfig.pmc.convertIntoPmcChance.assault.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.cursedassault.min != this.botConfig.pmc.convertIntoPmcChance.cursedassault.min || this.modConfig.pmc.convertIntoPmcChance.cursedassault.max != this.botConfig.pmc.convertIntoPmcChance.cursedassault.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.pmcbot.min != this.botConfig.pmc.convertIntoPmcChance.pmcbot.min || this.modConfig.pmc.convertIntoPmcChance.pmcbot.max != this.botConfig.pmc.convertIntoPmcChance.pmcbot.max
|
||||
|| this.modConfig.pmc.convertIntoPmcChance.exusec.min != this.botConfig.pmc.convertIntoPmcChance.exusec.min || this.modConfig.pmc.convertIntoPmcChance.exusec.max != this.botConfig.pmc.convertIntoPmcChance.exusec.max)
|
||||
{
|
||||
this.adjustPmcChance();
|
||||
this.logger.info("Chance to Convert Bots into PMC Patched");
|
||||
}
|
||||
|
||||
|
||||
// Modfiies the botRelativeLevelDeltaMax which alters the relative level delta maximum of PMC bots.
|
||||
if (mod.pmc.botRelativeLevelDeltaMax != this.botConfig.pmc.botRelativeLevelDeltaMax)
|
||||
{
|
||||
this.botConfig.pmc.botRelativeLevelDeltaMax = mod.pmc.botRelativeLevelDeltaMax;
|
||||
this.logger.info(`Bot Relative Delta Max Level set to ${mod.pmc.botRelativeLevelDeltaMax}`);
|
||||
}
|
||||
|
||||
|
||||
// Makes *all* bosses spawn chance configurable.
|
||||
if (mod.bossChance.activated)
|
||||
{
|
||||
this.configureBossChance();
|
||||
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`)
|
||||
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`);
|
||||
}
|
||||
|
||||
|
||||
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.logger.info("Loose Weapon In PMC Backpack Values Patched");
|
||||
@ -135,10 +146,10 @@ export class Bots
|
||||
// Function to enable secured and common containers on PMCs.
|
||||
private containersOnPMCs(): void
|
||||
{
|
||||
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
||||
const backpackLoot = this.botConfig.pmc.backpackLoot.whitelist;
|
||||
|
||||
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
dynaLoot.push("5795f317245977243854e041");
|
||||
backpackLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
backpackLoot.push("5795f317245977243854e041");
|
||||
}
|
||||
|
||||
private chooseRandomWeightedDifficulty(): string
|
||||
@ -156,12 +167,12 @@ export class Bots
|
||||
|
||||
pmcConfig.assault.min = modConfig.assault.min;
|
||||
pmcConfig.assault.max = modConfig.assault.max;
|
||||
pmcConfig.cursedassault.min = modConfig.cursedAssault.min;
|
||||
pmcConfig.cursedassault.max = modConfig.cursedAssault.max;
|
||||
pmcConfig.pmcbot.min = modConfig.pmcBot.min;
|
||||
pmcConfig.pmcbot.max = modConfig.pmcBot.max;
|
||||
pmcConfig.exusec.min = modConfig.exUsec.min;
|
||||
pmcConfig.exusec.max = modConfig.exUsec.max;
|
||||
pmcConfig.cursedassault.min = modConfig.cursedassault.min;
|
||||
pmcConfig.cursedassault.max = modConfig.cursedassault.max;
|
||||
pmcConfig.pmcbot.min = modConfig.pmcbot.min;
|
||||
pmcConfig.pmcbot.max = modConfig.pmcbot.max;
|
||||
pmcConfig.exusec.min = modConfig.exusec.min;
|
||||
pmcConfig.exusec.max = modConfig.exusec.max;
|
||||
}
|
||||
|
||||
|
||||
@ -184,12 +195,9 @@ export class Bots
|
||||
{
|
||||
if (i !== "base")
|
||||
{
|
||||
if (locations[i].base.BossLocationSpawn !== [])
|
||||
for (const x in locations[i].base.BossLocationSpawn)
|
||||
{
|
||||
for (const x in locations[i].base.BossLocationSpawn)
|
||||
{
|
||||
locations[i].base.BossLocationSpawn[x].BossChance = this.modConfig.bossChance.chance;
|
||||
}
|
||||
locations[i].base.BossLocationSpawn[x].BossChance = this.modConfig.bossChance.chance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -200,9 +208,9 @@ export class Bots
|
||||
const pmcConfig = this.botConfig.pmc;
|
||||
const modConfig = this.modConfig.pmc;
|
||||
|
||||
pmcConfig.looseWeaponInBackpackChancePercent = modConfig.looseWeaponInBackpackChance;
|
||||
pmcConfig.looseWeaponInBackpackLootMinMax.min = modConfig.looseWeaponInBackpackLoot.min;
|
||||
pmcConfig.looseWeaponInBackpackLootMinMax.max = modConfig.looseWeaponInBackpackLoot.max;
|
||||
pmcConfig.looseWeaponInBackpackChancePercent = modConfig.looseWeaponInBackpackChancePercent;
|
||||
pmcConfig.looseWeaponInBackpackLootMinMax.min = modConfig.looseWeaponInBackpackLootMinMax.min;
|
||||
pmcConfig.looseWeaponInBackpackLootMinMax.max = modConfig.looseWeaponInBackpackLootMinMax.max;
|
||||
}
|
||||
|
||||
}
|
||||
|
47
src/flea.ts
47
src/flea.ts
@ -1,7 +1,7 @@
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { FleaConfig } from "../config/ts/flea";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Flea
|
||||
{
|
||||
@ -25,21 +25,35 @@ export class Flea
|
||||
const global = this.tables.getTables().globals;
|
||||
const ragfair = this.ragfairConfig.dynamic;
|
||||
|
||||
if (mod.minUserLevel != 15)
|
||||
if (mod.runIntervalSeconds != this.ragfairConfig.runIntervalSeconds)
|
||||
{
|
||||
this.ragfairConfig.runIntervalSeconds = mod.runIntervalSeconds;
|
||||
this.logger.info(`Run Interval Seconds patched to ${mod.runIntervalSeconds} seconds`);
|
||||
}
|
||||
|
||||
|
||||
if (mod.minUserLevel != global.config.RagFair.minUserLevel)
|
||||
{
|
||||
global.config.RagFair.minUserLevel = mod.minUserLevel;
|
||||
this.logger.info(`Fleamarket unlocked at level ${mod.minUserLevel}`)
|
||||
}
|
||||
|
||||
|
||||
if (!mod.blacklist.enableBsgList || !mod.blacklist.enableQuestList)
|
||||
if (!mod.blacklist.enableBsgList)
|
||||
{
|
||||
ragfair.blacklist.enableBsgList = mod.blacklist.enableBsgList;
|
||||
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
||||
ragfair.blacklist.enableBsgList = false;
|
||||
this.logger.info("Fleamarket Blacklists patched");
|
||||
}
|
||||
|
||||
if (mod.condition.conditionChance != 0.2 || mod.condition.min != 0.6 || mod.condition.max != 1)
|
||||
|
||||
if (!mod.blacklist.enableQuestList)
|
||||
{
|
||||
ragfair.blacklist.enableQuestList = false;
|
||||
this.logger.info("Fleamarket Blacklists patched");
|
||||
}
|
||||
|
||||
|
||||
if (mod.condition.conditionChance != ragfair.condition.conditionChance || mod.condition.min != ragfair.condition.min || mod.condition.max != ragfair.condition.max)
|
||||
{
|
||||
ragfair.condition.conditionChance = mod.condition.conditionChance;
|
||||
ragfair.condition.min = mod.condition.min;
|
||||
@ -47,7 +61,8 @@ export class Flea
|
||||
this.logger.info("Fleamarket Condition patched");
|
||||
}
|
||||
|
||||
if (mod.currencies.roubles != 78 || mod.currencies.dollars != 20 || mod.currencies.euros != 2)
|
||||
|
||||
if (mod.currencies.roubles != ragfair.currencies.roubles || mod.currencies.dollars != ragfair.currencies.dollars || mod.currencies.euros != ragfair.currencies.euros)
|
||||
{
|
||||
ragfair.currencies["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||
@ -55,26 +70,30 @@ export class Flea
|
||||
this.logger.info("Fleamarket Currencies patched")
|
||||
}
|
||||
|
||||
if (mod.offerItemCount.min != 8 || mod.offerItemCount.max != 15)
|
||||
|
||||
if (mod.offerItemCount.min != ragfair.offerItemCount.min || mod.offerItemCount.max != ragfair.offerItemCount.max)
|
||||
{
|
||||
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||
this.logger.info("Fleamarket Offer Item Count patched");
|
||||
}
|
||||
|
||||
if (mod.reputation.gain != 0.0000002 || mod.reputation.loss != 0.0000002)
|
||||
|
||||
if (mod.reputation.gain != this.ragfairConfig.sell.reputation.gain || mod.reputation.loss != this.ragfairConfig.sell.reputation.loss)
|
||||
{
|
||||
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||
this.logger.info("Fleamarket Reputation patched");
|
||||
}
|
||||
|
||||
if (mod.time.baseSellTime != 15 || mod.time.minSellTime != 5 || mod.time.maxSellTime != 15)
|
||||
|
||||
if (mod.time.baseSellTime != this.ragfairConfig.sell.time.base || mod.time.minSellTime != this.ragfairConfig.sell.time.min || mod.time.maxSellTime != this.ragfairConfig.sell.time.max)
|
||||
{
|
||||
const sell = this.ragfairConfig.sell;
|
||||
sell.time.base = mod.time.baseSellTime;
|
||||
sell.time.min = mod.time.minSellTime;
|
||||
sell.time.max = mod.time.maxSellTime;
|
||||
const sell = this.ragfairConfig.sell.time;
|
||||
const mod = this.modConfig.time;
|
||||
sell.base = mod.baseSellTime;
|
||||
sell.min = mod.minSellTime;
|
||||
sell.max = mod.maxSellTime;
|
||||
this.logger.info("Fleamarket Sell Times patched");
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,20 @@
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { Logger } from "./logger";
|
||||
import { HideoutConfig } from "../config/ts/hideout";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { HideoutConfig } from "../config/ts/hideout";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Hideout
|
||||
{
|
||||
private modConfig: HideoutConfig = require("../config/hideout.json")
|
||||
private logger: Logger;
|
||||
private tables: DatabaseServer;
|
||||
private hideout: IHideoutConfig
|
||||
private hideoutConfig: IHideoutConfig;
|
||||
|
||||
constructor(logger: Logger, databaseServer: DatabaseServer, hideout: IHideoutConfig)
|
||||
constructor(logger: Logger, databaseServer: DatabaseServer, hideoutConfig: IHideoutConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer;
|
||||
this.hideout = hideout;
|
||||
this.hideoutConfig = hideoutConfig;
|
||||
}
|
||||
|
||||
public updateHideout(): void
|
||||
@ -38,23 +38,12 @@ export class Hideout
|
||||
this.updateScavCase();
|
||||
this.logger.info(`Scav Case Time Patched to ${mod.scavCaseTime}`);
|
||||
}
|
||||
|
||||
if (mod.airFilterUnitFlowRate != 0.0047222222222222
|
||||
||mod.generatorFuelFlowRate != 0.0013194444444444
|
||||
||mod.gpuBoostRate != 0.015)
|
||||
{
|
||||
this.hideout.airFilterUnitFlowRate = mod.airFilterUnitFlowRate;
|
||||
this.hideout.generatorFuelFlowRate = mod.generatorFuelFlowRate;
|
||||
this.hideout.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()
|
||||
{
|
||||
for (const area of this.tables.getTables().hideout.areas)
|
||||
const hideout = this.tables.getTables().hideout.areas;
|
||||
for (const area of hideout)
|
||||
{
|
||||
for (const stage in area.stages)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@ export class Insurance
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
|
||||
if (mod.blacklistedEquipment != ["Scabbard", "SecuredContainer", "Compass", "ArmBand"])
|
||||
if (mod.blacklistedEquipment != this.insuranceConfig.blacklistedEquipment)
|
||||
{
|
||||
this.insuranceConfig.blacklistedEquipment = mod.blacklistedEquipment;
|
||||
this.logger.info("Insurance Blacklitsed Equipment Patched");
|
||||
|
114
src/items.ts
114
src/items.ts
@ -1,13 +1,15 @@
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { ItemsConfig } from "../config/ts/items";
|
||||
import { Logger } from "./logger";
|
||||
import { BaseClasses } from "@spt-aki/models/enums/BaseClasses";
|
||||
|
||||
export class Items
|
||||
{
|
||||
private modConfig: ItemsConfig = require("../config/items.json")
|
||||
private logger: Logger;
|
||||
private tables: DatabaseServer;
|
||||
private items: any;
|
||||
private items: Record<string, ITemplateItem>;
|
||||
|
||||
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||
{
|
||||
@ -29,16 +31,36 @@ export class Items
|
||||
// Weight Modifier. Multiplier of Weight *= modConfig.weightModifier
|
||||
if (this.modConfig.weightModifier != 1)
|
||||
{
|
||||
this.updateWeight();
|
||||
this.newWeightModifier();
|
||||
this.logger.info(`Weight Multipler patched to ${this.modConfig.weightModifier}`);
|
||||
}
|
||||
|
||||
// Removes the ExcludedFilter on Backpacks
|
||||
// which in turn enables common containers to spawn in the loot pool of AI.
|
||||
if (this.modConfig.removeBackpackFilter)
|
||||
// Removes Backpacks Restrictions.
|
||||
if (this.modConfig.removeBackpacksRestrictions)
|
||||
{
|
||||
this.updateBackpacks();
|
||||
this.logger.info(`Backpack Restrictions Removed: ${this.modConfig.removeBackpackFilter}`)
|
||||
this.removeBackpacksRestrictions();
|
||||
this.logger.info("Removed Backpacks Restrictions");
|
||||
}
|
||||
|
||||
// Remove Secured Containers Restrictions.
|
||||
if (this.modConfig.removeSecureContainersRestrictions)
|
||||
{
|
||||
this.removeSecureContainersRestrictions();
|
||||
this.logger.info("Removed Secured Containers Restrictions");
|
||||
}
|
||||
|
||||
// Remove Common Containers Restricitons.
|
||||
if (this.modConfig.removeContainersRestrictions)
|
||||
{
|
||||
this.removeContainersRestrictions();
|
||||
this.logger.info("Removed Container Restrictions");
|
||||
}
|
||||
|
||||
// Remove In Raid Item Restrictions.
|
||||
if (this.modConfig.removeInRaidItemRestrictions)
|
||||
{
|
||||
this.removeInRaidItemRestrictions();
|
||||
this.logger.info("Removed In Raid Item Restrictions");
|
||||
}
|
||||
|
||||
// Standard Stash Size Changes
|
||||
@ -101,26 +123,24 @@ export class Items
|
||||
this.logger.info(`Euro Max Stack set to ${this.modConfig.eurosMaxStack}`, true);
|
||||
}
|
||||
|
||||
// Remove ExcludedFilter Restrictions from all items. Push into Filters numerous Node categories.
|
||||
if (this.modConfig.removeItemRestrictions)
|
||||
{
|
||||
this.removeItemRestrictions();
|
||||
this.logger.info("Removed Item Restrictions");
|
||||
}
|
||||
|
||||
// Remove the Discard Limit from in raid restrictions.
|
||||
if (this.modConfig.removeDiscardLimit)
|
||||
{
|
||||
this.removeDiscardLimit();
|
||||
this.logger.info("Removed Discard Limit");
|
||||
}
|
||||
|
||||
if (this.modConfig.examineTime.enabled)
|
||||
{
|
||||
this.changeExamineTime();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Functions Functions.
|
||||
|
||||
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||
private updateWeight(): void
|
||||
private newWeightModifier(): void
|
||||
{
|
||||
for (const item in this.items)
|
||||
{
|
||||
@ -132,42 +152,48 @@ export class Items
|
||||
}
|
||||
|
||||
// Updates backpacks and removes any values in the ExcludedFilter under props > Grids > props > filters > ExcludedFilter in database/templates/items.json
|
||||
private updateBackpacks(): void
|
||||
private removeBackpacksRestrictions(): void
|
||||
{
|
||||
for (const item in this.items)
|
||||
for (const id in this.items)
|
||||
{
|
||||
if (this.items[item]._parent === "5448e53e4bdc2d60728b4567")
|
||||
const base = this.items[id];
|
||||
const mod = this.modConfig;
|
||||
|
||||
if (mod.removeBackpacksRestrictions && base._parent === BaseClasses.BACKPACK && base._props.Grids[0]._props.filters.length > 0)
|
||||
{
|
||||
for (const i in this.items[item]._props.Grids)
|
||||
{
|
||||
const grid = this.items[item]._props.Grids[i];
|
||||
grid._props.filters[0].ExcludedFilter = [];
|
||||
}
|
||||
base._props.Grids[0]._props.filters = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Removes any values in the ExcludedFilter for all items under _props > _Grids > _props > filters > ExcludedFilter in database/templates/items.json
|
||||
private removeItemRestrictions(): void
|
||||
private removeContainersRestrictions():void
|
||||
{
|
||||
for (const item in this.items)
|
||||
for (const id in this.items)
|
||||
{
|
||||
for (const i in this.items[item]._props?.Grids)
|
||||
const base = this.items[id];
|
||||
const mod = this.modConfig;
|
||||
if (mod.removeContainersRestrictions && base._parent === BaseClasses.SIMPLE_CONTAINER && base._props.Grids[0]._props.filters.length > 0)
|
||||
{
|
||||
const grid = this.items[item]._props?.Grids[i];
|
||||
for (const j in grid._props.filters)
|
||||
{
|
||||
const filters = grid._props.filters[j];
|
||||
if (filters.ExcludedFilter != [])
|
||||
{
|
||||
filters.ExcludedFilter = [];
|
||||
filters.Filter.concat(..."5448e54d4bdc2dcc718b4568", "55802f3e4bdc2de7118b4584", "5448fe124bdc2da5018b4567", "543be5664bdc2dd4348b4569", "5447e0e74bdc2d3c308b4567", "543be6674bdc2df1348b4569", "5645bcb74bdc2ded0b8b4578", "550aa4154bdc2dd8348b456b", "5448e53e4bdc2d60728b4567", "5422acb9af1c889c16000029", "5a341c4086f77401f2541505", "5795f317245977243854e041", "5448bf274bdc2dfc2f8b456a");
|
||||
}
|
||||
}
|
||||
base._props.Grids[0]._props.filters = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private removeSecureContainersRestrictions(): void
|
||||
{
|
||||
for (const id in this.items)
|
||||
{
|
||||
const base = this.items[id];
|
||||
const mod = this.modConfig;
|
||||
if (mod.removeSecureContainersRestrictions && base._parent === BaseClasses.MOD_CONTAINER && base._props.Grids[0]._props.filters.length > 0)
|
||||
{
|
||||
base._props.Grids[0]._props.filters = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private updateStandardStash(): void
|
||||
{
|
||||
this.items["566abbc34bdc2d92178b4576"]._props.Grids[0]._props.cellsV = this.modConfig.standardStash.vertical;
|
||||
@ -224,4 +250,18 @@ export class Items
|
||||
this.items[itemId]._props.DiscardLimit = -1;
|
||||
}
|
||||
}
|
||||
|
||||
private changeExamineTime(): void
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
for (const item in this.items)
|
||||
{
|
||||
this.items[item]._props.ExamineTime = mod.examineTime.examineTime;
|
||||
}
|
||||
}
|
||||
|
||||
private removeInRaidItemRestrictions(): void
|
||||
{
|
||||
this.tables.getTables().globals.config.RestrictionsInRaid = [];
|
||||
}
|
||||
}
|
@ -39,13 +39,20 @@ export class Locations
|
||||
this.logger.info("No Extract Restrictions Enabled");
|
||||
}
|
||||
|
||||
// Make all extractions of the map available regardless of the infill
|
||||
// Make all extractions of the map available regardless of the infil
|
||||
if (mod.extractionsExtended)
|
||||
{
|
||||
this.extractionsExtended();
|
||||
this.logger.info("Extractions Are Extended");
|
||||
}
|
||||
|
||||
// Enables co-op extractions (PMC w/ Scav)
|
||||
if (mod.enableCoopExtracts)
|
||||
{
|
||||
this.coopExtractsEnabled();
|
||||
this.logger.info("Coop Extracts Are Enabled");
|
||||
}
|
||||
|
||||
// Remove the access key "5c94bbff86f7747ee735c08f" (Labs access card) from Labs.
|
||||
if (mod.freeLabsEntry)
|
||||
{
|
||||
@ -108,11 +115,32 @@ export class Locations
|
||||
{
|
||||
for (const x in locations[i].base.exits)
|
||||
{
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||
locations[i].base.exits[x].Name === "lab_Vent")
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train")
|
||||
{
|
||||
if (locations[i].base.exits[x].PassageRequirement !== "None")
|
||||
if (locations[i].base.exits[x].Chance !== 100)
|
||||
{
|
||||
locations[i].base.exits[x].Chance = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private coopExtractsEnabled(): void
|
||||
{
|
||||
const locations = this.tables.getTables().locations;
|
||||
for (const i in locations)
|
||||
{
|
||||
if (i !== "base")
|
||||
for (const x in locations[i].base.exits)
|
||||
{
|
||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||
locations[i].base.exits[x].Name === "lab_Vent")
|
||||
{
|
||||
if (locations[i].base.exits[x].PassageRequirement === "ScavCooperation")
|
||||
{
|
||||
locations[i].base.exits[x].PassageRequirement = "None";
|
||||
}
|
||||
@ -138,9 +166,8 @@ export class Locations
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extractionsExtended(): void
|
||||
@ -177,6 +204,12 @@ export class Locations
|
||||
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
||||
}
|
||||
break;
|
||||
case "lighthouse":
|
||||
for (const extract in locations[map].base.exits)
|
||||
{
|
||||
locations[map].base.exits[extract].EntryPoints = "Tunnel, North"
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { Config } from "../config/config";
|
||||
import { Config } from "../config/ts/config";
|
||||
|
||||
export class Logger
|
||||
{
|
||||
|
85
src/loot.ts
85
src/loot.ts
@ -21,7 +21,7 @@ export class Loot
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
|
||||
if (mod.looseLootMultiplier > 1)
|
||||
if (mod.looseLootMultiplier != 1)
|
||||
{
|
||||
for (const map in this.locationConfig.looseLootMultiplier)
|
||||
{
|
||||
@ -30,7 +30,7 @@ export class Loot
|
||||
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
||||
}
|
||||
|
||||
if (mod.staticLootMultiplier > 1)
|
||||
if (mod.staticLootMultiplier != 1)
|
||||
{
|
||||
for (const map in this.locationConfig.staticLootMultiplier)
|
||||
{
|
||||
@ -55,27 +55,29 @@ export class Loot
|
||||
{
|
||||
// Customs Marked Room Loot.
|
||||
let spawnPoints = this.tables.getTables().locations.bigmap.looseLoot.spawnpoints;
|
||||
const cstmsmarked1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)1203364");
|
||||
const cstmsmarked2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)1198014");
|
||||
const cstmsmarked3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)1207194");
|
||||
const customsMarked1 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (10)"));
|
||||
const customsMarked2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||
const customsMarked3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||
|
||||
cstmsmarked1.itemDistribution.push(...this.containers());
|
||||
cstmsmarked2.itemDistribution.push(...this.containers());
|
||||
cstmsmarked3.itemDistribution.push(...this.containers());
|
||||
// Pushing containers into the customs marked room loot pool.
|
||||
customsMarked1.itemDistribution.push(...this.containers());
|
||||
customsMarked2.itemDistribution.push(...this.containers());
|
||||
customsMarked3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Reserve Marked Room Loot.
|
||||
spawnPoints = this.tables.getTables().locations.rezervbase.looseLoot.spawnpoints;
|
||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)49516");
|
||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)69186");
|
||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)39600");
|
||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51646628");
|
||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (8)"));
|
||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (9)"));
|
||||
|
||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (11)56822");
|
||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (12)56254");
|
||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (11)"));
|
||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id.startsWith("cult_Loot 135 (12)"));
|
||||
|
||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)60780");
|
||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (11)55578");
|
||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (12)55522");
|
||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)51658080");
|
||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (11)"));
|
||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135 (12)"));
|
||||
|
||||
// Pushing containers into the reserve base marked room loot pool.
|
||||
rsrvRBBK1.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK2.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK3.itemDistribution.push(...this.containers());
|
||||
@ -86,6 +88,45 @@ export class Loot
|
||||
rsrvRBVO1.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO2.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Streets Marked Room Loot.
|
||||
spawnPoints = this.tables.getTables().locations.tarkovstreets.looseLoot.spawnpoints;
|
||||
const streets = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare5491814");
|
||||
const streets1 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (1)"));
|
||||
const streets2 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (2)"));
|
||||
const streets3 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (3)"));
|
||||
const streets4 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (4)"));
|
||||
const streets5 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (5)"));
|
||||
const streets6 = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (6)3814146");
|
||||
const streets6a = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (6)3955044");
|
||||
const streets7 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (7)"));
|
||||
const streets8 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (8)"));
|
||||
const streets9 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (9)"));
|
||||
const streets10 = spawnPoints.find(x=>x.template.Id==="Loot 135_Leo_Rare (10)5484984");
|
||||
const streets11 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (11)"));
|
||||
const streets12 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (12)"));
|
||||
const streets13 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (13)"));
|
||||
const streets14 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (14)"));
|
||||
const streets15 = spawnPoints.find(x=>x.template.Id.startsWith("Loot 135_Leo_Rare (15)"));
|
||||
|
||||
// Pushing containers into the streets marked room loot pool.
|
||||
streets.itemDistribution.push(...this.containers());
|
||||
streets1.itemDistribution.push(...this.containers());
|
||||
streets2.itemDistribution.push(...this.containers());
|
||||
streets3.itemDistribution.push(...this.containers());
|
||||
streets4.itemDistribution.push(...this.containers());
|
||||
streets5.itemDistribution.push(...this.containers());
|
||||
streets6.itemDistribution.push(...this.containers());
|
||||
streets6a.itemDistribution.push(...this.containers());
|
||||
streets7.itemDistribution.push(...this.containers());
|
||||
streets8.itemDistribution.push(...this.containers());
|
||||
streets9.itemDistribution.push(...this.containers());
|
||||
streets10.itemDistribution.push(...this.containers());
|
||||
streets11.itemDistribution.push(...this.containers());
|
||||
streets12.itemDistribution.push(...this.containers());
|
||||
streets13.itemDistribution.push(...this.containers());
|
||||
streets14.itemDistribution.push(...this.containers());
|
||||
streets15.itemDistribution.push(...this.containers());
|
||||
}
|
||||
|
||||
private containers(): any[]
|
||||
@ -102,7 +143,11 @@ export class Loot
|
||||
* Medicine case: 5aafbcd986f7745e590fff23
|
||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||
* Secure container Gamma: 5857a8bc2459772bad15db29
|
||||
* Secure container Beta: 5857a8b324597729ab0a0e7d
|
||||
* Secure container Alpha: 544a11ac4bdc2d470e8b456a
|
||||
* Secure container Epsilon: 59db794186f77448bc595262
|
||||
* Secure container Kappa: 5c093ca986f7740a1867ab12
|
||||
*/
|
||||
|
||||
const lootItems = [];
|
||||
@ -117,7 +162,11 @@ export class Loot
|
||||
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
||||
lootItems.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 9});
|
||||
lootItems.push({"tpl": "5857a8bc2459772bad15db29", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "5857a8b324597729ab0a0e7d", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "544a11ac4bdc2d470e8b456a", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "59db794186f77448bc595262", "relativeProbability": 3});
|
||||
lootItems.push({"tpl": "5c093ca986f7740a1867ab12", "relativeProbability": 1});
|
||||
|
||||
return lootItems;
|
||||
}
|
||||
|
61
src/mod.ts
61
src/mod.ts
@ -1,36 +1,38 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
//import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { Config } from "../config/ts/config";
|
||||
import { Airdrop } from "./airdrop";
|
||||
import { Ammo } from "./ammo";
|
||||
import { Armor } from "./armor";
|
||||
import { Bots } from "./bots";
|
||||
import { Flea } from "./flea";
|
||||
import { Hideout } from "./hideout";
|
||||
import { Items } from "./items";
|
||||
import { Loot } from "./loot";
|
||||
import { Raid } from "./raid";
|
||||
import { Globals } from "./globals";
|
||||
import { Insurance } from "./insurance";
|
||||
import { Logger } from "./logger";
|
||||
import { Config } from "../config/ts/config";
|
||||
import { Weapons } from "./weapons";
|
||||
import { Containers } from "./containers";
|
||||
import { Flea } from "./flea";
|
||||
import { Globals } from "./globals";
|
||||
import { Hideout } from "./hideout";
|
||||
import { Insurance } from "./insurance";
|
||||
import { Items } from "./items";
|
||||
import { Locations } from "./locations";
|
||||
import { Quests } from "./quests";
|
||||
import { Skills } from "./skills";
|
||||
import { Logger } from "./logger";
|
||||
import { Loot } from "./loot";
|
||||
import { Prewipe } from "./prewipe";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
//import { Airdrop } from "./airdrop";
|
||||
import { Quests } from "./quests";
|
||||
import { Raid } from "./raid";
|
||||
import { Skills } from "./skills";
|
||||
import { Traders } from "./traders";
|
||||
import { Weapons } from "./weapons";
|
||||
|
||||
class ValensAIO implements IPostDBLoadMod
|
||||
{
|
||||
@ -42,10 +44,11 @@ class ValensAIO implements IPostDBLoadMod
|
||||
private insuranceConfig: IInsuranceConfig;
|
||||
private locationConfig: ILocationConfig;
|
||||
private ragfairConfig: IRagfairConfig;
|
||||
//private airdropConfig: IAirdropConfig;
|
||||
private airdropConfig: IAirdropConfig;
|
||||
private inRaidConfig: IInRaidConfig;
|
||||
private weightedRandomHelper : WeightedRandomHelper;
|
||||
private hideout: IHideoutConfig
|
||||
private hideoutConfig: IHideoutConfig
|
||||
private traderConfig: ITraderConfig;
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
@ -60,10 +63,13 @@ class ValensAIO implements IPostDBLoadMod
|
||||
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||
this.inRaidConfig = this.configServer.getConfig<IInRaidConfig>(ConfigTypes.IN_RAID);
|
||||
this.insuranceConfig = this.configServer.getConfig<IInsuranceConfig>(ConfigTypes.INSURANCE);
|
||||
this.hideout = this.configServer.getConfig<IHideoutConfig>(ConfigTypes.HIDEOUT);
|
||||
this.hideoutConfig = this.configServer.getConfig<IHideoutConfig>(ConfigTypes.HIDEOUT);
|
||||
this.traderConfig = this.configServer.getConfig<ITraderConfig>(ConfigTypes.TRADER);
|
||||
this.airdropConfig = this.configServer.getConfig<IAirdropConfig>(ConfigTypes.AIRDROP);
|
||||
|
||||
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
||||
//airdrop.updateAirdrops();
|
||||
|
||||
const airdrops = new Airdrop(vLogger, this.databaseServer, this.airdropConfig);
|
||||
airdrops.updateAirdrops();
|
||||
|
||||
const ammo = new Ammo(vLogger, this.databaseServer);
|
||||
ammo.updateAmmo();
|
||||
@ -83,7 +89,7 @@ class ValensAIO implements IPostDBLoadMod
|
||||
const globals = new Globals(vLogger, this.databaseServer);
|
||||
globals.updateGlobals();
|
||||
|
||||
const hideout = new Hideout(vLogger, this.databaseServer, this.hideout);
|
||||
const hideout = new Hideout(vLogger, this.databaseServer, this.hideoutConfig);
|
||||
hideout.updateHideout();
|
||||
|
||||
const insurance = new Insurance(vLogger, this.insuranceConfig, this.databaseServer);
|
||||
@ -110,6 +116,9 @@ class ValensAIO implements IPostDBLoadMod
|
||||
const skills = new Skills(vLogger, this.databaseServer);
|
||||
skills.updateSkills();
|
||||
|
||||
const traders = new Traders(vLogger, this.databaseServer, this.traderConfig);
|
||||
traders.updateTraders();
|
||||
|
||||
const weapons = new Weapons(vLogger, this.databaseServer);
|
||||
weapons.updateWeapons();
|
||||
|
||||
|
@ -158,7 +158,7 @@ export class Prewipe
|
||||
|
||||
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];
|
||||
switch (itemScheme[0][0]._tpl)
|
||||
|
@ -27,21 +27,16 @@ export class Quests
|
||||
private onlyFoundInRaid(): void
|
||||
{
|
||||
const quests = this.tables.getTables().templates.quests;
|
||||
|
||||
for (const questid in quests)
|
||||
Object.values(quests).forEach(quest =>
|
||||
{
|
||||
const questsAvailableForFinishConditions = quests[questid].conditions.AvailableForFinish;
|
||||
const findItemConditions = questsAvailableForFinishConditions.find(x=>x._parent === "FindItem");
|
||||
|
||||
if (!findItemConditions)
|
||||
quest.conditions.AvailableForFinish.forEach((prop, index) =>
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (findItemConditions._props.onlyFoundInRaid)
|
||||
{
|
||||
findItemConditions._props.onlyFoundInRaid = false;
|
||||
}
|
||||
}
|
||||
if (prop._parent == "FindItem" || prop._parent == "HandoverItem")
|
||||
{
|
||||
prop._props.onlyFoundInRaid = false;
|
||||
quest.conditions.AvailableForFinish[index] = prop;
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
28
src/raid.ts
28
src/raid.ts
@ -1,7 +1,7 @@
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { Logger } from "./logger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { RaidConfig } from "../config/ts/raid";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Raid
|
||||
{
|
||||
@ -33,7 +33,7 @@ export class Raid
|
||||
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
||||
}
|
||||
|
||||
if (mod.timeLimit)
|
||||
if (mod.timeLimit.enabled)
|
||||
{
|
||||
const maps = this.tables.getTables().locations;
|
||||
|
||||
@ -41,14 +41,14 @@ export class Raid
|
||||
{
|
||||
if (this.tables.getTables().locations[map].base?.EscapeTimeLimit)
|
||||
{
|
||||
this.tables.getTables().locations[map].base.EscapeTimeLimit = this.modConfig.timeLimit;
|
||||
this.tables.getTables().locations[map].base.EscapeTimeLimit = this.modConfig.timeLimit.raidTime;
|
||||
}
|
||||
}
|
||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit.raidTime} minutes.`);
|
||||
}
|
||||
|
||||
if (mod.aiAmount.toLowerCase() != "asonline" ||mod.aiDifficulty.toLowerCase() != "asonline" ||mod.bossEnabled != true
|
||||
||mod.scavWars != false ||mod.taggedAndCursed != false ||mod.enablePve != false)
|
||||
if (mod.aiAmount.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiAmount || mod.aiDifficulty.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiDifficulty || mod.bossEnabled != true
|
||||
|| mod.scavWars != this.inRaidConfig.raidMenuSettings.scavWars || mod.taggedAndCursed != this.inRaidConfig.raidMenuSettings.taggedAndCursed || mod.enablePve != this.inRaidConfig.raidMenuSettings.enablePve)
|
||||
{
|
||||
const inRaidConfig = this.inRaidConfig;
|
||||
|
||||
@ -66,13 +66,13 @@ export class Raid
|
||||
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||
}
|
||||
|
||||
if (mod.carExtractBaseStandingGain != 0.25)
|
||||
if (mod.carExtractBaseStandingGain != this.inRaidConfig.carExtractBaseStandingGain)
|
||||
{
|
||||
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||
}
|
||||
|
||||
if (mod.scavExtractGain != 0.01)
|
||||
if (mod.scavExtractGain != this.inRaidConfig.scavExtractGain)
|
||||
{
|
||||
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||
@ -83,12 +83,12 @@ export class Raid
|
||||
{
|
||||
const zones =
|
||||
{
|
||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneBlockPost,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||
"laboratory": "BotZoneFloor1,BotZoneFloor2,BotZoneBasement",
|
||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||
"laboratory": "BotZoneGate1,BotZoneGate2,BotZoneBasement,BotZoneFloor1,BotZoneFloor2",
|
||||
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
||||
"woods": "ZoneRedHouse,ZoneWoodCutter,ZoneHouse,ZoneBigRocks,ZoneRoad,ZoneMiniHouse,ZoneScavBase2,ZoneBrokenVill,ZoneClearVill,ZoneHighRocks",
|
||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZonePassFar,ZonePassClose,ZoneTunnel,ZoneStartVillage,ZoneBunker,ZoneGreenHouses,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneForestTruck,ZoneForestSpawn,ZoneForestGasStation",
|
||||
"lighthouse": "Zone_TreatmentContainers,Zone_LongRoad,Zone_Blockpost,Zone_TreatmentBeach,Zone_Hellicopter,Zone_RoofContainers,Zone_Village,Zone_OldHouse,Zone_RoofRocks,Zone_DestroyedHouse,Zone_Chalet,Zone_SniperPeak,Zone_RoofBeach,Zone_Containers,Zone_TreatmentRocks,Zone_Rocks"
|
||||
"woods": "ZoneClearVill,ZoneHouse,ZoneScavBase2,ZoneHouse,ZoneWoodCutter,ZoneBigRocks,ZoneRoad,ZoneHighRocks,ZoneMiniHouse,ZoneBigRocks,ZoneRedHouse",
|
||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneBunkeSniper,ZonePowerStationSniper,ZoneForestTruck,ZoneForestSpawn,ZoneBunker,GreenHouses,ZoneStartVillage,ZoneTunnel,ZonePassClose,ZonePassFar,ZoneForestGasStation",
|
||||
"lighthouse": "Zone_Containers,Zone_Rocks,Zone_Chalet,Zone_Village,Zone_Bridge,Zone_OldHouse,Zone_LongRoad,Zone_DestroyedHouse,Zone_SniperPeak,Zone_Island,Zone_Blockpost,Zone_Helicopter,Zone_RoofBeach,Zone_TreatmentBeach,Zone_TreatmentRocks,Zone_TreatmentContainers,Zone_RoofRocks"
|
||||
}
|
||||
|
||||
for (const location in zones)
|
||||
|
100
src/traders.ts
Normal file
100
src/traders.ts
Normal file
@ -0,0 +1,100 @@
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { TradersConfig } from "config/ts/traders";
|
||||
import { Logger } from "./logger";
|
||||
|
||||
export class Traders
|
||||
{
|
||||
private modConfig: TradersConfig = require("../config/traders.json")
|
||||
private logger: Logger;
|
||||
private databaseServer: DatabaseServer;
|
||||
private traderConfig: ITraderConfig;
|
||||
|
||||
constructor(logger:Logger, databaseServer: DatabaseServer, traderConfig: ITraderConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
this.traderConfig = traderConfig;
|
||||
}
|
||||
|
||||
public updateTraders(): void
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
const trader = this.traderConfig;
|
||||
|
||||
if (mod.updateTime.enabled)
|
||||
{
|
||||
this.updateTime();
|
||||
}
|
||||
|
||||
if (trader.updateTimeDefault != mod.updateTimeDefault)
|
||||
{
|
||||
trader.updateTimeDefault = mod.updateTimeDefault;
|
||||
}
|
||||
|
||||
if (trader.traderPriceMultipler != mod.traderPriceMultipler)
|
||||
{
|
||||
this.traderPriceMultiplier();
|
||||
}
|
||||
|
||||
if (trader.durabilityPurchaseThreshhold != mod.durabilityPurchaseThreshhold)
|
||||
{
|
||||
this.minDurabilityForSale();
|
||||
}
|
||||
|
||||
if (trader.persistPurchaseDataInProfile != mod.persistPurchaseDataInProfile)
|
||||
{
|
||||
trader.persistPurchaseDataInProfile = mod.persistPurchaseDataInProfile;
|
||||
}
|
||||
|
||||
if (trader.fence != mod.fence)
|
||||
{
|
||||
this.updateFence();
|
||||
}
|
||||
}
|
||||
|
||||
private updateTime(): void
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
const trader = this.traderConfig;
|
||||
trader.updateTime = mod.updateTime.updateTime;
|
||||
this.logger.info("Update Time Patched");
|
||||
}
|
||||
|
||||
private traderPriceMultiplier(): void
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
const trader = this.traderConfig;
|
||||
trader.traderPriceMultipler = mod.traderPriceMultipler;
|
||||
this.logger.info(`Trader Price Multiplier Set to ${mod.traderPriceMultipler}`);
|
||||
}
|
||||
|
||||
private minDurabilityForSale(): void
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
const trader = this.traderConfig;
|
||||
trader.durabilityPurchaseThreshhold = mod.durabilityPurchaseThreshhold;
|
||||
this.logger.info(`Min Durability For Sale Set to ${mod.durabilityPurchaseThreshhold}`);
|
||||
}
|
||||
|
||||
private updateFence(): void
|
||||
{
|
||||
const mod = this.modConfig.fence;
|
||||
const trader = this.traderConfig.fence;
|
||||
|
||||
// Start updating Fence config.
|
||||
|
||||
trader.partialRefreshTimeSeconds = mod.partialRefreshTimeSeconds;
|
||||
trader.partialRefreshChangePercent = mod.partialRefreshChangePercent;
|
||||
trader.discountOptions.assortSize = mod.assortSize;
|
||||
trader.maxPresetsPercent = mod.maxPresetsPercent;
|
||||
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;
|
||||
this.logger.info("Fence Has Been Patched");
|
||||
}
|
||||
}
|
@ -1,3 +1,6 @@
|
||||
import { Config, IGlobals } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { WeaponsConfig } from "../config/ts/weapons";
|
||||
import { Logger } from "./logger";
|
||||
@ -7,7 +10,8 @@ export class Weapons
|
||||
private modConfig: WeaponsConfig = require("../config/weapons.json")
|
||||
private logger: Logger;
|
||||
private tables: DatabaseServer;
|
||||
private weapons: any;
|
||||
private weapons: IDatabaseTables;
|
||||
private globals: IGlobals;
|
||||
|
||||
constructor(logger:Logger, databaseServer: DatabaseServer)
|
||||
{
|
||||
@ -19,6 +23,7 @@ export class Weapons
|
||||
{
|
||||
const mod = this.modConfig;
|
||||
this.weapons = this.tables.getTables().templates.items;
|
||||
this.globals = this.tables.getTables().globals;
|
||||
|
||||
if (mod.malfunctions.overheat || mod.malfunctions.jam || mod.malfunctions.slide || mod.malfunctions.misfeed || mod.malfunctions.misfire)
|
||||
{
|
||||
@ -26,6 +31,12 @@ export class Weapons
|
||||
this.logger.info("Weapon Malfunctions Patched");
|
||||
}
|
||||
|
||||
if (mod.recoilTweaks)
|
||||
{
|
||||
this.recoilTweaks();
|
||||
this.logger.info("Weapon Recoil has been tweaked");
|
||||
}
|
||||
|
||||
if (mod.smgInHolsters)
|
||||
{
|
||||
this.smgInHolsters();
|
||||
@ -72,6 +83,37 @@ export class Weapons
|
||||
}
|
||||
}
|
||||
|
||||
private recoilTweaks(): void
|
||||
{
|
||||
const weapons: IDatabaseTables = this.weapons;
|
||||
const globals: Config = this.globals.config;
|
||||
|
||||
for (const weapon in weapons)
|
||||
{
|
||||
const weaponData: ITemplateItem = weapons[weapon];
|
||||
if (weaponData._props.weapClass != null && weaponData._props.weapClass !== undefined)
|
||||
{
|
||||
if (weaponData._props.weapClass !== "pistol")
|
||||
{
|
||||
weaponData._props.CameraRecoil *= 0.25;
|
||||
weaponData._props.CameraSnap = 3.5;
|
||||
}
|
||||
else
|
||||
{
|
||||
weaponData._props.CameraRecoil *= 0.45;
|
||||
weaponData._props.CameraSnap = 3.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
globals.Aiming.RecoilCrank = true;
|
||||
globals.Aiming.AimProceduralIntensity = 0.7;
|
||||
globals.Aiming.RecoilHandDamping = 0.6;
|
||||
globals.Aiming.RecoilDamping = 0.5;
|
||||
globals.Aiming.RecoilConvergenceMult *= 5;
|
||||
globals.Aiming.RecoilVertBonus = 30;
|
||||
globals.Aiming.RecoilBackBonus = 80;
|
||||
}
|
||||
|
||||
private smgInHolsters(): void
|
||||
{
|
||||
for (const weaponId in this.weapons)
|
||||
|
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 {
|
||||
private errorHandler;
|
||||
constructor();
|
||||
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 httpResponse: HttpResponseUtil;
|
||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/limit
|
||||
* @returns string
|
||||
*/
|
||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/difficulty
|
||||
* @returns 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[]>;
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/maxCap
|
||||
* @returns 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 { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class BundleCallbacks {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpServer: IHttpServer;
|
||||
protected httpFileUtil: HttpFileUtil;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected configServer: ConfigServer;
|
||||
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;
|
||||
getBundles(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 { ISuit } from "../models/eft/common/tables/ITrader";
|
||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { IGetSuitsResponse } from "../models/eft/customization/IGetSuitsResponse";
|
||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -13,10 +14,15 @@ export declare class CustomizationCallbacks {
|
||||
protected saveServer: SaveServer;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
||||
_id: string;
|
||||
suites: string[];
|
||||
}>;
|
||||
/**
|
||||
* Handles client/trading/customization/storage
|
||||
* @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[]>;
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, 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 { IGlobals } from "../models/eft/common/IGlobals";
|
||||
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 { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
||||
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
/**
|
||||
* Handle client requests
|
||||
*/
|
||||
export declare class DataCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
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>;
|
||||
/**
|
||||
* Handles client/globals
|
||||
* @returns IGlobals
|
||||
*/
|
||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||
/**
|
||||
* Handles client/items
|
||||
* @returns 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>>;
|
||||
/**
|
||||
* Handles client/account/customization
|
||||
* @returns string[]
|
||||
*/
|
||||
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
||||
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<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 { OnUpdate } from "../di/OnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
||||
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||
@ -20,26 +21,38 @@ import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class DialogueCallbacks extends OnUpdate {
|
||||
export declare class DialogueCallbacks implements OnUpdate {
|
||||
protected hashUtil: HashUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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>;
|
||||
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[]>;
|
||||
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[]>;
|
||||
pinDialog(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[]>;
|
||||
/**
|
||||
* Handles client/mail/dialog/getAllAttachments
|
||||
* @returns IGetAllAttachmentsResponse
|
||||
*/
|
||||
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
||||
listOutbox(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;
|
||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
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 { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
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 { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
@ -13,13 +18,37 @@ declare class GameCallbacks {
|
||||
protected watermark: Watermark;
|
||||
protected gameController: GameController;
|
||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
||||
/**
|
||||
* Handle client/game/version/validate
|
||||
* @returns 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>;
|
||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
gameKeepalive(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<ICheckVersionResponse>;
|
||||
/**
|
||||
* 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;
|
||||
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 { OnLoad } from "../di/OnLoad";
|
||||
export declare class HandbookCallbacks extends OnLoad {
|
||||
export declare class HandbookCallbacks implements OnLoad {
|
||||
protected handbookController: HandbookController;
|
||||
constructor(handbookController: HandbookController);
|
||||
onLoad(): void;
|
||||
onLoad(): Promise<void>;
|
||||
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 { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class HealthCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -21,7 +22,27 @@ export declare class HealthCallbacks {
|
||||
* @returns empty response, no data sent back to client
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* Handle Heal
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle RestoreHealth
|
||||
* @returns 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 { OnUpdate } from "../di/OnUpdate";
|
||||
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 { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
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 { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class HideoutCallbacks extends OnUpdate {
|
||||
export declare class HideoutCallbacks implements OnUpdate {
|
||||
protected hideoutController: HideoutController;
|
||||
protected configServer: ConfigServer;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||
configServer: ConfigServer);
|
||||
/**
|
||||
* Handle HideoutUpgrade
|
||||
*/
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutUpgradeComplete
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeItemsFromAreaSlots
|
||||
*/
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutToggleArea
|
||||
*/
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutSingleProductionStart
|
||||
*/
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutScavCaseProductionStart
|
||||
*/
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
10
types/callbacks/HttpCallbacks.d.ts
vendored
10
types/callbacks/HttpCallbacks.d.ts
vendored
@ -1,9 +1,9 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
export declare class HttpCallbacks extends OnLoad {
|
||||
protected httpServer: IHttpServer;
|
||||
constructor(httpServer: IHttpServer);
|
||||
onLoad(): void;
|
||||
import { HttpServer } from "../servers/HttpServer";
|
||||
export declare class HttpCallbacks implements OnLoad {
|
||||
protected httpServer: HttpServer;
|
||||
constructor(httpServer: HttpServer);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): 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 { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
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";
|
||||
/**
|
||||
* Handle client requests
|
||||
*/
|
||||
export declare class InraidCallbacks {
|
||||
protected inraidController: InraidController;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
||||
/**
|
||||
* Handle client/location/getLocalloot
|
||||
* @param url
|
||||
* @param info register player request
|
||||
* @param sessionID Session id
|
||||
* @returns Null http response
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* Handle singleplayer/settings/raid/endstate
|
||||
* @returns
|
||||
*/
|
||||
getRaidEndState(): string;
|
||||
getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
getWeaponDurability(url: string, info: any, sessionID: string): string;
|
||||
getAirdropConfig(url: string, info: any, sessionID: string): string;
|
||||
/**
|
||||
* Handle singleplayer/settings/raid/menu
|
||||
* @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 { InsuranceService } from "../services/InsuranceService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class InsuranceCallbacks extends OnUpdate {
|
||||
export declare class InsuranceCallbacks implements OnUpdate {
|
||||
protected insuranceController: InsuranceController;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
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>;
|
||||
/**
|
||||
* Handle Insure
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||
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 { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class InventoryCallbacks {
|
||||
protected inventoryController: InventoryController;
|
||||
@ -36,4 +37,5 @@ export declare class InventoryCallbacks {
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, 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 { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
@ -8,4 +9,5 @@ export declare class ItemEventCallbacks {
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||
protected getErrorCode(warnings: Warning[]): number;
|
||||
}
|
||||
|
1
types/callbacks/LocationCallbacks.d.ts
vendored
1
types/callbacks/LocationCallbacks.d.ts
vendored
@ -11,4 +11,5 @@ export declare class LocationCallbacks {
|
||||
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
}
|
||||
|
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 { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -34,9 +34,13 @@ export declare class MatchCallbacks {
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
/**
|
||||
* Handle client/match/group/status
|
||||
* @returns
|
||||
*/
|
||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, 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 { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
declare class ModCallbacks extends OnLoad {
|
||||
declare class ModCallbacks implements OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpServer: IHttpServer;
|
||||
protected httpFileUtil: HttpFileUtil;
|
||||
protected postAkiModLoader: PostAkiModLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||
getBundles(url: string, info: any, sessionID: string): string;
|
||||
getBundle(url: string, info: any, sessionID: string): string;
|
||||
}
|
||||
export { ModCallbacks };
|
||||
|
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 { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class NotifierCallbacks {
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
@ -19,6 +20,10 @@ export declare class NotifierCallbacks {
|
||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||
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;
|
||||
}
|
||||
|
4
types/callbacks/PresetCallbacks.d.ts
vendored
4
types/callbacks/PresetCallbacks.d.ts
vendored
@ -1,8 +1,8 @@
|
||||
import { PresetController } from "../controllers/PresetController";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
export declare class PresetCallbacks extends OnLoad {
|
||||
export declare class PresetCallbacks implements OnLoad {
|
||||
protected presetController: PresetController;
|
||||
constructor(presetController: PresetController);
|
||||
onLoad(): void;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
38
types/callbacks/ProfileCallbacks.d.ts
vendored
38
types/callbacks/ProfileCallbacks.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
import { ProfileController } from "../controllers/ProfileController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||
@ -12,20 +13,51 @@ import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendRespon
|
||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
/** Handle profile related client events */
|
||||
export declare class ProfileCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected profileController: ProfileController;
|
||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
||||
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
/**
|
||||
* Get the complete player profile (scav + pmc character)
|
||||
* @param url
|
||||
* @param info Empty
|
||||
* @param sessionID Session id
|
||||
* @returns Profile object
|
||||
*/
|
||||
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||
/**
|
||||
* Handle the creation of a scav profile for player
|
||||
* Occurs post-raid and when profile first created immediately after character details are confirmed by player
|
||||
* @param url
|
||||
* @param info empty
|
||||
* @param sessionID Session id
|
||||
* @returns Profile object
|
||||
*/
|
||||
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||
/**
|
||||
* Handle client/game/profile/voice/change event
|
||||
* @param url
|
||||
* @param info Change voice request object
|
||||
* @param sessionID Session id
|
||||
* @returns Client response
|
||||
*/
|
||||
changeVoice(url: string, info: IProfileChangeVoiceRequestData, sessionID: string): INullResponseData;
|
||||
/**
|
||||
* Handle client/game/profile/nickname/change event
|
||||
* Client allows player to adjust their profile name
|
||||
* @param url
|
||||
* @param info Change nickname request object
|
||||
* @param sessionID Session id
|
||||
* @returns client response
|
||||
*/
|
||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||
/**
|
||||
* Called when creating a character, when you choose a character face/voice
|
||||
* Called when creating a character when choosing a character face/voice
|
||||
* @param url
|
||||
* @param info response (empty)
|
||||
* @param sessionID
|
||||
|
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;
|
||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, 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[]>;
|
||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||
}
|
||||
|
22
types/callbacks/RagfairCallbacks.d.ts
vendored
22
types/callbacks/RagfairCallbacks.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { RagfairController } from "../controllers/RagfairController";
|
||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
@ -14,28 +15,33 @@ import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferReque
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
/**
|
||||
* Handle ragfair related callback events
|
||||
*/
|
||||
export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected ragfairServer: RagfairServer;
|
||||
protected ragfairController: RagfairController;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||
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;
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, 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;
|
||||
}
|
||||
|
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 {
|
||||
protected 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;
|
||||
/**
|
||||
* Use repair kit to repair item
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
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";
|
||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||
export declare class SaveCallbacks implements OnLoad, OnUpdate {
|
||||
protected saveServer: SaveServer;
|
||||
constructor(saveServer: SaveServer);
|
||||
onLoad(): void;
|
||||
onLoad(): Promise<void>;
|
||||
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 {
|
||||
protected tradeController: TradeController;
|
||||
constructor(tradeController: TradeController);
|
||||
/**
|
||||
* Handle client/game/profile/items/moving TradingConfirm
|
||||
*/
|
||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
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 { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected traderController: TraderController;
|
||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||
onLoad(): void;
|
||||
onUpdate(): boolean;
|
||||
onLoad(): Promise<void>;
|
||||
onUpdate(): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
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[][]>>;
|
||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||
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 { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class WeatherCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected 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 {
|
||||
private variables;
|
||||
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;
|
||||
getValues(type: ContextVariableType): ContextVariable[];
|
||||
addValue(type: ContextVariableType, value: any): void;
|
||||
|
2
types/context/ContextVariable.d.ts
vendored
2
types/context/ContextVariable.d.ts
vendored
@ -4,7 +4,7 @@ export declare class ContextVariable {
|
||||
private timestamp;
|
||||
private type;
|
||||
constructor(value: any, type: ContextVariableType);
|
||||
getValue(): any;
|
||||
getValue<T>(): T;
|
||||
getTimestamp(): Date;
|
||||
getType(): ContextVariableType;
|
||||
}
|
||||
|
8
types/context/ContextVariableType.d.ts
vendored
8
types/context/ContextVariableType.d.ts
vendored
@ -1,4 +1,10 @@
|
||||
export declare enum ContextVariableType {
|
||||
/** Logged in users session id */
|
||||
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
|
||||
}
|
||||
|
42
types/controllers/BotController.d.ts
vendored
42
types/controllers/BotController.d.ts
vendored
@ -1,25 +1,44 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||
import { Difficulty } from "../models/eft/common/tables/IBotType";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class BotController {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected botGenerator: BotGenerator;
|
||||
protected botHelper: BotHelper;
|
||||
protected botDifficultyHelper: BotDifficultyHelper;
|
||||
protected botGenerationCacheService: BotGenerationCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, 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
|
||||
* @param type bot Type we want the loadout gen count for
|
||||
* @returns
|
||||
* @returns number of bots to generate
|
||||
*/
|
||||
getBotPresetGenerationLimit(type: string): number;
|
||||
/**
|
||||
* Get the core.json difficulty settings from database\bots
|
||||
* @returns IBotCore
|
||||
*/
|
||||
getBotCoreDifficulty(): IBotCore;
|
||||
/**
|
||||
* Get bot difficulty settings
|
||||
@ -29,7 +48,24 @@ export declare class BotController {
|
||||
* @returns Difficulty object
|
||||
*/
|
||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: 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[];
|
||||
/**
|
||||
* 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;
|
||||
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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
export declare class CustomizationController {
|
||||
protected logger: ILogger;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected localisationService: LocalisationService;
|
||||
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[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, 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 { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse";
|
||||
import { IGetMailDialogViewResponseData } from "../models/eft/dialog/IGetMailDialogViewResponseData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { DialogueInfo, Message } from "../models/eft/profile/IAkiProfile";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class DialogueController {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected dialogueHelper: DialogueHelper;
|
||||
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
||||
constructor(saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper);
|
||||
update(): void;
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* 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;
|
||||
setDialoguePin(dialogueID: string, shouldPin: boolean, 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;
|
||||
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;
|
||||
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 { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
|
||||
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 { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { 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 { Watermark } from "../utils/Watermark";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class GameController {
|
||||
protected logger: ILogger;
|
||||
protected watermark: Watermark;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected localeService: LocaleService;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected customLocationWaveService: CustomLocationWaveService;
|
||||
protected openZoneService: OpenZoneService;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
||||
protected locationConfig: ILocationConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||
/**
|
||||
* When player logs in, iterate over all active effects and reduce timer
|
||||
* TODO - add body part HP regen
|
||||
* @param pmcProfile
|
||||
*/
|
||||
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
|
||||
*/
|
||||
protected fixBrokenOfflineMapWaves(): void;
|
||||
/**
|
||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
||||
*/
|
||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
||||
/**
|
||||
* Get a list of installed mods and save their details to the profile being used
|
||||
* @param fullProfile Profile to add mod details to
|
||||
*/
|
||||
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;
|
||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||
getServer(): any[];
|
||||
getValidGameVersion(): any;
|
||||
getServer(): IServerDetails[];
|
||||
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 { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class HealthController {
|
||||
protected logger: ILogger;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected paymentService: PaymentService;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
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
|
||||
* @param pmcData Player profile
|
||||
@ -25,7 +30,7 @@ export declare class HealthController {
|
||||
* @param sessionID
|
||||
* @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
|
||||
* @param pmcData
|
||||
@ -34,13 +39,35 @@ export declare class HealthController {
|
||||
* @returns
|
||||
*/
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Consume food/water outside of a raid
|
||||
* @param pmcData Player profile
|
||||
* @param body request Object
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Occurs on post-raid healing page
|
||||
* @param pmcData player profile
|
||||
* @param info Request data from client
|
||||
* @param healthTreatmentRequest Request data from client
|
||||
* @param sessionID Session id
|
||||
* @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 { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||
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 { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||
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 { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||
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 { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
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 { SaveServer } from "../servers/SaveServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class HideoutController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -40,19 +46,36 @@ export declare class HideoutController {
|
||||
protected playerService: PlayerService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected fenceService: FenceService;
|
||||
protected static nameBackendCountersCrafting: string;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService);
|
||||
/**
|
||||
* Start a hideout area upgrade
|
||||
* @param pmcData Player profile
|
||||
* @param request upgrade start request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Complete a hideout area upgrade
|
||||
* @param pmcData Player profile
|
||||
* @param request Completed upgrade request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
* Create item in hideout slot item array, remove item from player inventory
|
||||
* @param pmcData Profile data
|
||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||
@ -60,7 +83,14 @@ export declare class HideoutController {
|
||||
* @returns IItemEventRouterResponse object
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove item from hideout area and place into player inventory
|
||||
* @param pmcData Player profile
|
||||
* @param request Take item out of area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, request: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||
* @param sessionID Session id
|
||||
@ -71,7 +101,21 @@ export declare class HideoutController {
|
||||
* @returns IItemEventRouterResponse response
|
||||
*/
|
||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Toggle area on/off
|
||||
* @param pmcData Player profile
|
||||
* @param request Toggle area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Start production for an item from hideout area
|
||||
* @param pmcData Player profile
|
||||
* @param body Start prodution of single item request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles event after clicking 'start' on the scav case hideout page
|
||||
@ -81,24 +125,96 @@ export declare class HideoutController {
|
||||
* @returns item event router response
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Adjust scav case time based on fence standing
|
||||
*
|
||||
* @param pmcData Player profile
|
||||
* @param productionTime Time to complete scav case in seconds
|
||||
* @returns Adjusted scav case time in seconds
|
||||
*/
|
||||
protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number;
|
||||
/**
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
* @param request Continious production request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take completed item out of hideout area and place into player inventory
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param output
|
||||
* @returns
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Player profile
|
||||
* @param request Get rewards from scavcase craft request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, 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;
|
||||
}
|
||||
|
89
types/controllers/InraidController.d.ts
vendored
89
types/controllers/InraidController.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||
@ -6,8 +7,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -16,6 +19,9 @@ import { SaveServer } from "../servers/SaveServer";
|
||||
import { InsuranceService } from "../services/InsuranceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
/**
|
||||
* Logic for handling In Raid callbacks
|
||||
*/
|
||||
export declare class InraidController {
|
||||
protected logger: ILogger;
|
||||
protected saveServer: SaveServer;
|
||||
@ -30,11 +36,65 @@ export declare class InraidController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected inRaidHelper: InRaidHelper;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
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);
|
||||
/**
|
||||
* 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;
|
||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): 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 offraidData post-raid data
|
||||
*/
|
||||
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
|
||||
* @param pmcData profile to edit
|
||||
* @param multipler multipler to apply to max health
|
||||
*/
|
||||
protected reducePmcHealthToPercent(pmcData: IPmcData, multipler: number): void;
|
||||
/**
|
||||
* Handle updating the profile post-pscav raid
|
||||
* @param sessionID session id
|
||||
* @param offraidData post-raid data of raid
|
||||
*/
|
||||
protected savePlayerScavProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||
/**
|
||||
* Is the player dead after a raid - dead is anything other than "survived" / "runner"
|
||||
* @param statusOnExit exit value from offraidData object
|
||||
* @returns true if dead
|
||||
*/
|
||||
protected isPlayerDead(statusOnExit: string): boolean;
|
||||
/**
|
||||
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||
* @param offraidData Save Progress Request
|
||||
@ -42,6 +102,31 @@ export declare class InraidController {
|
||||
* @param isPlayerScav Was the player a pScav
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* 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 { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
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 { SaveServer } from "../servers/SaveServer";
|
||||
@ -19,7 +19,7 @@ import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class InsuranceController {
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected saveServer: SaveServer;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -30,15 +30,24 @@ export declare class InsuranceController {
|
||||
protected insuranceService: InsuranceService;
|
||||
protected configServer: ConfigServer;
|
||||
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
|
||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items prior to being given to player in mail
|
||||
*/
|
||||
processReturn(): void;
|
||||
/**
|
||||
* Add insurance to an item
|
||||
* @param pmcData Player profile
|
||||
* @param body Insurance request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse object to send to client
|
||||
*/
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Calculate insurance cost
|
||||
* @param info request object
|
||||
* @param sessionID session id
|
||||
* @returns response object to send to client
|
||||
* @returns IGetInsuranceCostResponseData object to send to client
|
||||
*/
|
||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||
}
|
||||
|
46
types/controllers/InventoryController.d.ts
vendored
46
types/controllers/InventoryController.d.ts
vendored
@ -2,6 +2,7 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
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 { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class InventoryController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected fenceService: FenceService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||
protected localisationService: LocalisationService;
|
||||
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
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
*/
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
@ -92,7 +105,11 @@ export declare class InventoryController {
|
||||
*/
|
||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles Tagging of items (primary Containers).
|
||||
* Add a tag to an inventory item
|
||||
* @param pmcData profile with item to add tag to
|
||||
* @param body tag request data
|
||||
* @param sessionID session id
|
||||
* @returns client response object
|
||||
*/
|
||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
@ -112,10 +129,23 @@ export declare class InventoryController {
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
* Handle ApplyInventoryChanges
|
||||
* Sorts supplied items.
|
||||
* @param pmcData Player profile
|
||||
* @param request sort request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
19
types/controllers/LocationController.d.ts
vendored
19
types/controllers/LocationController.d.ts
vendored
@ -1,18 +1,35 @@
|
||||
import { LocationGenerator } from "../generators/LocationGenerator";
|
||||
import { LootGenerator } from "../generators/LootGenerator";
|
||||
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||
import { LootItem } from "../models/spt/services/LootItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class LocationController {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected logger: ILogger;
|
||||
protected locationGenerator: LocationGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected lootGenerator: LootGenerator;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected timeUtil: TimeUtil;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
get(location: string): ILocationBase;
|
||||
generate(name: string): ILocationBase;
|
||||
generateAll(): ILocationsGenerateAllResponse;
|
||||
/**
|
||||
* Get loot for an airdop container
|
||||
* Generates it randomly based on config/airdrop.json values
|
||||
* @returns Array of LootItem
|
||||
*/
|
||||
getAirdropLoot(): LootItem[];
|
||||
}
|
||||
|
21
types/controllers/MatchController.d.ts
vendored
21
types/controllers/MatchController.d.ts
vendored
@ -6,14 +6,16 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { MatchLocationService } from "../services/MatchLocationService";
|
||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||
@ -26,10 +28,12 @@ export declare class MatchController {
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected profileSnapshotService: ProfileSnapshotService;
|
||||
protected botGenerationCacheService: BotGenerationCacheService;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected matchConfig: IMatchConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, applicationContext: ApplicationContext);
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
@ -37,6 +41,17 @@ export declare class MatchController {
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): 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;
|
||||
}
|
||||
|
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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
export declare class NoteController {
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(itemEventRouter: ItemEventRouter);
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(eventOutputHolder: EventOutputHolder);
|
||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||
editNote(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 { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
export declare class PresetBuildController {
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected itemHelper: ItemHelper;
|
||||
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[];
|
||||
saveBuild(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 { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||
@ -24,8 +25,9 @@ export declare class ProfileController {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected questHelper: QuestHelper;
|
||||
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[];
|
||||
getMiniProfile(sessionID: string): any;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
|
84
types/controllers/QuestController.d.ts
vendored
84
types/controllers/QuestController.d.ts
vendored
@ -5,22 +5,26 @@ import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
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 { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||
import { IHandoverQuestRequestData } from "../models/eft/quests/IHandoverQuestRequestData";
|
||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||
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 { LocaleService } from "../services/LocaleService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class QuestController {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected dialogueHelper: DialogueHelper;
|
||||
@ -29,9 +33,10 @@ export declare class QuestController {
|
||||
protected questConditionHelper: QuestConditionHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected localeService: LocaleService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
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
|
||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||
@ -39,26 +44,71 @@ export declare class QuestController {
|
||||
* @returns array of IQuest
|
||||
*/
|
||||
getClientQuests(sessionID: string): IQuest[];
|
||||
/**
|
||||
* Is the quest for the opposite side the player is on
|
||||
* @param side player side (usec/bear)
|
||||
* @param questId questId to check
|
||||
*/
|
||||
protected questIsForOtherSide(side: string, questId: string): boolean;
|
||||
/**
|
||||
* Handle the client accepting a quest and starting it
|
||||
* Send starting rewards if any to player and
|
||||
* Send start notification if any to player
|
||||
* @param pmcData Profile to update
|
||||
* @param acceptedQuest Quest accepted
|
||||
* @param sessionID Session id
|
||||
* @returns client response
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* Remove completed quest from profile
|
||||
* 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
|
||||
* Add newly unlocked quests to profile
|
||||
* Also recalculate thier level due to exp rewards
|
||||
* @param pmcData Player profile
|
||||
* @param body completed quest request
|
||||
* @param sessionID session id
|
||||
* @returns ItemEvent response
|
||||
* @param body Completed quest request
|
||||
* @param sessionID Session id
|
||||
* @returns ItemEvent client response
|
||||
*/
|
||||
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 pmcData player profile
|
||||
* @param completedQuestId completed quest id
|
||||
* @param questRewards rewards given to player
|
||||
* @param pmcData Player profile
|
||||
* @param completedQuestId Completed quest id
|
||||
* @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
|
||||
* @param completedQuestId quest completed id
|
||||
@ -67,10 +117,20 @@ export declare class QuestController {
|
||||
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
||||
/**
|
||||
* Fail the quests provided
|
||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
||||
* @param sessionID session id
|
||||
* @param pmcData player profile
|
||||
* @param questsToFail quests to fail
|
||||
*/
|
||||
protected failQuests(sessionID: string, pmcData: IPmcData, questsToFail: IQuest[]): void;
|
||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Increment a backend counter stored value by an amount,
|
||||
* Create counter if it does not exist
|
||||
* @param pmcData Profile to find backend counter in
|
||||
* @param conditionId backend counter id to update
|
||||
* @param questId quest id counter is associated with
|
||||
* @param counterValue value to increment the backend counter with
|
||||
*/
|
||||
protected updateProfileBackendCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void;
|
||||
}
|
||||
|
64
types/controllers/RagfairController.d.ts
vendored
64
types/controllers/RagfairController.d.ts
vendored
@ -9,8 +9,10 @@ import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
||||
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
||||
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
||||
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||
@ -22,22 +24,26 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
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 { RagfairServer } from "../servers/RagfairServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
/**
|
||||
* Handle RagfairCallback events
|
||||
*/
|
||||
export declare class RagfairController {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected ragfairServer: RagfairServer;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -52,21 +58,69 @@ export declare class RagfairController {
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected ragfairHelper: RagfairHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
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, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
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, 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
|
||||
* @param offer flea offer to update
|
||||
* @param profile full profile of player
|
||||
*/
|
||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
|
||||
/**
|
||||
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
||||
* @param offer Flea offer to adjust
|
||||
*/
|
||||
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
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;
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
removeOffer(offerId: string, 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 { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { RepairService } from "../services/RepairService";
|
||||
export declare class RepairController {
|
||||
protected logger: ILogger;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected questHelper: QuestHelper;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected paymentService: PaymentService;
|
||||
protected repairHelper: RepairHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected repairService: RepairService;
|
||||
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
|
||||
* @param pmcData player profile
|
||||
* @param body endpoint request data
|
||||
* @param sessionID session id
|
||||
* @param body endpoint request data
|
||||
* @param pmcData player profile
|
||||
* @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
|
||||
* @param pmcData player profile
|
||||
* @param body endpoint request data
|
||||
* @param sessionID session id
|
||||
* @param body endpoint request data
|
||||
* @param pmcData player profile
|
||||
* @returns item event router action
|
||||
*/
|
||||
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||
repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
||||
}
|
||||
|
48
types/controllers/RepeatableQuestController.d.ts
vendored
48
types/controllers/RepeatableQuestController.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
@ -7,16 +8,20 @@ import { Exit } from "../models/eft/common/ILocationBase";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPmcDataRepeatableQuest, IRepeatableQuest, IReward, IRewards } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||
import { ELocationName } from "../models/enums/ELocationName";
|
||||
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||
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 { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { ObjectId } from "../utils/ObjectId";
|
||||
@ -53,6 +58,7 @@ export declare class RepeatableQuestController {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected mathUtil: MathUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -60,13 +66,16 @@ export declare class RepeatableQuestController {
|
||||
protected presetHelper: PresetHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected localisationService: LocalisationService;
|
||||
protected paymentService: PaymentService;
|
||||
protected objectId: ObjectId;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected configServer: ConfigServer;
|
||||
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, configServer: ConfigServer);
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
/**
|
||||
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
||||
* Returns an array of objects in the format of repeatable quests to the client.
|
||||
@ -93,6 +102,13 @@ export declare class RepeatableQuestController {
|
||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||
*/
|
||||
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).
|
||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||
@ -101,17 +117,18 @@ export declare class RepeatableQuestController {
|
||||
/**
|
||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
||||
*/
|
||||
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
|
||||
generateDebugDailies(dailiesPool: any, factory: any, number: number): any;
|
||||
/**
|
||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
*
|
||||
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
||||
* @param {string} traderId trader from which the quest will be provided
|
||||
* @param {string} side scav daily or pmc daily/weekly quest
|
||||
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
||||
* (needs to be filled with reward and conditions by called to make a valid quest)
|
||||
*/
|
||||
generateRepeatableTemplate(type: string, traderId: string): IRepeatableQuest;
|
||||
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
|
||||
/**
|
||||
* Generates a valid Exploration quest
|
||||
*
|
||||
@ -141,6 +158,12 @@ export declare class RepeatableQuestController {
|
||||
* @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;
|
||||
/**
|
||||
* 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.
|
||||
* This method creates the according object which will be appended to the conditions array
|
||||
@ -216,5 +239,18 @@ export declare class RepeatableQuestController {
|
||||
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
||||
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @param repeatableQuestConfig config file
|
||||
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
||||
*/
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns boolean: true if item is valid reward
|
||||
*/
|
||||
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 { TradeHelper } from "../helpers/TradeHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { Upd } from "../models/eft/common/tables/IItem";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||
import { 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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
declare class TradeController {
|
||||
protected logger: ILogger;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected tradeHelper: TradeHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
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;
|
||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
16
types/controllers/TraderController.d.ts
vendored
16
types/controllers/TraderController.d.ts
vendored
@ -1,10 +1,13 @@
|
||||
import { FenceBaseAssortGenerator } from "../generators/FenceBaseAssortGenerator";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderAssortHelper } from "../helpers/TraderAssortHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { TraderAssortService } from "../services/TraderAssortService";
|
||||
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class TraderController {
|
||||
@ -15,8 +18,11 @@ export declare class TraderController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected traderAssortService: TraderAssortService;
|
||||
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||
protected fenceService: FenceService;
|
||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||
protected jsonUtil: JsonUtil;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, 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
|
||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||
@ -26,6 +32,7 @@ export declare class TraderController {
|
||||
/**
|
||||
* Runs when onUpdate is fired
|
||||
* If current time is > nextResupply(expire) time of trader, refresh traders assorts and
|
||||
* Fence is handled slightly differently
|
||||
* @returns has run
|
||||
*/
|
||||
update(): boolean;
|
||||
@ -35,6 +42,13 @@ export declare class TraderController {
|
||||
* @returns array if ITraderBase objects
|
||||
*/
|
||||
getAllTraders(sessionID: string): ITraderBase[];
|
||||
/**
|
||||
* Order traders by their traderId (Ttid)
|
||||
* @param traderA First trader to compare
|
||||
* @param traderB Second trader to compare
|
||||
* @returns 1,-1 or 0
|
||||
*/
|
||||
protected sortByTraderId(traderA: ITraderBase, traderB: ITraderBase): number;
|
||||
getTrader(sessionID: string, traderID: string): ITraderBase;
|
||||
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||
getPurchasesData(sessionID: string, traderID: string): Record<string, IBarterScheme[][]>;
|
||||
|
9
types/controllers/WeatherController.d.ts
vendored
9
types/controllers/WeatherController.d.ts
vendored
@ -1,11 +1,18 @@
|
||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class WeatherController {
|
||||
protected weatherGenerator: WeatherGenerator;
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected weatherConfig: IWeatherConfig;
|
||||
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
||||
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 { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||
export declare class WishlistController {
|
||||
protected itemEvenRouter: ItemEventRouter;
|
||||
constructor(itemEvenRouter: ItemEventRouter);
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(eventOutputHolder: EventOutputHolder);
|
||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
4
types/di/Container.d.ts
vendored
4
types/di/Container.d.ts
vendored
@ -1,5 +1,9 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
/**
|
||||
* Handle the registration of classes to be used by the Dependency Injection code
|
||||
*/
|
||||
export declare class Container {
|
||||
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
|
||||
static registerTypes(depContainer: DependencyContainer): void;
|
||||
static registerListTypes(depContainer: DependencyContainer): void;
|
||||
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 {
|
||||
onLoad(): void;
|
||||
export interface OnLoad {
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
7
types/di/OnLoadOnUpdate.d.ts
vendored
7
types/di/OnLoadOnUpdate.d.ts
vendored
@ -1,7 +0,0 @@
|
||||
import { OnLoad } from "./OnLoad";
|
||||
import { OnUpdate } from "./OnUpdate";
|
||||
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
}
|
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