Compare commits
No commits in common. "main" and "1.3.0" have entirely different histories.
4
.gitignore
vendored
4
.gitignore
vendored
@ -29,5 +29,5 @@ config.json.bk
|
|||||||
desktop.ini
|
desktop.ini
|
||||||
*.zip
|
*.zip
|
||||||
*.js
|
*.js
|
||||||
/Valens-AIO_*/**/*.*
|
/Valens-AIO/Valens-AIO_*/**/*.*
|
||||||
/Valens-AIO_*/*.*
|
/Valens-AIO/Valens-AIO_*/*.*
|
64
Valens-AIO/README.md
Normal file
64
Valens-AIO/README.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
This project was created to automate most parts of building and setting up an environment.
|
||||||
|
|
||||||
|
## **NodeJS 14.15.3:**
|
||||||
|
|
||||||
|
The first step would be to install nodejs on your pc, the version you NEED is **14.15.3**
|
||||||
|
|
||||||
|
That version is the one that has been used to test the mod templates and build scripts.
|
||||||
|
|
||||||
|
It can be downloaded from here: https://nodejs.org/download/release/v14.15.3/
|
||||||
|
|
||||||
|
A system reboot may be needed after install.
|
||||||
|
|
||||||
|
## **IDE:**
|
||||||
|
|
||||||
|
The second step is having an IDE ready. For the currect purpose we've setup a VSCodium workspace file.
|
||||||
|
|
||||||
|
You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium.
|
||||||
|
|
||||||
|
You can get VSCodium here: https://vscodium.com/#install
|
||||||
|
|
||||||
|
## **Workspace:**
|
||||||
|
|
||||||
|
Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Worspace from File...).
|
||||||
|
|
||||||
|
Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended.
|
||||||
|
|
||||||
|
## **Environment Setup:**
|
||||||
|
|
||||||
|
There is a task that will automatically setup your environment to use typescript.
|
||||||
|
|
||||||
|
To run it, you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: install
|
||||||
|
|
||||||
|
After running this task, your environment will be ready to start coding.
|
||||||
|
|
||||||
|
DO NOT remove the node_modules folder, this is an auto generated directory that has the required dependencies to be able to use typescript and more.
|
||||||
|
|
||||||
|
## **IMPORTANT:**
|
||||||
|
|
||||||
|
Before starting to work on your mod, we suggest you read about Dependency Injection and Inversion of Control as this is the adopted architecture SPT-AKI has adopted.
|
||||||
|
|
||||||
|
It will be difficult to understand some of the problems you may be having if you dont understand the basics of it.
|
||||||
|
|
||||||
|
A guide explaining all the essentials will be available on the hub on release for you to read about.
|
||||||
|
|
||||||
|
## **Coding:**
|
||||||
|
|
||||||
|
All your work should be centered around the mod.ts file as an entry point.
|
||||||
|
You can ONLY change the following properties from the package.json file: `"name"`, `"version"`, `"license"`: `"MIT"`, `"author"`, `"akiVersion"`.
|
||||||
|
|
||||||
|
If you have never used typescript before, you can read about it here: https://www.typescriptlang.org/docs/
|
||||||
|
|
||||||
|
## **Distributing your mod:**
|
||||||
|
|
||||||
|
The project has been set up with an automatic task that will copy and zip ALL required files for your mod to work on SPT-AKI.
|
||||||
|
To run this task you just need to go to:
|
||||||
|
|
||||||
|
> Terminal->Run Task...->Show All Tasks...->npm: build:zip
|
||||||
|
|
||||||
|
The output will be a mod.zip file that will appear on the root of the project.
|
||||||
|
|
||||||
|
Always verify that all files were included into the zip file.
|
BIN
Valens-AIO/V-AIO Progression ReadMe.pdf
Normal file
BIN
Valens-AIO/V-AIO Progression ReadMe.pdf
Normal file
Binary file not shown.
Binary file not shown.
484
Valens-AIO/config/config.json
Normal file
484
Valens-AIO/config/config.json
Normal file
@ -0,0 +1,484 @@
|
|||||||
|
{
|
||||||
|
"DebugMode": false,
|
||||||
|
|
||||||
|
"ammo":
|
||||||
|
{
|
||||||
|
"ammoStacks":
|
||||||
|
{
|
||||||
|
"grenadeCartridges": 1,
|
||||||
|
"marksmanCartridges": 40,
|
||||||
|
"pistolCartridges": 50,
|
||||||
|
"rifleCartridges": 60,
|
||||||
|
"shotgunCartridges": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"bots":
|
||||||
|
{
|
||||||
|
"bossChance":
|
||||||
|
{
|
||||||
|
"activated": false,
|
||||||
|
"chance": 100
|
||||||
|
},
|
||||||
|
|
||||||
|
"maxBotCap": 20,
|
||||||
|
|
||||||
|
"pmc":
|
||||||
|
{
|
||||||
|
"chanceSameSideIsHostile": 50,
|
||||||
|
"containersOnPMCs": true,
|
||||||
|
"isUsec": 50,
|
||||||
|
"lootNValue": 3,
|
||||||
|
"maxBackpackLootTotalRub": 150000,
|
||||||
|
"maxPocketLootTotalRub": 50000,
|
||||||
|
"maxVestLootTotalRub": 50000,
|
||||||
|
|
||||||
|
"convertIntoPmcChance":
|
||||||
|
{
|
||||||
|
"assault":
|
||||||
|
{
|
||||||
|
"min": 15,
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
"cursedAssault":
|
||||||
|
{
|
||||||
|
"min": 15,
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
"pmcBot":
|
||||||
|
{
|
||||||
|
"min": 15,
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
"exUsec":
|
||||||
|
{
|
||||||
|
"min": 5,
|
||||||
|
"max": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"difficultyWeights":
|
||||||
|
{
|
||||||
|
"difficulty": "asonline",
|
||||||
|
"useWeights": false,
|
||||||
|
"weights":
|
||||||
|
{
|
||||||
|
"easy": 20,
|
||||||
|
"normal": 58,
|
||||||
|
"hard": 15,
|
||||||
|
"impossible": 7
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"looseWeaponInBackpackChance": 15,
|
||||||
|
"looseWeaponInBackpackLoot":
|
||||||
|
{
|
||||||
|
"min": 1,
|
||||||
|
"max": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"scav":
|
||||||
|
{
|
||||||
|
"lootNValue": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"containers":
|
||||||
|
{
|
||||||
|
"commonContainers":
|
||||||
|
{
|
||||||
|
"enabled": false,
|
||||||
|
"AMMO_CASE":
|
||||||
|
{
|
||||||
|
"width": 2,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 7,
|
||||||
|
"cellsV": 7
|
||||||
|
},
|
||||||
|
|
||||||
|
"DOCUMENTS_CASE":
|
||||||
|
{
|
||||||
|
"width": 2,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 4,
|
||||||
|
"cellsV": 4
|
||||||
|
},
|
||||||
|
|
||||||
|
"DOGTAG_CASE":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 10,
|
||||||
|
"cellsV": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"GRENADE_CASE":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 8,
|
||||||
|
"cellsV": 8
|
||||||
|
},
|
||||||
|
|
||||||
|
"INJECTOR_CASE":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 3,
|
||||||
|
"cellsV": 3
|
||||||
|
},
|
||||||
|
|
||||||
|
"ITEM_CASE":
|
||||||
|
{
|
||||||
|
"width": 4,
|
||||||
|
"height": 4,
|
||||||
|
"cellsH": 8,
|
||||||
|
"cellsV": 8
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEY_TOOL":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 4,
|
||||||
|
"cellsV": 4
|
||||||
|
},
|
||||||
|
|
||||||
|
"KEYCARD_HOLDER":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 3,
|
||||||
|
"cellsV": 3
|
||||||
|
},
|
||||||
|
|
||||||
|
"SCAV_JUNKBOX":
|
||||||
|
{
|
||||||
|
"width": 4,
|
||||||
|
"height": 4,
|
||||||
|
"cellsH": 14,
|
||||||
|
"cellsV": 14
|
||||||
|
},
|
||||||
|
|
||||||
|
"MAGAZINE_CASE":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 7,
|
||||||
|
"cellsV": 7
|
||||||
|
},
|
||||||
|
|
||||||
|
"MEDICINE_CASE":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 7,
|
||||||
|
"cellsV": 7
|
||||||
|
},
|
||||||
|
|
||||||
|
"MONEY_CASE":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 7,
|
||||||
|
"cellsV": 7
|
||||||
|
},
|
||||||
|
|
||||||
|
"HOLODILNICK_THERMAL_BAG":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 8,
|
||||||
|
"cellsV": 8
|
||||||
|
},
|
||||||
|
|
||||||
|
"PISTOL_CASE":
|
||||||
|
{
|
||||||
|
"width": 2,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 4,
|
||||||
|
"cellsV": 3
|
||||||
|
},
|
||||||
|
|
||||||
|
"SICC_ORGANIZATIONAL_POUCH":
|
||||||
|
{
|
||||||
|
"width": 2,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 5,
|
||||||
|
"cellsV": 5
|
||||||
|
},
|
||||||
|
|
||||||
|
"SIMPLE_WALLET":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 2,
|
||||||
|
"cellsV": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"THICC_ITEM_CASE":
|
||||||
|
{
|
||||||
|
"width": 5,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 14,
|
||||||
|
"cellsV": 14
|
||||||
|
},
|
||||||
|
|
||||||
|
"THICC_WEAPON_CASE":
|
||||||
|
{
|
||||||
|
"width": 5,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 6,
|
||||||
|
"cellsV": 15
|
||||||
|
},
|
||||||
|
|
||||||
|
"WEAPON_CASE":
|
||||||
|
{
|
||||||
|
"width": 5,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 5,
|
||||||
|
"cellsV": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"WZ_WALLET":
|
||||||
|
{
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"cellsH": 2,
|
||||||
|
"cellsV": 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"securedContainers":
|
||||||
|
{
|
||||||
|
"enabled": false,
|
||||||
|
"ALPHA":
|
||||||
|
{
|
||||||
|
"width": 2,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 2,
|
||||||
|
"cellsV": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"BETA":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 3,
|
||||||
|
"cellsV": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"EPSILON":
|
||||||
|
{
|
||||||
|
"width": 4,
|
||||||
|
"height": 2,
|
||||||
|
"cellsH": 4,
|
||||||
|
"cellsV": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"GAMMA":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 3,
|
||||||
|
"cellsV": 3
|
||||||
|
},
|
||||||
|
|
||||||
|
"KAPPA":
|
||||||
|
{
|
||||||
|
"width": 3,
|
||||||
|
"height": 3,
|
||||||
|
"cellsH": 3,
|
||||||
|
"cellsV": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"flea":
|
||||||
|
{
|
||||||
|
"minUserLevel": 15,
|
||||||
|
|
||||||
|
"blacklist":
|
||||||
|
{
|
||||||
|
"enableBsgList": true,
|
||||||
|
"enableQuestList": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"condition":
|
||||||
|
{
|
||||||
|
"conditionChance": 0.2,
|
||||||
|
"min": 0.6,
|
||||||
|
"max": 1.0
|
||||||
|
},
|
||||||
|
|
||||||
|
"currencies":
|
||||||
|
{
|
||||||
|
"roubles": 78,
|
||||||
|
"dollars": 20,
|
||||||
|
"euros": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"offerItemCount":
|
||||||
|
{
|
||||||
|
"min": 8,
|
||||||
|
"max": 15
|
||||||
|
},
|
||||||
|
|
||||||
|
"reputation":
|
||||||
|
{
|
||||||
|
"gain": 0.0000002,
|
||||||
|
"loss": 0.0000002
|
||||||
|
},
|
||||||
|
|
||||||
|
"time":
|
||||||
|
{
|
||||||
|
"baseSellTime": 15,
|
||||||
|
"minSellTime": 5,
|
||||||
|
"maxSellTime": 15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"globals":
|
||||||
|
{
|
||||||
|
|
||||||
|
"damagePerMeter": 9,
|
||||||
|
"safeHeight": 3,
|
||||||
|
"maxLoyaltyTraders": false,
|
||||||
|
"timeBeforeDeployLocal": 10,
|
||||||
|
|
||||||
|
"matchEnd":
|
||||||
|
{
|
||||||
|
"survivedExpRequirement": 200,
|
||||||
|
"survivedSecondsRequirement": 420,
|
||||||
|
"survivedExpReward": 300,
|
||||||
|
"miaExpReward": 200,
|
||||||
|
"runnerExpReward": 200,
|
||||||
|
"leftMult": 0,
|
||||||
|
"miaMult": 1,
|
||||||
|
"survivedMult": 1.3,
|
||||||
|
"runnerMult": 0.5,
|
||||||
|
"killedMult": 1,
|
||||||
|
"headShotMult": 1.2,
|
||||||
|
"expOnDamageAllHealth": 50
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"hideout":
|
||||||
|
{
|
||||||
|
"airFilterUnitFlowRate": 0.0047222222222222,
|
||||||
|
"constructionTime": 1,
|
||||||
|
"generatorFuelFlowRate": 0.0013194444444444,
|
||||||
|
"gpuBoostRate": 0.041225,
|
||||||
|
"productionTime": 1,
|
||||||
|
"scavCaseTime": 1
|
||||||
|
},
|
||||||
|
|
||||||
|
"insurance":
|
||||||
|
{
|
||||||
|
"insuranceMultiplier":
|
||||||
|
{
|
||||||
|
"prapor": 0.16,
|
||||||
|
"therapist": 0.25
|
||||||
|
},
|
||||||
|
"returnChancePercent":
|
||||||
|
{
|
||||||
|
"prapor": 80,
|
||||||
|
"therapist": 85
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"items":
|
||||||
|
{
|
||||||
|
"standardStash":
|
||||||
|
{
|
||||||
|
"vertical": 28,
|
||||||
|
"horizontal": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"behindStash":
|
||||||
|
{
|
||||||
|
"vertical": 38,
|
||||||
|
"horizontal": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"escapeStash":
|
||||||
|
{
|
||||||
|
"vertical": 48,
|
||||||
|
"horizontal": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"eodStash":
|
||||||
|
{
|
||||||
|
"vertical": 68,
|
||||||
|
"horizontal": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"examinedByDefault": false,
|
||||||
|
"removeBackpackFilter": true,
|
||||||
|
"removeKeyUsageMax": false,
|
||||||
|
"roublesMaxStack": 500000,
|
||||||
|
"dollarsMaxStack": 50000,
|
||||||
|
"eurosMaxStack": 50000,
|
||||||
|
"weightModifier": 1
|
||||||
|
},
|
||||||
|
|
||||||
|
"locations":
|
||||||
|
{
|
||||||
|
"allExtractsAvailable": false,
|
||||||
|
"exfilTime": 8,
|
||||||
|
"extractionsExtended": false,
|
||||||
|
"noExtractRestrictions": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"loot":
|
||||||
|
{
|
||||||
|
"containersInMarkedRoom": true,
|
||||||
|
"looseLootMultiplier": 1,
|
||||||
|
"staticLootMultiplier": 1
|
||||||
|
},
|
||||||
|
|
||||||
|
"progression":
|
||||||
|
{
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"quests":
|
||||||
|
{
|
||||||
|
"onlyFoundInRaid": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"raid":
|
||||||
|
{
|
||||||
|
"carExtractBaseStandingGain": 0.25,
|
||||||
|
"chompiesBossFix": true,
|
||||||
|
"fixOpenZones": true,
|
||||||
|
"scavExtractGain": 0.01,
|
||||||
|
"timeLimit": 60,
|
||||||
|
"aiAmount": "asonline",
|
||||||
|
"aiDifficulty": "asonline",
|
||||||
|
"bossEnabled": true,
|
||||||
|
"scavWars": false,
|
||||||
|
"taggedAndCursed": false,
|
||||||
|
"enablePve": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"prewipeEvents":
|
||||||
|
{
|
||||||
|
"allBossesOnReserve": false,
|
||||||
|
"allTradersSellCheapItems": false,
|
||||||
|
"gluharOnLabs": false,
|
||||||
|
"killaOnFactory": false,
|
||||||
|
"makeObdolbosPowerful": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"weapons":
|
||||||
|
{
|
||||||
|
"jam": false,
|
||||||
|
"misfeed": false,
|
||||||
|
"misfire": false,
|
||||||
|
"overheat": false,
|
||||||
|
"slide": false
|
||||||
|
}
|
||||||
|
}
|
334
Valens-AIO/config/config.ts
Normal file
334
Valens-AIO/config/config.ts
Normal file
@ -0,0 +1,334 @@
|
|||||||
|
export interface Config
|
||||||
|
{
|
||||||
|
DebugMode: boolean
|
||||||
|
ammo: Ammo
|
||||||
|
bots: Bots
|
||||||
|
containers: Containers
|
||||||
|
flea: Flea
|
||||||
|
globals: Globals
|
||||||
|
hideout: Hideout
|
||||||
|
insurance: Insurance
|
||||||
|
items: Items
|
||||||
|
locations: Locations
|
||||||
|
loot: Loot
|
||||||
|
progression: Progression
|
||||||
|
raid: Raid
|
||||||
|
quests: Quests
|
||||||
|
prewipeEvents: PrewipeEvents
|
||||||
|
weapons: Weapons
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Ammo
|
||||||
|
{
|
||||||
|
ammoStacks: AmmoStacks
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AmmoStacks
|
||||||
|
{
|
||||||
|
grenadeCartridges: number
|
||||||
|
marksmanCartridges: number
|
||||||
|
pistolCartridges: number
|
||||||
|
rifleCartridges: number
|
||||||
|
shotgunCartridges: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Bots
|
||||||
|
{
|
||||||
|
bossChance: BossChance
|
||||||
|
maxBotCap: number
|
||||||
|
pmc: Pmc
|
||||||
|
scav: Scav
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface BossChance
|
||||||
|
{
|
||||||
|
activated: boolean
|
||||||
|
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: Weights
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Weights
|
||||||
|
{
|
||||||
|
easy: number
|
||||||
|
normal: number
|
||||||
|
hard: number
|
||||||
|
impossible: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConvertIntoPmcChance
|
||||||
|
{
|
||||||
|
assault: PmcChance
|
||||||
|
cursedAssault: PmcChance
|
||||||
|
pmcBot : PmcChance
|
||||||
|
exUsec : PmcChance
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PmcChance
|
||||||
|
{
|
||||||
|
min: number
|
||||||
|
max: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LooseWeapon
|
||||||
|
{
|
||||||
|
min: number
|
||||||
|
max: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Scav
|
||||||
|
{
|
||||||
|
lootNValue: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Containers
|
||||||
|
{
|
||||||
|
commonContainers: CommonContainers
|
||||||
|
securedContainers: SecuredContainers
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CommonContainers
|
||||||
|
{
|
||||||
|
enabled: boolean
|
||||||
|
ammoCase: Case
|
||||||
|
docsCase: Case
|
||||||
|
dogsCase: Case
|
||||||
|
grenadeCase: Case
|
||||||
|
injectorCase: Case
|
||||||
|
itemCase: Case
|
||||||
|
keyTool: Case
|
||||||
|
keycardHolder: Case
|
||||||
|
scavJunkbox: Case
|
||||||
|
magsCase: Case
|
||||||
|
medsCase: Case
|
||||||
|
moneyCase: Case
|
||||||
|
holodilnick: Case
|
||||||
|
pistolCase: Case
|
||||||
|
siccCase: Case
|
||||||
|
wallet: Case
|
||||||
|
thiccItemCase: Case
|
||||||
|
thiccWeaponCase: Case
|
||||||
|
weaponCase: Case
|
||||||
|
wzWallet: Case
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SecuredContainers
|
||||||
|
{
|
||||||
|
enabled: boolean
|
||||||
|
alpha: Case
|
||||||
|
beta: Case
|
||||||
|
epsilon: Case
|
||||||
|
gamma: Case
|
||||||
|
kappa: Case
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Case
|
||||||
|
{
|
||||||
|
width: number
|
||||||
|
height: number
|
||||||
|
cellsH: number
|
||||||
|
cellsV: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Flea
|
||||||
|
{
|
||||||
|
minUserLevel: number
|
||||||
|
blacklist: Blacklist
|
||||||
|
condition: Condition
|
||||||
|
currencies: Currencies
|
||||||
|
offerItemCount: OfferItemCount
|
||||||
|
reputation: Reputation
|
||||||
|
time: Time
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Blacklist
|
||||||
|
{
|
||||||
|
enableBsgList: boolean
|
||||||
|
enableQuestList: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Condition
|
||||||
|
{
|
||||||
|
conditionChance: number
|
||||||
|
min: number
|
||||||
|
max: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Currencies
|
||||||
|
{
|
||||||
|
roubles: number
|
||||||
|
dollars: number
|
||||||
|
euros: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OfferItemCount
|
||||||
|
{
|
||||||
|
min: number
|
||||||
|
max: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Reputation
|
||||||
|
{
|
||||||
|
gain: number
|
||||||
|
loss: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Time
|
||||||
|
{
|
||||||
|
baseSellTime: number
|
||||||
|
minSellTime: number
|
||||||
|
maxSellTime: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Globals
|
||||||
|
{
|
||||||
|
damagePerMeter: number
|
||||||
|
safeHeight: number
|
||||||
|
maxLoyaltyTraders: boolean
|
||||||
|
timeBeforeDeployLocal: number
|
||||||
|
matchEnd: MatchEnd
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MatchEnd
|
||||||
|
{
|
||||||
|
survivedExpRequirement: number
|
||||||
|
survivedSecondsRequirement: number
|
||||||
|
survivedExpReward: number
|
||||||
|
miaExpReward: number
|
||||||
|
runnerExpReward: number
|
||||||
|
leftMult: number
|
||||||
|
miaMult: number
|
||||||
|
survivedMult: number
|
||||||
|
runnerMult: number
|
||||||
|
killedMult: number
|
||||||
|
headShotMult: number
|
||||||
|
expOnDamageAllHealth: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Hideout
|
||||||
|
{
|
||||||
|
airFilterUnitFlowRate: number
|
||||||
|
constructionTime: number
|
||||||
|
generatorFuelFlowRate: number
|
||||||
|
gpuBoostRate: number
|
||||||
|
productionTime: number
|
||||||
|
scavCaseTime: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Insurance
|
||||||
|
{
|
||||||
|
insuranceMultiplier: InsuranceMultiplier
|
||||||
|
returnChancePercent: ReturnChancePercent
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface InsuranceMultiplier
|
||||||
|
{
|
||||||
|
prapor: number
|
||||||
|
therapist: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ReturnChancePercent
|
||||||
|
{
|
||||||
|
prapor: number
|
||||||
|
therapist: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Items
|
||||||
|
{
|
||||||
|
standardStash: Stash
|
||||||
|
behindStash: Stash
|
||||||
|
escapeStash: Stash
|
||||||
|
eodStash: Stash
|
||||||
|
examinedByDefault: boolean
|
||||||
|
removeBackpackFilter: boolean
|
||||||
|
removeKeyUsageMax: boolean
|
||||||
|
dollarsMaxStack: number
|
||||||
|
eurosMaxStack: number
|
||||||
|
roublesMaxStack: number
|
||||||
|
weightModifier: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Stash
|
||||||
|
{
|
||||||
|
vertical: number
|
||||||
|
horizontal: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Locations
|
||||||
|
{
|
||||||
|
allExtractsAvailable: boolean
|
||||||
|
exfilTime: number
|
||||||
|
extractionsExtended: boolean
|
||||||
|
noExtractRestrictions: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Loot
|
||||||
|
{
|
||||||
|
containersInMarkedRoom: boolean
|
||||||
|
looseLootMultiplier: number
|
||||||
|
staticLootMultiplier: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Progression
|
||||||
|
{
|
||||||
|
enabled: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Quests
|
||||||
|
{
|
||||||
|
onlyFoundInRaid: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Raid
|
||||||
|
{
|
||||||
|
carExtractBaseStandingGain: number
|
||||||
|
chompiesBossFix: boolean
|
||||||
|
fixOpenZones: boolean
|
||||||
|
scavExtractGain: number
|
||||||
|
timeLimit: number
|
||||||
|
aiAmount: string
|
||||||
|
aiDifficulty: string
|
||||||
|
bossEnabled: boolean
|
||||||
|
scavWars: boolean
|
||||||
|
taggedAndCursed: boolean
|
||||||
|
enablePve: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PrewipeEvents
|
||||||
|
{
|
||||||
|
allBossesOnReserve: boolean
|
||||||
|
allTradersSellCheapItems: boolean
|
||||||
|
gluharOnLabs: boolean
|
||||||
|
killaOnFactory: boolean
|
||||||
|
makeObdolbosPowerful: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Weapons
|
||||||
|
{
|
||||||
|
jam: boolean
|
||||||
|
misfeed: boolean
|
||||||
|
misfire: boolean
|
||||||
|
overheat: boolean
|
||||||
|
slide: boolean
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Valens-AIO",
|
"name": "Valens-AIO",
|
||||||
"version": "1.8.2",
|
"version": "1.3.0",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"license": "CC BY-NC-ND 4.0",
|
"license": "CC BY-NC-ND 4.0",
|
||||||
"author": "Valens",
|
"author": "Valens",
|
||||||
"akiVersion": ">=3.5.0",
|
"akiVersion": "3.2.*",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup:environment": "npm i",
|
"setup:environment": "npm i",
|
||||||
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
39
Valens-AIO/src/airdrop.ts
Normal file
39
Valens-AIO/src/airdrop.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*import { Config } from "../config/config";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
|
||||||
|
export class Airdrop
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.jsonc");
|
||||||
|
private logger: Logger;
|
||||||
|
private databaseServer: IDatabaseTables;
|
||||||
|
private airdropConfig: IAirdropConfig;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
this.airdropConfig = airdropConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateAirdrops();
|
||||||
|
{
|
||||||
|
if (this.modConfig.airdropChancePercent != 25)
|
||||||
|
{
|
||||||
|
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}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
68
Valens-AIO/src/ammo.ts
Normal file
68
Valens-AIO/src/ammo.ts
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Grenade, MarksmanCaliber, PistolCaliber, RifleCaliber, Shotguns } from "./ammotypes";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
|
export class Ammo
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json")
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateAmmo(): void
|
||||||
|
{
|
||||||
|
const items = this.tables.templates.items;
|
||||||
|
const mod = this.modConfig.ammo;
|
||||||
|
|
||||||
|
if (mod.ammoStacks.grenadeCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(Grenade))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.grenadeCartridges
|
||||||
|
this.logger.info(`Grenade Cartridges Max Stacks set to ${mod.ammoStacks.grenadeCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.marksmanCartridges != 40)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(MarksmanCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.marksmanCartridges
|
||||||
|
this.logger.info(`Marksman Cartridges Max Stacks set to ${mod.ammoStacks.marksmanCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.pistolCartridges != 50)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(PistolCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.pistolCartridges
|
||||||
|
this.logger.info(`Pistol Cartridges Max Stacks set to ${mod.ammoStacks.pistolCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.rifleCartridges != 60)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(RifleCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.rifleCartridges
|
||||||
|
this.logger.info(`Rifle Cartridges Max Stacks set to ${mod.ammoStacks.rifleCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.shotgunCartridges != 20)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(Shotguns))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.shotgunCartridges
|
||||||
|
this.logger.info(`Shotgun Cartridges Max Stacks set to ${mod.ammoStacks.shotgunCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
189
Valens-AIO/src/ammotypes.ts
Normal file
189
Valens-AIO/src/ammotypes.ts
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
export enum Grenade
|
||||||
|
{
|
||||||
|
M386_HE_GRENADE = "5ede475b549eed7c6d5c18fb",
|
||||||
|
M576_MP_APERS_GRENADE = "5ede475339ee016e8c534742",
|
||||||
|
M433_HEDP_GRENADE = "5f0c892565703e5c461894e9",
|
||||||
|
M406_HE_GRENADE = "5ede4739e0350d05467f73e8",
|
||||||
|
M381_HE_GRENADE = "5ede474b0c226a66f5402622",
|
||||||
|
M441_HE_GRENADE = "5ede47405b097655935d7d16"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum MarksmanCaliber
|
||||||
|
{
|
||||||
|
M62_TRACER = "5a608bf24f39f98ffc77720e",
|
||||||
|
M80 = "58dd3ad986f77403051cba8f",
|
||||||
|
M61 = "5a6086ea4f39f99cd479502f",
|
||||||
|
BCP_FMJ = "5e023e53d4353e3302577c4c",
|
||||||
|
ULTRA_NOSLER = "5e023e88277cce2b522ff2b1",
|
||||||
|
TCW_SP = "5e023e6e34d52a55c3304f71",
|
||||||
|
M993 = "5efb0c1bd79ff02a1f5e68d9",
|
||||||
|
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||||
|
UCW = "5fc382c1016cce60e8341b20",
|
||||||
|
AP = "5fc382a9d724d907e2077dab",
|
||||||
|
FMJ = "5fc275cf85fd526b824a571a",
|
||||||
|
SNB_GZH = "560d61e84bdc2da74d8b4571",
|
||||||
|
LPS_GZH = "5887431f2459777e1612938f",
|
||||||
|
PS_GZH = "59e77a2386f7742ee578960a",
|
||||||
|
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||||
|
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||||
|
BS_GZH = "5e023d48186a883be655e551"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum PistolCaliber
|
||||||
|
{
|
||||||
|
AP_SX = "5ba26835d4351e0035628ff5",
|
||||||
|
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||||
|
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||||
|
SUBSONIC_SX = "5ba26844d4351e00334c9475",
|
||||||
|
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||||
|
R37_F = "5cc86832d7f00c000d3a6e6c",
|
||||||
|
SS190 = "5cc80f38e4a949001152b560",
|
||||||
|
R37_X = "5cc86840d7f00c002412c56c",
|
||||||
|
L191 = "5cc80f53e4a949000e1ea4f8",
|
||||||
|
SS197SR = "5cc80f8fe4a949033b0224a2",
|
||||||
|
SB193 = "5cc80f67e4a949035e43bbba",
|
||||||
|
FMJ43 = "5735ff5c245977640e39ba7e",
|
||||||
|
LRN = "573601b42459776410737435",
|
||||||
|
P_GL = "5736026a245977644601dc61",
|
||||||
|
PST_GZH762 = "573603562459776430731618",
|
||||||
|
LRNPC = "573602322459776445391df1",
|
||||||
|
AKBS = "5735fdcd2459776445391d61",
|
||||||
|
PT_GZH = "573603c924597764442bd9cb",
|
||||||
|
PM_SP8_GZH = "5737218f245977612125ba51",
|
||||||
|
P_GZH18 = "573719762459775a626ccbc1",
|
||||||
|
PSTM_GZH = "57371aab2459775a77142f22",
|
||||||
|
RG028_GZH = "573720e02459776143012541",
|
||||||
|
BZHT_GZH = "573718ba2459775a75491131",
|
||||||
|
PM_PSV = "5737207f24597760ff7b25f2",
|
||||||
|
SP7_GZH = "57372140245977611f70ee91",
|
||||||
|
PBM_GZH = "573719df2459775a626ccbc2",
|
||||||
|
PSO_GZH18 = "57371f8d24597761006c6a81",
|
||||||
|
PST_GZH18 = "5737201124597760fc4431f1",
|
||||||
|
PS_GS_PPO = "57371f2b24597761224311f1",
|
||||||
|
PRS_GS = "57371eb62459776125652ac1",
|
||||||
|
PPT_GZH = "57371e4124597760ff7b25f1",
|
||||||
|
PPE_GZH = "57371b192459775a9f58a5e0",
|
||||||
|
PSO_GZH = "58864a4f2459770fcc257101",
|
||||||
|
PST_GZH19 = "56d59d3ad2720bdb418b4577",
|
||||||
|
GREEN_TRACER = "5c3df7d588a4501f290594e5",
|
||||||
|
RIP19 = "5c0d56a986f774449d5de529",
|
||||||
|
AP_63 = "5c925fa22e221601da359b7b",
|
||||||
|
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||||
|
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||||
|
QUAKEMAKER = "5efb0e16aeb21837e749c7ff",
|
||||||
|
P_GZH = "5a26abfac4a28232980eabff",
|
||||||
|
PS_GZH = "5a269f97c4a282000b151807",
|
||||||
|
PE_GZH = "5a26ac06c4a282000c5a90a8",
|
||||||
|
BT_GZH = "5a26ac0ec4a28200741e1e18",
|
||||||
|
FMJ = "62330b3ed4dc74626d570b95",
|
||||||
|
HOLLOW_POINT = "62330bfadc5883093563729b",
|
||||||
|
SOFT_POINT = "62330c40bdd19b369e1e53d1",
|
||||||
|
JACKET_HP = "62330c18744e5e31df12f516",
|
||||||
|
MATCH_FMJ = "5e81f423763d9f754677bf2e",
|
||||||
|
HYDRA_SHOK = "5efb0fc6aeb21837e749c801",
|
||||||
|
LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3",
|
||||||
|
AP = "5efb0cabfb3e451d70735af5",
|
||||||
|
RIP45 = "5ea2a8e200685063ec28c05a"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum RifleCaliber
|
||||||
|
{
|
||||||
|
PS_GS = "56dff3afd2720bba668b4567",
|
||||||
|
SP = "56dff421d2720b5f5a8b4567",
|
||||||
|
PPBS_GS_IGOLNIK = "5c0d5e4486f77478390952fe",
|
||||||
|
BS_7N40 = "61962b617c6c7b169525f168",
|
||||||
|
PRS_GS = "56dff338d2720bbd668b4569",
|
||||||
|
BT_GS = "56dff061d2720bb5668b4567",
|
||||||
|
US_GS = "56dff4ecd2720b5f5a8b4568",
|
||||||
|
BP_GS_545 = "56dfef82d2720bbd668b4567",
|
||||||
|
HP_545 = "56dff216d2720bbd668b4568",
|
||||||
|
BS_GS = "56dff026d2720bb8668b4567",
|
||||||
|
T_GS = "56dff4a2d2720bbd668b456a",
|
||||||
|
PP_GS = "56dff2ced2720bb4668b4567",
|
||||||
|
FMJ_545 = "56dff0bed2720bb0668b4567",
|
||||||
|
M856 = "59e68f6f86f7746c9f75e846",
|
||||||
|
MK255_MOD_0_RRLP = "59e6918f86f7746c9f75e849",
|
||||||
|
M995 = "59e690b686f7746c9f75e848",
|
||||||
|
M855A1 = "54527ac44bdc2d36668b4567",
|
||||||
|
M856A1 = "59e6906286f7746c9f75e847",
|
||||||
|
M855 = "54527a984bdc2d4e668b4567",
|
||||||
|
HP_556 = "59e6927d86f77411da468256",
|
||||||
|
FMJ_556 = "59e6920f86f77411d82aa167",
|
||||||
|
WARMAGEDDON = "5c0d5ae286f7741e46554302",
|
||||||
|
MK_318_MOD_0_SOST = "60194943740c5d77f6705eea",
|
||||||
|
SSA_AP = "601949593ae8f707c4608daa",
|
||||||
|
M62_TRACER = "619636be6db0f2477964e710",
|
||||||
|
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||||
|
AP = "5fd20ff893a8961fc660a954",
|
||||||
|
V_MAX = "6196364158ef8c428c287d9f",
|
||||||
|
WHISPER = "6196365d58ef8c428c287da1",
|
||||||
|
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||||
|
HP_762 = "59e4d3d286f774176a36250a",
|
||||||
|
US_GZH = "59e4d24686f7741776641ac7",
|
||||||
|
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||||
|
BP_GZH = "59e0d99486f7744a32234762",
|
||||||
|
MAI_AP = "601aa3d2b2bcb34913271e6d",
|
||||||
|
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||||
|
BP_GS = "5c0d688c86f77413ae3407b2",
|
||||||
|
SP6_GS = "57a0e5022459774d1673f889",
|
||||||
|
SPP_GS = "5c0d668f86f7747ccb7f13b2",
|
||||||
|
PAB9_GS = "61962d879bb3d20b0946d385",
|
||||||
|
FMJ_366 = "59e6542b86f77411dc52a77a",
|
||||||
|
GEKSA = "59e6658b86f77411d949b250",
|
||||||
|
EKO = "59e655cb86f77411dc52a77b",
|
||||||
|
APM = "5f0596629e22f464da6bbdd9",
|
||||||
|
PS12 = "5cadf6ddae9215051e1c23b2",
|
||||||
|
PS12B = "5cadf6eeae921500134b2799",
|
||||||
|
PS12A = "5cadf6e5ae921500113bb973"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Shotguns
|
||||||
|
{
|
||||||
|
BUCKSHOT_7MM = "560d5e524bdc2d25448b4571",
|
||||||
|
MAGNUM_85MM = "5d6e6806a4b936088465b17e",
|
||||||
|
RIP = "5c0d591486f7744c505b416f",
|
||||||
|
BMG_SLUG_50CAL = "5d6e68c4a4b9361b93413f79",
|
||||||
|
BUCKSHOT_525MM = "5d6e6772a4b936088465b17c",
|
||||||
|
EXPRESS_65MM = "5d6e67fba4b9361bc73bc779",
|
||||||
|
FLECHETTE = "5d6e6911a4b9361bd5780d52",
|
||||||
|
FTX_CUSTOM_LITE_SLUG = "5d6e68e6a4b9361c140bcfe0",
|
||||||
|
AP20_ARMOR_PIERCING_SLUG = "5d6e68a8a4b9360b6c0d54e2",
|
||||||
|
DUAL_SABOT_SLUG = "5d6e68dea4b9361bcc29e659",
|
||||||
|
POLEVA_6U_SLUG_12GA = "5d6e689ca4b9361bc8618956",
|
||||||
|
POLEVA_3_SLUG_12GA = "5d6e6891a4b9361bd473feea",
|
||||||
|
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||||
|
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||||
|
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||||
|
LEAD_SLUG = "58820d1224597753c90aeb13",
|
||||||
|
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||||
|
STAR_SLUG = "5d6e6a05a4b93618084f58d0",
|
||||||
|
BUCKSHOT_73MM = "5d6e69c7a4b9360b6c0d54e4",
|
||||||
|
DEVASTATOR_SLUG = "5d6e6a5fa4b93614ec501745",
|
||||||
|
BUCKSHOT_56MM = "5d6e695fa4b936359b35d852",
|
||||||
|
POLEVA_6U_SLUG_20GA = "5d6e6a42a4b9364f07165f52",
|
||||||
|
POLEVA_3_SLUG_20GA = "5d6e6a53a4b9361bd473feec",
|
||||||
|
BUCKSHOT_62MM = "5d6e69b9a4b9361bc8618958",
|
||||||
|
SHRAPNEL10_BUCKSHOT = "5e85a9a6eacf8c039e4e2ac1",
|
||||||
|
SHRAPNEL25_BUCKSHOT = "5f647f31b6238e5dd066e196",
|
||||||
|
ZVEZDA_FLASHBANG = "5e85a9f4add9fe03027d9bf1",
|
||||||
|
BARRIKADA_SLUG = "5e85aa1a988a8701445df1f5"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo30x29
|
||||||
|
{
|
||||||
|
VOG_30 = "5d70e500a4b9364de70d38ce"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo127x108
|
||||||
|
{
|
||||||
|
B32 = "5cde8864d7f00c0010373be1",
|
||||||
|
BZT_44M = "5d2f2ab648f03550091993ca"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo26x75
|
||||||
|
{
|
||||||
|
GREEN_FLARE = "62389aaba63f32501b1b444f",
|
||||||
|
RED_FLARE = "62389ba9a63f32501b1b4451",
|
||||||
|
WHITE_FLARE = "62389bc9423ed1685422dc57",
|
||||||
|
YELLOW_FLARE = "62389be94d5d474bf712e709"
|
||||||
|
}
|
@ -1,32 +1,138 @@
|
|||||||
import { PrewipeConfig } from "../config/ts/prewipe";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { Money } from "@spt-aki/models/enums/Money"
|
|
||||||
import type { BossLocationSpawn } from "@spt-aki/models/eft/common/ILocationBase";
|
|
||||||
import { Logger } from "./logger";
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import type { BossLocationSpawn } from "@spt-aki/models/eft/common/ILocationBase";
|
||||||
|
import { Money } from "@spt-aki/models/enums/Money"
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITrader } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITrader } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
|
|
||||||
export class Prewipe
|
export class Bots
|
||||||
{
|
{
|
||||||
private modConfig: PrewipeConfig = require("../config/prewipe.json");
|
private modConfig: Config = require("../config/config.json");
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
|
private botConfig: IBotConfig;
|
||||||
private tables: DatabaseServer;
|
private tables: DatabaseServer;
|
||||||
private traders: Record<string, ITrader>;
|
private traders: Record<string, ITrader>;
|
||||||
|
private weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
|
||||||
constructor(logger: Logger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer, botConfig: IBotConfig, weightedRandomHelper: WeightedRandomHelper)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer;
|
this.botConfig = botConfig;
|
||||||
this.traders = this.tables.getTables().traders;
|
this.tables = databaseServer.getTables();
|
||||||
|
this.traders = this.tables.traders;
|
||||||
|
this.weightedRandomHelper = weightedRandomHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updatePrewipe(): void
|
public updateBots(): void
|
||||||
{
|
{
|
||||||
// modConfig variables
|
// modConfig variables
|
||||||
const preWipe = this.modConfig;
|
const mod = this.modConfig.bots;
|
||||||
|
const modPMC = this.modConfig.bots.pmc;
|
||||||
|
const modScav = this.modConfig.bots.scav;
|
||||||
|
const preWipe = this.modConfig.prewipeEvents;
|
||||||
|
|
||||||
|
// Server side variables
|
||||||
|
const pmc = this.botConfig.pmc;
|
||||||
|
const lootNValue = this.botConfig.lootNValue;
|
||||||
|
|
||||||
// Start modifications
|
// 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")
|
||||||
|
{
|
||||||
|
// 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}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Enables common and secure containers to spawn on PMCs by whitelisting the parent IDs. Rarity adjusted via PMC lootNValue. Default true.
|
||||||
|
if (modPMC.containersOnPMCs)
|
||||||
|
{
|
||||||
|
this.containersOnPMCs();
|
||||||
|
this.logger.info(`Containers On PMCs: ${modPMC.containersOnPMCs}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Chance that PMC bot will be USEC or BEAR. Default is 50%
|
||||||
|
if (modPMC.isUsec != 50)
|
||||||
|
{
|
||||||
|
pmc.isUsec = modPMC.isUsec;
|
||||||
|
this.logger.info(`PMC isUsec Chance is: ${modPMC.isUsec}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
{
|
||||||
|
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}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||||
|
if (modPMC.chanceSameSideIsHostile != 50)
|
||||||
|
{
|
||||||
|
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostile;
|
||||||
|
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Modifies the lootNValue of PMC or Scav if configured outside of the defaults.
|
||||||
|
if (modPMC.lootNValue != 3 || modScav.lootNValue != 4)
|
||||||
|
{
|
||||||
|
lootNValue.scav = modScav.lootNValue;
|
||||||
|
lootNValue.pmc = modPMC.lootNValue;
|
||||||
|
this.logger.info(`lootNValue for bots has been changed! \n Scav lootNValue set to ${modScav.lootNValue} \n PMC lootNValue set to ${modPMC.lootNValue}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
{
|
||||||
|
this.adjustPmcChance();
|
||||||
|
this.logger.info("Chance to Convert Bots into PMC Patched");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Makes *all* bosses spawn chance configurable.
|
||||||
|
if (mod.bossChance.activated)
|
||||||
|
{
|
||||||
|
this.configureBossChance();
|
||||||
|
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Prewipe Events
|
// Prewipe Events
|
||||||
|
|
||||||
|
|
||||||
// Spawn Killa On Factory
|
// Spawn Killa On Factory
|
||||||
if (preWipe.killaOnFactory)
|
if (preWipe.killaOnFactory)
|
||||||
{
|
{
|
||||||
@ -64,10 +170,34 @@ export class Prewipe
|
|||||||
this.makeObdolbosPowerful();
|
this.makeObdolbosPowerful();
|
||||||
this.logger.info("Make Obdolbos Powerful Prewipe Event Enabled");
|
this.logger.info("Make Obdolbos Powerful Prewipe Event Enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (modPMC.looseWeaponInBackpackChance != 15 || modPMC.looseWeaponInBackpackLoot.max != 1 || modPMC.looseWeaponInBackpackLoot.min != 1)
|
||||||
|
{
|
||||||
|
this.changeLooseWeapon();
|
||||||
|
this.logger.info("Loose Weapon In PMC Backpack Values Patched");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Functions start here.
|
||||||
|
|
||||||
|
// Function to enable secured and common containers on PMCs.
|
||||||
|
private containersOnPMCs(): void
|
||||||
|
{
|
||||||
|
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
||||||
|
|
||||||
|
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||||
|
dynaLoot.push("5795f317245977243854e041");
|
||||||
|
}
|
||||||
|
|
||||||
|
private chooseRandomWeightedDifficulty(): string
|
||||||
|
{
|
||||||
|
const chosenDifficulty = this.weightedRandomHelper.getWeightedInventoryItem(this.modConfig.bots.pmc.difficultyWeights.weights);
|
||||||
|
this.botConfig.pmc.difficulty = chosenDifficulty;
|
||||||
|
|
||||||
|
return chosenDifficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Functions start here.
|
|
||||||
public createBossWave(role: string, chance: number, followers: string, escortAmount: number, zones: string): any
|
public createBossWave(role: string, chance: number, followers: string, escortAmount: number, zones: string): any
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
@ -83,18 +213,66 @@ export class Prewipe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private adjustPmcChance(): void
|
||||||
|
{
|
||||||
|
const pmcConfig = this.botConfig.pmc.convertIntoPmcChance;
|
||||||
|
const modConfig = this.modConfig.bots.pmc.convertIntoPmcChance;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private changeMaxLootvalue(): void
|
||||||
|
{
|
||||||
|
const lootConfig = this.botConfig.pmc;
|
||||||
|
const modConfig = this.modConfig.bots.pmc;
|
||||||
|
|
||||||
|
lootConfig.maxBackpackLootTotalRub = modConfig.maxBackpackLootTotalRub;
|
||||||
|
lootConfig.maxPocketLootTotalRub = modConfig.maxPocketLootTotalRub;
|
||||||
|
lootConfig.maxVestLootTotalRub = modConfig.maxVestLootTotalRub;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private configureBossChance(): void
|
||||||
|
{
|
||||||
|
const locations = this.tables.locations;
|
||||||
|
|
||||||
|
for (const i in locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
if (locations[i].base.BossLocationSpawn !== [])
|
||||||
|
{
|
||||||
|
for (const x in locations[i].base.BossLocationSpawn)
|
||||||
|
{
|
||||||
|
locations[i].base.BossLocationSpawn[x].BossChance = this.modConfig.bots.bossChance.chance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private spawnKillaOnFactory(): void
|
private spawnKillaOnFactory(): void
|
||||||
{
|
{
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
const killaWave = this.createBossWave("bossKilla", 100, "followerBully", 0, locations.factory4_day.base.OpenZones);
|
const killaWave = this.createBossWave("bossKilla", 100, "followerBully", 0, locations.factory4_day.base.OpenZones);
|
||||||
locations.factory4_day.base.BossLocationSpawn.push(killaWave);
|
this.tables.locations.factory4_day.base.BossLocationSpawn.push(killaWave);
|
||||||
locations.factory4_night.base.BossLocationSpawn.push(killaWave);
|
locations.factory4_night.base.BossLocationSpawn.push(killaWave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private spawnAllBossesOnReserve(): void
|
private spawnAllBossesOnReserve(): void
|
||||||
{
|
{
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
let bossWave = this.createBossWave("bossKilla", 100, "followerBully", 0, locations.rezervbase.base.OpenZones);
|
let bossWave = this.createBossWave("bossKilla", 100, "followerBully", 0, locations.rezervbase.base.OpenZones);
|
||||||
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
||||||
bossWave = this.createBossWave("bossBully", 100, "followerBully", 4, locations.rezervbase.base.OpenZones);
|
bossWave = this.createBossWave("bossBully", 100, "followerBully", 4, locations.rezervbase.base.OpenZones);
|
||||||
@ -108,7 +286,7 @@ export class Prewipe
|
|||||||
|
|
||||||
private spawnGluharOnLabs(): void
|
private spawnGluharOnLabs(): void
|
||||||
{
|
{
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
const glugluWave: BossLocationSpawn =
|
const glugluWave: BossLocationSpawn =
|
||||||
{
|
{
|
||||||
"BossName": "bossGluhar",
|
"BossName": "bossGluhar",
|
||||||
@ -158,7 +336,7 @@ export class Prewipe
|
|||||||
|
|
||||||
for (const trader in this.traders)
|
for (const trader in this.traders)
|
||||||
{
|
{
|
||||||
for (const assort in this.traders[trader]?.assort?.barter_scheme)
|
for (const assort in this.traders[trader].assort.barter_scheme)
|
||||||
{
|
{
|
||||||
const itemScheme = this.traders[trader].assort.barter_scheme[assort];
|
const itemScheme = this.traders[trader].assort.barter_scheme[assort];
|
||||||
switch (itemScheme[0][0]._tpl)
|
switch (itemScheme[0][0]._tpl)
|
||||||
@ -311,6 +489,19 @@ export class Prewipe
|
|||||||
"AbsoluteValue": false,
|
"AbsoluteValue": false,
|
||||||
"SkillName": ""
|
"SkillName": ""
|
||||||
}]
|
}]
|
||||||
this.tables.getTables().globals.config.Health.Effects.Stimulator.Buffs.Buffs_Obdolbos = obdolbosBuff;
|
|
||||||
|
this.tables.globals.config.Health.Effects.Stimulator.Buffs.Buffs_Obdolbos = obdolbosBuff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private changeLooseWeapon():void
|
||||||
|
{
|
||||||
|
const pmcConfig = this.botConfig.pmc;
|
||||||
|
const modConfig = this.modConfig.bots.pmc;
|
||||||
|
|
||||||
|
pmcConfig.looseWeaponInBackpackChancePercent = modConfig.looseWeaponInBackpackChance;
|
||||||
|
pmcConfig.looseWeaponInBackpackLootMinMax.min = modConfig.looseWeaponInBackpackLoot.min;
|
||||||
|
pmcConfig.looseWeaponInBackpackLootMinMax.max = modConfig.looseWeaponInBackpackLoot.max;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,23 +1,23 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
import { ContainersConfig } from "../config/ts/containers";
|
import { Config } from "../config/config";
|
||||||
import { CommonContainers, SecuredContainers } from "@spt-aki/models/enums/ContainerTypes";
|
import { CommonContainers, SecuredContainers } from "./containertypes";
|
||||||
|
|
||||||
export class Containers
|
export class Containers
|
||||||
{
|
{
|
||||||
private modConfig: ContainersConfig = require("../config/containers.json");
|
private modConfig: Config = require("../config/config.json");
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private tables: DatabaseServer;
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
constructor(logger: Logger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer;
|
this.tables = databaseServer.getTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateContainers(): void
|
public updateContainers(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig.containers;
|
||||||
|
|
||||||
if (mod.commonContainers.enabled)
|
if (mod.commonContainers.enabled)
|
||||||
{
|
{
|
||||||
@ -34,8 +34,8 @@ export class Containers
|
|||||||
|
|
||||||
private updatingCommonContainers()
|
private updatingCommonContainers()
|
||||||
{
|
{
|
||||||
const items = this.tables.getTables().templates.items;
|
const items = this.tables.templates.items;
|
||||||
const mod = this.modConfig.commonContainers;
|
const mod = this.modConfig.containers.commonContainers;
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(CommonContainers))
|
for (const [key, value] of Object.entries(CommonContainers))
|
||||||
{
|
{
|
||||||
@ -48,8 +48,8 @@ export class Containers
|
|||||||
|
|
||||||
private updatingSecuredContainers()
|
private updatingSecuredContainers()
|
||||||
{
|
{
|
||||||
const items = this.tables.getTables().templates.items;
|
const items = this.tables.templates.items;
|
||||||
const mod = this.modConfig.securedContainers;
|
const mod = this.modConfig.containers.securedContainers;
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(SecuredContainers))
|
for (const [key, value] of Object.entries(SecuredContainers))
|
||||||
{
|
{
|
32
Valens-AIO/src/containertypes.ts
Normal file
32
Valens-AIO/src/containertypes.ts
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
export enum CommonContainers
|
||||||
|
{
|
||||||
|
AMMO_CASE = "5aafbde786f774389d0cbc0f",
|
||||||
|
DOCUMENTS_CASE = "590c60fc86f77412b13fddcf",
|
||||||
|
DOGTAG_CASE = "5c093e3486f77430cb02e593",
|
||||||
|
GRENADE_CASE = "5e2af55f86f7746d4159f07c",
|
||||||
|
INJECTOR_CASE = "619cbf7d23893217ec30b689",
|
||||||
|
ITEM_CASE = "59fb042886f7746c5005a7b2",
|
||||||
|
KEY_TOOL = "59fafd4b86f7745ca07e1232",
|
||||||
|
KEYCARD_HOLDER = "619cbf9e0a7c3a1a2731940a",
|
||||||
|
SCAV_JUNKBOX = "5b7c710788a4506dec015957",
|
||||||
|
MAGAZINE_CASE = "5c127c4486f7745625356c13",
|
||||||
|
MEDICINE_CASE = "5aafbcd986f7745e590fff23",
|
||||||
|
MONEY_CASE = "59fb016586f7746d0d4b423a",
|
||||||
|
HOLODILNICK_THERMAL_BAG = "5c093db286f7740a1b2617e3",
|
||||||
|
PISTOL_CASE = "567143bf4bdc2d1a0f8b4567",
|
||||||
|
SICC_ORGANIZATIONAL_POUCH = "5d235bb686f77443f4331278",
|
||||||
|
SIMPLE_WALLET = "5783c43d2459774bbe137486",
|
||||||
|
THICC_ITEM_CASE = "5c0a840b86f7742ffa4f2482",
|
||||||
|
THICC_WEAPON_CASE = "5b6d9ce188a4501afc1b2b25",
|
||||||
|
WEAPON_CASE = "59fb023c86f7746d0d4b423c",
|
||||||
|
WZ_WALLET = "60b0f6c058e0b0481a09ad11"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum SecuredContainers
|
||||||
|
{
|
||||||
|
ALPHA = "544a11ac4bdc2d470e8b456a",
|
||||||
|
BETA = "5857a8b324597729ab0a0e7d",
|
||||||
|
EPSILON = "59db794186f77448bc595262",
|
||||||
|
GAMMA = "5857a8bc2459772bad15db29",
|
||||||
|
KAPPA = "5c093ca986f7740a1867ab12"
|
||||||
|
}
|
82
Valens-AIO/src/flea.ts
Normal file
82
Valens-AIO/src/flea.ts
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
|
export class Flea
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private ragfairConfig: IRagfairConfig;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
|
|
||||||
|
constructor (logger: Logger, ragfairConfig: IRagfairConfig, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.ragfairConfig = ragfairConfig;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public updateFlea(): void
|
||||||
|
{
|
||||||
|
const mod = this.modConfig.flea;
|
||||||
|
const global = this.tables.globals.config.RagFair;
|
||||||
|
const ragfair = this.ragfairConfig.dynamic;
|
||||||
|
|
||||||
|
if (mod.minUserLevel != 15)
|
||||||
|
{
|
||||||
|
global.minUserLevel = mod.minUserLevel;
|
||||||
|
this.logger.info(`Fleamarket unlocked at level ${mod.minUserLevel}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!mod.blacklist.enableBsgList || !mod.blacklist.enableQuestList)
|
||||||
|
{
|
||||||
|
ragfair.blacklist.enableBsgList = mod.blacklist.enableBsgList;
|
||||||
|
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
||||||
|
this.logger.info("Fleamarket Blacklists patched");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.condition.conditionChance != 0.2 || mod.condition.min != 0.6 || mod.condition.max != 1)
|
||||||
|
{
|
||||||
|
ragfair.condition.conditionChance = mod.conditionChance;
|
||||||
|
ragfair.condition.min = mod.min;
|
||||||
|
ragfair.condition.max = mod.max;
|
||||||
|
this.logger.info("Fleamarket Condition patched");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.currencies.roubles != 78 || mod.currencies.dollars != 20 || mod.currencies.euros != 2)
|
||||||
|
{
|
||||||
|
ragfair.currencies["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||||
|
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||||
|
ragfair.currencies["569668774bdc2da2298b4568"] = mod.currencies.euros;
|
||||||
|
this.logger.info("Fleamarket Currencies patched")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.offerItemCount.min != 8 || mod.offerItemCount.max != 15)
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
const sell = this.ragfairConfig.sell;
|
||||||
|
sell.time.base = mod.time.baseSellTime;
|
||||||
|
sell.time.min = mod.time.minSellTime;
|
||||||
|
sell.time.max = mod.time.maxSellTime;
|
||||||
|
this.logger.info("Fleamarket Sell Times patched");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,23 +1,23 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { GlobalsConfig } from "../config/ts/globals";
|
import { Config } from "../config/config";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Globals
|
export class Globals
|
||||||
{
|
{
|
||||||
private modConfig: GlobalsConfig = require("../config/globals.json");
|
private modConfig: Config = require("../config/config.json");
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private tables: DatabaseServer;
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
constructor(logger: Logger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer;
|
this.tables = databaseServer.getTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateGlobals(): void
|
public updateGlobals(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig.globals;
|
||||||
const global = this.tables.getTables().globals;
|
const global = this.tables.globals;
|
||||||
|
|
||||||
if (mod.damagePerMeter != 9 || mod.safeHeight != 3)
|
if (mod.damagePerMeter != 9 || mod.safeHeight != 3)
|
||||||
{
|
{
|
||||||
@ -50,8 +50,8 @@ export class Globals
|
|||||||
|
|
||||||
private matchEndSettings(): void
|
private matchEndSettings(): void
|
||||||
{
|
{
|
||||||
const global1 = this.tables.getTables().globals.config.exp.match_end;
|
const global1 = this.tables.globals.config.exp.match_end;
|
||||||
const mod = this.modConfig.matchEnd;
|
const mod = this.modConfig.globals.matchEnd;
|
||||||
|
|
||||||
global1.survived_exp_requirement = mod.survivedExpRequirement;
|
global1.survived_exp_requirement = mod.survivedExpRequirement;
|
||||||
global1.survived_seconds_requirement = mod.survivedSecondsRequirement;
|
global1.survived_seconds_requirement = mod.survivedSecondsRequirement;
|
||||||
@ -63,8 +63,8 @@ export class Globals
|
|||||||
global1.survivedMult = mod.survivedMult;
|
global1.survivedMult = mod.survivedMult;
|
||||||
global1.runnerMult = mod.runnerMult;
|
global1.runnerMult = mod.runnerMult;
|
||||||
global1.killedMult = mod.killedMult;
|
global1.killedMult = mod.killedMult;
|
||||||
this.tables.getTables().globals.config.exp.kill.headShotMult = mod.headShotMult;
|
this.tables.globals.config.exp.kill.headShotMult = mod.headShotMult;
|
||||||
this.tables.getTables().globals.config.exp.kill.expOnDamageAllHealth = mod.expOnDamageAllHealth;
|
this.tables.globals.config.exp.kill.expOnDamageAllHealth = mod.expOnDamageAllHealth;
|
||||||
this.logger.info("Match End Settings Patched");
|
this.logger.info("Match End Settings Patched");
|
||||||
}
|
}
|
||||||
}
|
}
|
81
Valens-AIO/src/hideout.ts
Normal file
81
Valens-AIO/src/hideout.ts
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
|
export class Hideout
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json")
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateHideout(): void
|
||||||
|
{
|
||||||
|
const mod = this.modConfig.hideout;
|
||||||
|
|
||||||
|
if (mod.constructionTime != 1)
|
||||||
|
{
|
||||||
|
this.updateConstructionTime();
|
||||||
|
this.logger.info(`Construction Time Patched to ${mod.constructionTime} `);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.productionTime != 1)
|
||||||
|
{
|
||||||
|
this.updateProductionTime();
|
||||||
|
this.logger.info(`Production Time Patched to ${mod.productionTime} `);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.scavCaseTime != 1)
|
||||||
|
{
|
||||||
|
this.updateScavCase();
|
||||||
|
this.logger.info(`Scav Case TIme Patched to ${mod.scavCaseTime}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.airFilterUnitFlowRate != 0.0047222222222222
|
||||||
|
||mod.generatorFuelFlowRate != 0.0013194444444444
|
||||||
|
||mod.gpuBoostRate != 0.041225)
|
||||||
|
{
|
||||||
|
const settings = this.tables.hideout.settings;
|
||||||
|
settings.airFilterUnitFlowRate = mod.airFilterUnitFlowRate;
|
||||||
|
settings.generatorFuelFlowRate = mod.generatorFuelFlowRate;
|
||||||
|
settings.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.hideout.areas)
|
||||||
|
{
|
||||||
|
for (const stage in area.stages)
|
||||||
|
{
|
||||||
|
const stageData = area.stages[stage];
|
||||||
|
stageData.constructionTime *= this.modConfig.hideout.constructionTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateProductionTime()
|
||||||
|
{
|
||||||
|
for (const production of this.tables.hideout.production)
|
||||||
|
{
|
||||||
|
production.productionTime *= this.modConfig.hideout.productionTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateScavCase()
|
||||||
|
{
|
||||||
|
for (const scavCase of this.tables.hideout.scavcase)
|
||||||
|
{
|
||||||
|
scavCase.ProductionTime *= this.modConfig.hideout.scavCaseTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
Valens-AIO/src/insurance.ts
Normal file
37
Valens-AIO/src/insurance.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
|
export class Insurance
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private insuranceConfig: IInsuranceConfig;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(logger:Logger, insuranceConfig: IInsuranceConfig)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.insuranceConfig = insuranceConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateInsurance(): void
|
||||||
|
{
|
||||||
|
const mod = this.modConfig.insurance;
|
||||||
|
|
||||||
|
if (mod.insuranceMultiplier.prapor != 0.16 || mod.insuranceMultiplier.therapist != 0.25)
|
||||||
|
{
|
||||||
|
this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] = mod.insuranceMultiplier.prapor;
|
||||||
|
this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] = mod.insuranceMultiplier.therapist;
|
||||||
|
this.logger.info(`Prapor Insurance Price Multiplier Set to ${mod.insuranceMultiplier.prapor}`);
|
||||||
|
} this.logger.info(`Therapist Insurance Price Multiplier Set to ${mod.insuranceMultiplier.therapist}`);
|
||||||
|
|
||||||
|
if (mod.returnChancePercent.prapor != 80 || mod.returnChancePercent.therapist != 85)
|
||||||
|
{
|
||||||
|
this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] = mod.returnChancePercent.prapor;
|
||||||
|
this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] = mod.returnChancePercent.therapist;
|
||||||
|
this.logger.info(`Prapor Insurance Return Chance Set to ${mod.returnChancePercent.prapor}`);
|
||||||
|
this.logger.info(`Therapist Insurance Return Chance set to ${mod.returnChancePercent.therapist}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
157
Valens-AIO/src/items.ts
Normal file
157
Valens-AIO/src/items.ts
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
|
export class Items
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json")
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
private mod: any;
|
||||||
|
private items: any;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateItems(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
this.items = this.tables.templates.items;
|
||||||
|
this.mod = this.modConfig.items;
|
||||||
|
|
||||||
|
if (this.mod.removeKeyUsageMax)
|
||||||
|
{
|
||||||
|
this.removeKeyUsageMax();
|
||||||
|
this.logger.info("Key Usage Limit Removed");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Weight Modifier. Multiplier of Weight *= modConfig.weightModifier
|
||||||
|
if (this.mod.weightModifier != 1)
|
||||||
|
{
|
||||||
|
this.updateWeight();
|
||||||
|
this.logger.info(`Weight Multipler patched to ${this.mod.weightModifier}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Removes the ExcludedFilter on Backpacks
|
||||||
|
// which in turn enables common containers to spawn in the loot pool of AI.
|
||||||
|
if (this.mod.removeBackpackFilter)
|
||||||
|
{
|
||||||
|
this.updateBackpacks();
|
||||||
|
this.logger.info(`Backpack Restrictions Removed: ${this.mod.removeBackpackFilter}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Standard Stash Size Changes
|
||||||
|
if (this.mod.standardStash.vertical != 28 || this.mod.standardStash.horizontal != 10)
|
||||||
|
{
|
||||||
|
this.items["566abbc34bdc2d92178b4576"]._props.Grids[0]._props.cellsV = this.mod.standardStash.vertical;
|
||||||
|
this.items["566abbc34bdc2d92178b4576"]._props.Grids[0]._props.cellsH = this.mod.standardStash.horizontal;
|
||||||
|
this.logger.info(`Standard Stash Vertical changed to ${this.mod.standardStash.vertical}`);
|
||||||
|
this.logger.info(`Standard Stash Horizontal changed to ${this.mod.standardStash.horizontal}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Left Behind Stash Size Changes
|
||||||
|
if (this.mod.behindStash.vertical != 38 || this.mod.behindStash.horizontal != 10)
|
||||||
|
{
|
||||||
|
this.items["5811ce572459770cba1a34ea"]._props.Grids[0]._props.cellsV = this.mod.behindStash.vertical;
|
||||||
|
this.items["5811ce572459770cba1a34ea"]._props.Grids[0]._props.cellsH = this.mod.behindStash.horizontal;
|
||||||
|
this.logger.info(`Left Behind Stash Vertical changed to ${this.mod.behindStash.vertical}`);
|
||||||
|
this.logger.info(`Left Behind Stash Horizontal changed to ${this.mod.behindStash.horizontal}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare for Escape Stash Size Changes
|
||||||
|
if (this.mod.escapeStash.vertical != 48 || this.mod.escapeStash.horizontal != 10)
|
||||||
|
{
|
||||||
|
this.items["5811ce662459770f6f490f32"]._props.Grids[0]._props.cellsV = this.mod.escapeStash.vertical;
|
||||||
|
this.items["5811ce662459770f6f490f32"]._props.Grids[0]._props.cellsH = this.mod.escapeStash.horizontal;
|
||||||
|
this.logger.info(`Prepare for Escape Stash Vertical changed to ${this.mod.escapeStash.vertical}`);
|
||||||
|
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${this.mod.escapeStash.horizontal}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Edge of Darkness Stash Size Changes
|
||||||
|
if (this.mod.eodStash.vertical != 68 || this.mod.eodStash.horizontal != 10)
|
||||||
|
{
|
||||||
|
this.items["5811ce772459770e9e5f9532"]._props.Grids[0]._props.cellsV = this.mod.eodStash.vertical;
|
||||||
|
this.items["5811ce772459770e9e5f9532"]._props.Grids[0]._props.cellsH = this.mod.eodStash.horizontal;
|
||||||
|
this.logger.info(`Edge of Darkness Stash Vertical changed to ${this.mod.eodStash.vertical}`);
|
||||||
|
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${this.mod.eodStash.horizontal}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggles true/false the Examined By Default config on all items in database/templates/items.json
|
||||||
|
if (this.mod.examinedByDefault)
|
||||||
|
{
|
||||||
|
this.examinedByDefault();
|
||||||
|
this.logger.info(`Examined By Default is ${this.mod.examinedByDefault}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Roubles Max Stack
|
||||||
|
if (this.mod.roublesMaxStack != 500000)
|
||||||
|
{
|
||||||
|
this.items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = this.modConfig.items.roublesMaxStack;
|
||||||
|
this.logger.info(`Rouble Max Stack set to ${this.mod.roublesMaxStack}`, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dollars Max Stack
|
||||||
|
if (this.mod.dollarsMaxStack != 50000)
|
||||||
|
{
|
||||||
|
this.items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = this.modConfig.items.dollarsMaxStack;
|
||||||
|
this.logger.info(`Dollar Max Stack set to ${this.mod.dollarsMaxStack}`, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Euros Max Stack
|
||||||
|
if (this.mod.eurosMaxStack != 50000)
|
||||||
|
{
|
||||||
|
this.items["569668774bdc2da2298b4568"]._props.StackMaxSize = this.modConfig.items.eurosMaxStack;
|
||||||
|
this.logger.info(`Euro Max Stack set to ${this.mod.eurosMaxStack}`, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Functions Functions.
|
||||||
|
|
||||||
|
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||||
|
private updateWeight(): void
|
||||||
|
{
|
||||||
|
for (const item in this.items)
|
||||||
|
{
|
||||||
|
if (this.items[item]._props?.Weight)
|
||||||
|
{
|
||||||
|
this.items[item]._props.Weight *= this.mod.weightModifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates backpacks and removes any values in the ExcludedFilter under props > Grids > props > filters > ExcludedFilter in database/templates/items.json
|
||||||
|
private updateBackpacks(): void
|
||||||
|
{
|
||||||
|
for (const item in this.items)
|
||||||
|
{
|
||||||
|
if (this.items[item]._parent === "5448e53e4bdc2d60728b4567")
|
||||||
|
{
|
||||||
|
this.items[item]._props.Grids[0]._props.filters[0].ExcludedFilter = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the Examined By Default modifier for all items in database/templates/items.json to either True or False depending on the config value.
|
||||||
|
private examinedByDefault(): void
|
||||||
|
{
|
||||||
|
for (const item in this.items)
|
||||||
|
{
|
||||||
|
this.items[item]._props.ExaminedByDefault = this.mod.examinedByDefault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private removeKeyUsageMax(): void
|
||||||
|
{
|
||||||
|
for (const item in this.items)
|
||||||
|
{
|
||||||
|
if (this.items[item]._parent === "5c99f98d86f7745c314214b3")
|
||||||
|
{
|
||||||
|
this.items[item]._props.MaximumNumberOfUsage = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,22 +1,22 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { LocationsConfig } from "../config/ts/locations";
|
import { Config } from "../config/config";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Locations
|
export class Locations
|
||||||
{
|
{
|
||||||
private modConfig: LocationsConfig = require("../config/locations.json");
|
private modConfig: Config = require("../config/config.json");
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private tables: DatabaseServer;
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
constructor (logger: Logger, databaseServer: DatabaseServer)
|
constructor (logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer;
|
this.tables = databaseServer.getTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateLocations(): void
|
public updateLocations(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig.locations;
|
||||||
|
|
||||||
// Gives all extracts 100% chance to spawn.
|
// Gives all extracts 100% chance to spawn.
|
||||||
if (mod.allExtractsAvailable)
|
if (mod.allExtractsAvailable)
|
||||||
@ -39,31 +39,17 @@ export class Locations
|
|||||||
this.logger.info("No Extract Restrictions Enabled");
|
this.logger.info("No Extract Restrictions Enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make all extractions of the map available regardless of the infil
|
// Make all extractions of the map available regardless of the infill
|
||||||
if (mod.extractionsExtended)
|
if (mod.extractionsExtended)
|
||||||
{
|
{
|
||||||
this.extractionsExtended();
|
this.extractionsExtended();
|
||||||
this.logger.info("Extractions Are Extended");
|
this.logger.info("Extractions Are Extended");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enables co-op extractions (PMC w/ Scav)
|
|
||||||
if (mod.enableCoopExtracts)
|
|
||||||
{
|
|
||||||
this.coopExtractsEnabled();
|
|
||||||
this.logger.info("Coop Extracts Are Enabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove the access key "5c94bbff86f7747ee735c08f" (Labs access card) from Labs.
|
|
||||||
if (mod.freeLabsEntry)
|
|
||||||
{
|
|
||||||
this.freeLabsEntry();
|
|
||||||
this.logger.info("Labs is now Free to enter");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private allExtractsAvailable(): void
|
private allExtractsAvailable(): void
|
||||||
{
|
{
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
for (const i in locations)
|
for (const i in locations)
|
||||||
{
|
{
|
||||||
if (i !== "base")
|
if (i !== "base")
|
||||||
@ -84,8 +70,8 @@ export class Locations
|
|||||||
|
|
||||||
private exfilTime(): void
|
private exfilTime(): void
|
||||||
{
|
{
|
||||||
const maps = this.tables.getTables().locations;
|
const maps = this.tables.locations;
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig.locations;
|
||||||
for (const map in maps)
|
for (const map in maps)
|
||||||
{
|
{
|
||||||
if (map.toLowerCase() === "base")
|
if (map.toLowerCase() === "base")
|
||||||
@ -93,7 +79,7 @@ export class Locations
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapBase = this.tables.getTables().locations[map].base;
|
const mapBase = this.tables.locations[map].base;
|
||||||
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined)
|
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -108,39 +94,18 @@ export class Locations
|
|||||||
|
|
||||||
private noExtractRestrictions(): void
|
private noExtractRestrictions(): void
|
||||||
{
|
{
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
for (const i in locations)
|
for (const i in locations)
|
||||||
{
|
{
|
||||||
if (i !== "base")
|
if (i !== "base")
|
||||||
{
|
{
|
||||||
for (const x in locations[i].base.exits)
|
|
||||||
{
|
|
||||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train")
|
|
||||||
{
|
|
||||||
if (locations[i].base.exits[x].Chance !== 100)
|
|
||||||
{
|
|
||||||
locations[i].base.exits[x].Chance = 100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private coopExtractsEnabled(): void
|
|
||||||
{
|
|
||||||
const locations = this.tables.getTables().locations;
|
|
||||||
for (const i in locations)
|
|
||||||
{
|
|
||||||
if (i !== "base")
|
|
||||||
for (const x in locations[i].base.exits)
|
for (const x in locations[i].base.exits)
|
||||||
{
|
{
|
||||||
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||||
!locations[i].base.exits[x].Name.includes("lab") ||
|
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||||
locations[i].base.exits[x].Name === "lab_Vent")
|
locations[i].base.exits[x].Name === "lab_Vent")
|
||||||
{
|
{
|
||||||
if (locations[i].base.exits[x].PassageRequirement === "ScavCooperation")
|
if (locations[i].base.exits[x].PassageRequirement !== "None")
|
||||||
{
|
{
|
||||||
locations[i].base.exits[x].PassageRequirement = "None";
|
locations[i].base.exits[x].PassageRequirement = "None";
|
||||||
}
|
}
|
||||||
@ -169,11 +134,12 @@ export class Locations
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private extractionsExtended(): void
|
private extractionsExtended(): void
|
||||||
{
|
{
|
||||||
|
|
||||||
const locations = this.tables.getTables().locations;
|
const locations = this.tables.locations;
|
||||||
for (const map in locations)
|
for (const map in locations)
|
||||||
{
|
{
|
||||||
switch (map)
|
switch (map)
|
||||||
@ -204,22 +170,10 @@ export class Locations
|
|||||||
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "lighthouse":
|
|
||||||
for (const extract in locations[map].base.exits)
|
|
||||||
{
|
|
||||||
locations[map].base.exits[extract].EntryPoints = "Tunnel, North"
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private freeLabsEntry(): void
|
|
||||||
{
|
|
||||||
const locations = this.tables.getTables().locations.laboratory.base;
|
|
||||||
locations.AccessKeys = [];
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { Config } from "../config/ts/config";
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
export class Logger
|
export class Logger
|
||||||
{
|
{
|
130
Valens-AIO/src/loot.ts
Normal file
130
Valens-AIO/src/loot.ts
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
|
export class Loot
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
private locationConfig: ILocationConfig;
|
||||||
|
|
||||||
|
constructor (logger: Logger, databaseServer: DatabaseServer, locationConfig: ILocationConfig)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.locationConfig = locationConfig;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateLoot(): void
|
||||||
|
{
|
||||||
|
const mod = this.modConfig.loot;
|
||||||
|
|
||||||
|
if (mod.looseLootMultiplier > 1)
|
||||||
|
{
|
||||||
|
for (const map in this.locationConfig.looseLootMultiplier)
|
||||||
|
{
|
||||||
|
this.locationConfig.looseLootMultiplier[map] = mod.looseLootMultiplier;
|
||||||
|
}
|
||||||
|
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.staticLootMultiplier > 1)
|
||||||
|
{
|
||||||
|
for (const map in this.locationConfig.staticLootMultiplier)
|
||||||
|
{
|
||||||
|
this.locationConfig.staticLootMultiplier[map] = mod.staticLootMultiplier;
|
||||||
|
}
|
||||||
|
this.logger.info(`Static Loot Multiplier: ${mod.staticLootMultiplier}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.containersInMarkedRoom)
|
||||||
|
{
|
||||||
|
this.containersInMarkedRoom();
|
||||||
|
this.logger.info(`Containers In Marked Room: ${mod.containersInMarkedRoom}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the loot database/tables to include containers in marked rooms.
|
||||||
|
*
|
||||||
|
* @variable containersInMarkedRoom Enables common containers (items case, weapon case, etc.) in Marked Rooms.
|
||||||
|
*/
|
||||||
|
private containersInMarkedRoom(): void
|
||||||
|
{
|
||||||
|
// Customs Marked Room Loot.
|
||||||
|
let spawnPoints = this.tables.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");
|
||||||
|
|
||||||
|
cstmsmarked1.itemDistribution.push(...this.containers());
|
||||||
|
cstmsmarked2.itemDistribution.push(...this.containers());
|
||||||
|
cstmsmarked3.itemDistribution.push(...this.containers());
|
||||||
|
|
||||||
|
// Reserve Marked Room Loot.
|
||||||
|
spawnPoints = this.tables.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 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 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");
|
||||||
|
|
||||||
|
rsrvRBBK1.itemDistribution.push(...this.containers());
|
||||||
|
rsrvRBBK2.itemDistribution.push(...this.containers());
|
||||||
|
rsrvRBBK3.itemDistribution.push(...this.containers());
|
||||||
|
|
||||||
|
rsrvRBPKPM1.itemDistribution.push(...this.containers());
|
||||||
|
rsrvRBPKPM2.itemDistribution.push(...this.containers());
|
||||||
|
|
||||||
|
rsrvRBVO1.itemDistribution.push(...this.containers());
|
||||||
|
rsrvRBVO2.itemDistribution.push(...this.containers());
|
||||||
|
rsrvRBVO3.itemDistribution.push(...this.containers());
|
||||||
|
|
||||||
|
// Lighthouse Marked Room Loot ... Lighthouse Marked Has No Cases; Only Jewelry/Electronics.
|
||||||
|
/*const lhouseBdrm = spawnPoints.find(x=>x.template.Id==="");
|
||||||
|
|
||||||
|
lhouseBdrm.itemDistribution.push(...this.containers());*/
|
||||||
|
}
|
||||||
|
|
||||||
|
private containers(): any[]
|
||||||
|
{
|
||||||
|
/* Container "id"s
|
||||||
|
* S I C C pouch: 5d235bb686f77443f4331278
|
||||||
|
* Magazine Case: 5c127c4486f7745625356c13
|
||||||
|
* Weapon Case: 59fb023c86f7746d0d4b423c
|
||||||
|
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
||||||
|
* Item Case: 59fb042886f7746c5005a7b2
|
||||||
|
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
||||||
|
* Money case: 59fb016586f7746d0d4b423a
|
||||||
|
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
||||||
|
* Medicine case: 5aafbcd986f7745e590fff23
|
||||||
|
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||||
|
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||||
|
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||||
|
*/
|
||||||
|
|
||||||
|
const lootItems = [];
|
||||||
|
lootItems.push({"tpl": "5d235bb686f77443f4331278", "relativeProbability": 12});
|
||||||
|
lootItems.push({"tpl": "5c127c4486f7745625356c13", "relativeProbability": 25});
|
||||||
|
lootItems.push({"tpl": "59fb023c86f7746d0d4b423c", "relativeProbability": 13});
|
||||||
|
lootItems.push({"tpl": "5b6d9ce188a4501afc1b2b25", "relativeProbability": 10});
|
||||||
|
lootItems.push({"tpl": "59fb042886f7746c5005a7b2", "relativeProbability": 13});
|
||||||
|
lootItems.push({"tpl": "5c0a840b86f7742ffa4f2482", "relativeProbability": 10});
|
||||||
|
lootItems.push({"tpl": "59fb016586f7746d0d4b423a", "relativeProbability": 25});
|
||||||
|
lootItems.push({"tpl": "5c093db286f7740a1b2617e3", "relativeProbability": 30});
|
||||||
|
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||||
|
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||||
|
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
||||||
|
lootItems.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 9});
|
||||||
|
|
||||||
|
return lootItems;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,38 +1,33 @@
|
|||||||
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
//import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
|
||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|
||||||
import { DependencyContainer } from "tsyringe";
|
|
||||||
import { Config } from "../config/ts/config";
|
|
||||||
import { Airdrop } from "./airdrop";
|
|
||||||
import { Ammo } from "./ammo";
|
import { Ammo } from "./ammo";
|
||||||
import { Armor } from "./armor";
|
|
||||||
import { Bots } from "./bots";
|
import { Bots } from "./bots";
|
||||||
import { Containers } from "./containers";
|
|
||||||
import { Flea } from "./flea";
|
import { Flea } from "./flea";
|
||||||
import { Globals } from "./globals";
|
|
||||||
import { Hideout } from "./hideout";
|
import { Hideout } from "./hideout";
|
||||||
import { Insurance } from "./insurance";
|
|
||||||
import { Items } from "./items";
|
import { Items } from "./items";
|
||||||
import { Locations } from "./locations";
|
|
||||||
import { Logger } from "./logger";
|
|
||||||
import { Loot } from "./loot";
|
import { Loot } from "./loot";
|
||||||
import { Prewipe } from "./prewipe";
|
|
||||||
import { Quests } from "./quests";
|
|
||||||
import { Raid } from "./raid";
|
import { Raid } from "./raid";
|
||||||
import { Skills } from "./skills";
|
import { Globals } from "./globals";
|
||||||
import { Traders } from "./traders";
|
import { Insurance } from "./insurance";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
import { Weapons } from "./weapons";
|
import { Weapons } from "./weapons";
|
||||||
|
import { Containers } from "./containers";
|
||||||
|
import { Locations } from "./locations";
|
||||||
|
import { Quests } from "./quests";
|
||||||
|
import { Progression } from "./progression";
|
||||||
|
//import { Airdrop } from "./airdrop";
|
||||||
|
|
||||||
class ValensAIO implements IPostDBLoadMod
|
class ValensAIO implements IPostDBLoadMod
|
||||||
{
|
{
|
||||||
@ -44,11 +39,9 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
private insuranceConfig: IInsuranceConfig;
|
private insuranceConfig: IInsuranceConfig;
|
||||||
private locationConfig: ILocationConfig;
|
private locationConfig: ILocationConfig;
|
||||||
private ragfairConfig: IRagfairConfig;
|
private ragfairConfig: IRagfairConfig;
|
||||||
private airdropConfig: IAirdropConfig;
|
//private airdropConfig: IAirdropConfig;
|
||||||
private inRaidConfig: IInRaidConfig;
|
private inRaidConfig: IInRaidConfig;
|
||||||
private weightedRandomHelper : WeightedRandomHelper;
|
private weightedRandomHelper : WeightedRandomHelper;
|
||||||
private hideoutConfig: IHideoutConfig
|
|
||||||
private traderConfig: ITraderConfig;
|
|
||||||
|
|
||||||
public postDBLoad(container: DependencyContainer): void
|
public postDBLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
@ -63,20 +56,13 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||||
this.inRaidConfig = this.configServer.getConfig<IInRaidConfig>(ConfigTypes.IN_RAID);
|
this.inRaidConfig = this.configServer.getConfig<IInRaidConfig>(ConfigTypes.IN_RAID);
|
||||||
this.insuranceConfig = this.configServer.getConfig<IInsuranceConfig>(ConfigTypes.INSURANCE);
|
this.insuranceConfig = this.configServer.getConfig<IInsuranceConfig>(ConfigTypes.INSURANCE);
|
||||||
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)
|
||||||
const airdrops = new Airdrop(vLogger, this.databaseServer, this.airdropConfig);
|
//airdrop.updateAirdrops();
|
||||||
airdrops.updateAirdrops();
|
|
||||||
|
|
||||||
const ammo = new Ammo(vLogger, this.databaseServer);
|
const ammo = new Ammo(vLogger, this.databaseServer);
|
||||||
ammo.updateAmmo();
|
ammo.updateAmmo();
|
||||||
|
|
||||||
const armor = new Armor(vLogger, this.databaseServer);
|
|
||||||
armor.updateArmor();
|
|
||||||
|
|
||||||
const bots = new Bots(vLogger, this.databaseServer, this.botConfig, this.weightedRandomHelper);
|
const bots = new Bots(vLogger, this.databaseServer, this.botConfig, this.weightedRandomHelper);
|
||||||
bots.updateBots();
|
bots.updateBots();
|
||||||
|
|
||||||
@ -89,10 +75,10 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
const globals = new Globals(vLogger, this.databaseServer);
|
const globals = new Globals(vLogger, this.databaseServer);
|
||||||
globals.updateGlobals();
|
globals.updateGlobals();
|
||||||
|
|
||||||
const hideout = new Hideout(vLogger, this.databaseServer, this.hideoutConfig);
|
const hideout = new Hideout(vLogger, this.databaseServer);
|
||||||
hideout.updateHideout();
|
hideout.updateHideout();
|
||||||
|
|
||||||
const insurance = new Insurance(vLogger, this.insuranceConfig, this.databaseServer);
|
const insurance = new Insurance(vLogger, this.insuranceConfig);
|
||||||
insurance.updateInsurance();
|
insurance.updateInsurance();
|
||||||
|
|
||||||
const items = new Items(vLogger, this.databaseServer);
|
const items = new Items(vLogger, this.databaseServer);
|
||||||
@ -104,8 +90,8 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
const loot = new Loot(vLogger, this.databaseServer, this.locationConfig);
|
const loot = new Loot(vLogger, this.databaseServer, this.locationConfig);
|
||||||
loot.updateLoot();
|
loot.updateLoot();
|
||||||
|
|
||||||
const prewipe = new Prewipe(vLogger, this.databaseServer);
|
const progression = new Progression(vLogger, this.databaseServer, this.botConfig);
|
||||||
prewipe.updatePrewipe();
|
progression.updateProgression();
|
||||||
|
|
||||||
const quests = new Quests(vLogger, this.databaseServer);
|
const quests = new Quests(vLogger, this.databaseServer);
|
||||||
quests.updateQuests();
|
quests.updateQuests();
|
||||||
@ -113,12 +99,6 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
const raid = new Raid(vLogger, this.databaseServer, this.inRaidConfig);
|
const raid = new Raid(vLogger, this.databaseServer, this.inRaidConfig);
|
||||||
raid.updateRaid();
|
raid.updateRaid();
|
||||||
|
|
||||||
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);
|
const weapons = new Weapons(vLogger, this.databaseServer);
|
||||||
weapons.updateWeapons();
|
weapons.updateWeapons();
|
||||||
|
|
291
Valens-AIO/src/progression.ts
Normal file
291
Valens-AIO/src/progression.ts
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
|
export class Progression
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private botConfig: IBotConfig;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer, botConfig: IBotConfig)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.botConfig = botConfig;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateProgression(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
// modConfig variables
|
||||||
|
const mod = this.modConfig.progression;
|
||||||
|
|
||||||
|
|
||||||
|
// Server side variables
|
||||||
|
|
||||||
|
|
||||||
|
if (mod.enabled)
|
||||||
|
{
|
||||||
|
this.generateProgression();
|
||||||
|
this.logger.info("Progressional Gear Changes Injected");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Functions start here
|
||||||
|
|
||||||
|
|
||||||
|
private generateProgression()
|
||||||
|
{
|
||||||
|
const primaryWeaponArrayLL1 = ["574d967124597745970e7c94", "57d14d2524597714373db789", "57f4c844245977379d5c14d1", "59984ab886f7743e98271174", "5ea03f7400685063ec28bfa8", "5ae08f0a5acfc408fb1398a1", "5bfd297f0db834001a669119", "59d6088586f774275f37482f", "583990e32459771419544dd2", "59e6152586f77473dc057aa1", "5c07c60e0db834002330051f", "5a38e6bac4a2826c6e06d79b", "56dee2bdd2720bc8328b4567", "5447a9cd4bdc2dbd208b4567", "5d2f0d8048f0356c925bc3b0", "5d2f0d8048f0356c925bc3b0", "5fc3e272f8b6a877a729eac5", "58948c8e86f77409493f7266", "5644bd2b4bdc2d3b4c8b4572", "59e6687d86f77411d949b251", "54491c4f4bdc2db1078b4568", "5ba26383d4351e00334c93d9", "587e02ff24597743df3deaeb", "5c501a4d2e221602b412b540", "60db29ce99594040e04c4a27", "5580223e4bdc2d1c128b457f", "61f7c9e189e6fb1a5e3ea78d", "5e870397991fd70db46995c8", "5de652c31b7e3716273428be"];
|
||||||
|
const primaryWeaponArrayLL2 = primaryWeaponArrayLL1.concat(...["5839a40f24597726f856b511", "59ff346386f77477562ff5e2", "5ab8e9fcd8ce870019439434", "5bf3e03b0db834001d2c4a9c", "55801eed4bdc2d89578b4588", "5fbcc1d9016cce60e8341ab3", "628b5638ad252a16da6dd245", "5f2a9575926fd9352339381f", "5a7828548dc32e5a9c28b516", "60339954d62c9b14ed777c06", "6184055050224f204c1da540", "623063e994fc3f7b302a9696", "5e00903ae9dc277128008b87", "5ac66cb05acfc40198510a10", "5aafa857e5b5b00018480968", "5cc82d76e24e8d00134b4b83", "5bfea6e90db834001b7347f3", "576165642459773c7a400233", "606dae0ab0e443224b421bb7"]);
|
||||||
|
const primaryWeaponArrayLL3 = primaryWeaponArrayLL2.concat(...["5ac66d725acfc43b321d4b60", "5a0ec13bfcdbcb00165aa685", "5abcbc27d8ce8700182eceeb", "5ac4cd105acfc40016339859", "5ac66d2e5acfc43b321d4b53", "5ac66d9b5acfc4001633997a", "5beed0f50db834001c062b12", "57838ad32459774a17445cd2", "5c46fbd72e2216398b5a8c9c", "5e848cc2988a8701445df1e8", "5d43021ca4b9362eab4b5e25", "588892092459774ac91d4b11", "5c488a752e221602b412af63", "5b0bbe4e5acfc40dc528a72d", "618428466ef05c2ce828f218", "5a367e5dc4a282000e49738f", "5df8ce05b11454561e39243b", "6176aca650224f204c1da3fb", "628a60ae6b1d481ff772e9c8", "6183afd850224f204c1da514", "6165ac306ef05c2ce828ef74", "6259b864ebedf17603599e88"]);
|
||||||
|
|
||||||
|
const holsterArrayLL1 = ["5448bd6b4bdc2dfc2f8b4569", "571a12c42459771f627b58a0", "576a581d2459771e7b1bc4f1", "5a17f98cfcdbcb0980087290", "5e81c3cbac2bb513793cdc75", "5cadc190ae921500103bb3b6", "56d59856d2720bd8418b456a", "5a7ae0c351dfba0017554310"];
|
||||||
|
const holsterArrayLL2 = holsterArrayLL1.concat(...["61a4c8884f95bc3b2c5dc96f", "56e0598dd2720bb5668b45a6", "59f98b4986f7746f546d2cef", "602a9740da11d6478d5a06dc", "6193a720f8ee7e52e42109ed"]);
|
||||||
|
const holsterArrayLL3 = holsterArrayLL2.concat(...["5abccb7dd8ce87001773e277", "5d3eb3b0a4b93615055e84d2", "5b1fa9b25acfc40018633c01"]);
|
||||||
|
|
||||||
|
|
||||||
|
const backpackArrayLL1 = ["5ab8ee7786f7742d8f33f0b9", "544a5cde4bdc2d39388b456b", "5e9dcf5986f7746c417435b3", "5ab8f04f86f774585f4237d8", "5ca20d5986f774331e7c9602"];
|
||||||
|
const backpackArrayLL2 = backpackArrayLL1.concat(...["545cdae64bdc2d39198b4568", "60a2828e8689911a226117f9", "618bb76513f5097c8d5aa2d5", "5f5e467b0bc58666c37e7821", "5ab8ebf186f7742d8b372e80"]);
|
||||||
|
const backpackArrayLL3 = backpackArrayLL2.concat(...["5f5e46b96bdad616ad46d613", "5d5d940f86f7742797262046", "60a272cc93ef783291411d8e", "6034d103ca006d2dca39b3f0", "619cf0335771dd3c390269ae", "628e1ffc83ec92260c0f437f"]);
|
||||||
|
|
||||||
|
|
||||||
|
const tacticalVestArrayLL1 = ["5929a2a086f7744f4b234d43", "5e4abc1f86f774069619fbaa", "6034d0230ca681766b6a0fb5", "6034cf5fffd42c541047f72e", "572b7adb24597762ae139821", "5c0e3eb886f7742015526062"];
|
||||||
|
const tacticalVestArrayLL2 = tacticalVestArrayLL1.concat(...["5d5d8ca986f7742798716522", "544a5caa4bdc2d1a388b4568", "5c0e446786f7742013381639", "592c2d1a86f7746dbe2af32a", "5d5d85c586f774279a21cbdb", "59e7643b86f7742cbf2c109", "5b44c8ea86f7742d1627baf1", "5ca20abf86f77418567a43f2", "5d5d646386f7742797261fd9", "5fd4c60f875c30179f5d04c2", "60a6220e953894617404b00a", "61bc85697113f767765c7fe7", "603648ff5a45383c122086ac", "5e4abfed86f77406a2713cf7"]);
|
||||||
|
const tacticalVestArrayLL3 = tacticalVestArrayLL2.concat(...["60a3c70cde5f453f634816a3", "5648a69d4bdc2ded0b8b457b", "5ab8dced86f774646209ec87", "5ab8dab586f77441cd04f2a2", "60a621c49c197e4e8c4455e6", "5b44cad286f77402a54ae7e5", "5c0e6a1586f77404597b4965", "5c0e722886f7740458316a57", "5c0e746986f7741453628fe5", "5d5d87f786f77427997cfaef", "5df8a42886f77412640e2e75", "628d0618d1ba6e4fa07ce5a4", "61bcc89aef0f505f0c6cd0fc", "628dc750b910320f4c27a732", "628cd624459354321c4b7fa2"]);
|
||||||
|
|
||||||
|
|
||||||
|
const earpieceArrayLL1 = ["5b432b965acfc47a8774094e", "6033fa48ffd42c541047f728"];
|
||||||
|
const earpieceArrayLL2 = earpieceArrayLL1.concat(...["5645bcc04bdc2d363b8b4572", "5aa2ba71e5b5b000137b758f"]);
|
||||||
|
const earpieceArrayLL3 = earpieceArrayLL2.concat(...["5a16b9fffcdbcb0176308b34"]);
|
||||||
|
|
||||||
|
|
||||||
|
const headwearArrayLL1 = ["5a7c4850e899ef00150be885", "5aa7d193e5b5b000171d063f", "5c06c6a80db834001b735491", "59e7711e86f7746cae05fbe1", "5ac4c50d5acfc40019262e87", "5645bc214bdc2d363b8b4571", "5aa2a7e8e5b5b00016327c16", "5b40e61f5acfc4001a599bec", "5aa2b87de5b5b00016327c25", "5b40e5e25acfc4001a599bea"];
|
||||||
|
const headwearArrayLL2 = headwearArrayLL1.concat(...["5aa7d03ae5b5b00016327db5", "5d5e7d28a4b936645d161203", "5aa7e454e5b5b0214e506fa2", "5aa7e3abe5b5b000171d064d", "5b40e4035acfc47a87740943", "5b432d215acfc4771e1c6624", "5f60e784f2bcbb675b00dac7", "5aa2ba19e5b5b00014028f4e", "5b43271c5acfc432ff4dce65", "60b52e5bc7d8103275739d67", "5a16b672fcdbcb001912fa83"]);
|
||||||
|
const headwearArrayLL3 = headwearArrayLL2.concat(...["5ac8d6885acfc400180ae7b0", "5a154d5cfcdbcb001a3b00da", "5e00c1ad86f774747333222c", "5b40e3f35acfc40016388218", "5b4329f05acfc47a86086aa1", "5d6d3716a4b9361bc8618872", "5aa2b9ede5b5b000137b758b", "5c091a4e0db834001d5addc8", "5f60e7788adaa7100c3adb49", "5f60e6403b85f6263c14558c", "5aa7e373e5b5b000137b76f0"]);
|
||||||
|
|
||||||
|
|
||||||
|
const armorVestArrayLL1 = ["5df8a2ca86f7740bfe6df777", "5ab8e4ed86f7742d8e50c7fa", "5648a7494bdc2d9d488b4583", "5c0e5bab86f77461f55ed1f3", "5c0e5edb86f77461f55ed1f7", "62a09d79de7ac81993580530"];
|
||||||
|
const armorVestArrayLL2 = armorVestArrayLL1.concat(...["5b44d22286f774172b0c9de8", "5c0e51be86f774598e797894"])
|
||||||
|
const armorVestArrayLL3 = armorVestArrayLL2.concat(...["5f5f41476bdad616ad46d631", "545cdb794bdc2d3a198b456a", "5ab8e79e86f7742d8b372e78", "5b44d0de86f774503d30cba8", "5c0e53c886f7747fa54205c7", "5c0e57ba86f7747fa141986d", "5ca2151486f774244a3b8d30", "609e8540d5c319764c2bc2e9"]);
|
||||||
|
|
||||||
|
const eyewearArrayLL1 = ["5aa2b986e5b5b00014028f4c", "557ff21e4bdc2d89578b4586", "5b432be65acfc433000ed01f"];
|
||||||
|
const eyewearArrayLL2 = eyewearArrayLL1.concat(...["5d5fca1ea4b93635fd598c07"]);
|
||||||
|
const eyewearArrayLL3 = eyewearArrayLL2.concat(...["603409c80ca681766b6a0fb2", "5c0d32fcd174af02a1659c75", "5d6d2e22a4b9361bd5780d05"]);
|
||||||
|
|
||||||
|
const armBandArrayLL1 = ["5b3f16c486f7747c327f55f7", "5b3f3ade86f7746b6b790d8e", "5b3f3af486f774679e752c1f", "5b3f3b0186f774021a2afef7", "5b3f3b0e86f7746752107cda"];
|
||||||
|
const armBandArrayLL2 = armBandArrayLL1;
|
||||||
|
const armBandArrayLL3 = armBandArrayLL2.concat(...["619bdf9cc9546643a67df6f8", "619bc61e86e01e16f839a999", "619bdfd4c9546643a67df6fa", "619bdd8886e01e16f839a99c", "60b0f988c4449e4cb624c1da", "5f9949d869e2777a0e779ba5"]);
|
||||||
|
|
||||||
|
const faceCoverArrayLL1 = ["572b7f1624597762ae139822"];
|
||||||
|
const faceCoverArrayLL2 = faceCoverArrayLL1.concat(...["5ab8f39486f7745cd93a1cca", "5b4325355acfc40019478126"]);
|
||||||
|
const faceCoverArrayLL3 = faceCoverArrayLL2.concat(...["5ab8f85d86f7745cd93a1cf5", "5b432f3d5acfc4704b4a1dfb"]);
|
||||||
|
|
||||||
|
const ammo127x55ArrayLL3 = ["5cadf6e5ae921500113bb973", "5cadf6eeae921500134b2799"];
|
||||||
|
|
||||||
|
const ammo762x54ArrayLL1 = ["5887431f2459777e1612938f"];
|
||||||
|
const ammo762x54ArrayLL2 = ammo762x54ArrayLL1.concat(...["5e023cf8186a883be655e54f"]);
|
||||||
|
const ammo762x54ArrayLL3 = ammo762x54ArrayLL2.concat(...["59e77a2386f7742ee578960a", "560d61e84bdc2da74d8b4571"]);
|
||||||
|
|
||||||
|
const ammo762x51ArrayLL1 = ["5e023e6e34d52a55c3304f71"];
|
||||||
|
const ammo762x51ArrayLL2 = ammo762x51ArrayLL1.concat(...["5e023e53d4353e3302577c4c"]);
|
||||||
|
const ammo762x51ArrayLL3 = ammo762x51ArrayLL2.concat(...["58dd3ad986f77403051cba8f", "5a608bf24f39f98ffc77720e", "5a6086ea4f39f99cd479502f"]);
|
||||||
|
|
||||||
|
const ammo762x39ArrayLL1 = ["5656d7c34bdc2d9d198b4587", "59e4d3d286f774176a36250a"];
|
||||||
|
const ammo762x39ArrayLL2 = ammo762x39ArrayLL1.concat(...["59e4cf5286f7741778269d8a"]);
|
||||||
|
const ammo762x39ArrayLL3 = ammo762x39ArrayLL2.concat(...["59e4d24686f7741776641ac7", "59e0d99486f7744a32234762"]);
|
||||||
|
|
||||||
|
const ammo762x35ArrayLL2 = ["5fbe3ffdf8b6a877a729ea82"];
|
||||||
|
const ammo762x35ArrayLL3 = ammo762x35ArrayLL2.concat(...["6196365d58ef8c428c287da1", "619636be6db0f2477964e710"]);
|
||||||
|
|
||||||
|
const ammo762x25TTArrayLL1 = ["5735fdcd2459776445391d61", "5735ff5c245977640e39ba7e", "573601b42459776410737435", "573602322459776445391df1"];
|
||||||
|
const ammo762x25TTArrayLL2 = ammo762x25TTArrayLL1.concat(...["5736026a245977644601dc61", "573603c924597764442bd9cb"]);
|
||||||
|
const ammo762x25TTArrayLL3 = ammo762x25TTArrayLL2.concat(...["573603562459776430731618"]);
|
||||||
|
|
||||||
|
const ammo366TKMArrayLL1 = ["59e6542b86f77411dc52a77a", "59e655cb86f77411dc52a77b"];
|
||||||
|
const ammo366TKMArrayLL2 = ammo366TKMArrayLL1.concat(...["59e6658b86f77411d949b250"]);
|
||||||
|
const ammo366TKMArrayLL3 = ammo366TKMArrayLL2.concat(...["5f0596629e22f464da6bbdd9"]);
|
||||||
|
|
||||||
|
const ammo556x45ArrayLL1 = ["59e6920f86f77411d82aa167", "54527a984bdc2d4e668b4567", "59e68f6f86f7746c9f75e846", "59e6927d86f77411da468256"];
|
||||||
|
const ammo556x45ArrayLL2 = ammo556x45ArrayLL1.concat(...["59e6918f86f7746c9f75e849", "59e6906286f7746c9f75e847"]);
|
||||||
|
const ammo556x45ArrayLL3 = ammo556x45ArrayLL2.concat(...["60194943740c5d77f6705eea", "59e690b686f7746c9f75e848", "5c0d5ae286f7741e46554302"]);
|
||||||
|
|
||||||
|
const ammo545x39ArrayLL1 = ["56dff338d2720bbd668b4569", "56dff4a2d2720bbd668b456a", "56dff3afd2720bba668b4567"];
|
||||||
|
const ammo545x39ArrayLL2 = ammo545x39ArrayLL1.concat(...["56dff2ced2720bb4668b4567", "56dff4ecd2720b5f5a8b4568", "56dff421d2720b5f5a8b4567"]);
|
||||||
|
const ammo545x39ArrayLL3 = ammo545x39ArrayLL2.concat(...["56dfef82d2720bbd668b4567", "56dff061d2720bb5668b4567", "56dff026d2720bb8668b4567", "5c0d5e4486f77478390952fe"]);
|
||||||
|
|
||||||
|
const ammo57x28ArrayLL2 = ["5cc80f8fe4a949033b0224a2"];
|
||||||
|
const ammo57x28ArrayLL3 = ammo57x28ArrayLL2.concat(...["5cc80f38e4a949001152b560", "5cc80f53e4a949000e1ea4f8", "5cc80f67e4a949035e43bbba", "5cc80f79e4a949033c7343b2", "5cc86840d7f00c002412c56c"]);
|
||||||
|
|
||||||
|
const ammo46x30ArrayLL1 = ["5ba26812d4351e003201fef1"];
|
||||||
|
const ammo46x30ArrayLL2 = ammo46x30ArrayLL1;
|
||||||
|
const ammo46x30ArrayLL3 = ammo46x30ArrayLL2.concat(...["5ba2678ad4351e44f824b344", "5ba26844d4351e00334c9475"]);
|
||||||
|
|
||||||
|
const ammo9x18ArrayLL1 = ["573719762459775a626ccbc1", "57371e4124597760ff7b25f1", "57371eb62459776125652ac1", "57371f2b24597761224311f1", "5737201124597760fc4431f1", "5737207f24597760ff7b25f2"];
|
||||||
|
const ammo9x18ArrayLL2 = ammo9x18ArrayLL1.concat(...["57371b192459775a9f58a5e0"]);
|
||||||
|
const ammo9x18ArrayLL3 = ammo9x18ArrayLL2.concat(...["573718ba2459775a75491131", "573719df2459775a626ccbc2", "57371aab2459775a77142f22", "573720e02459776143012541", "57372140245977611f70ee91", "5737218f245977612125ba51"]);
|
||||||
|
|
||||||
|
const ammo9x19ArrayLL1 = ["58864a4f2459770fcc257101", "5c3df7d588a4501f290594e5"];
|
||||||
|
const ammo9x19ArrayLL2 = ammo9x19ArrayLL1.concat(...["56d59d3ad2720bdb418b4577"]);
|
||||||
|
const ammo9x19ArrayLL3 = ammo9x19ArrayLL2.concat(...["5c925fa22e221601da359b7b", "5efb0e16aeb21837e749c7ff", "5efb0da7a29a85116f6ea05f"]);
|
||||||
|
|
||||||
|
const ammo9x21ArrayLL2 = ["5a26abfac4a28232980eabff"];
|
||||||
|
const ammo9x21ArrayLL3 = ammo9x21ArrayLL2.concat(...["5a269f97c4a282000b151807", "5a26ac06c4a282000c5a90a8"]);
|
||||||
|
|
||||||
|
const ammo9x39ArrayLL2 = ["57a0dfb82459774d3078b56c"];
|
||||||
|
const ammo9x39ArrayLL3 = ammo9x39ArrayLL2.concat(...["57a0e5022459774d1673f889", "5c0d688c86f77413ae3407b2", "5c0d668f86f7747ccb7f13b2"]);
|
||||||
|
|
||||||
|
const ammo9x33RArrayLL2 = ["62330b3ed4dc74626d570b95", "62330bfadc5883093563729b", "62330c40bdd19b369e1e53d1"];
|
||||||
|
const ammo9x33RArrayLL3 = ammo9x33RArrayLL2.concat(...["62330c18744e5e31df12f516"]);
|
||||||
|
|
||||||
|
const ammo1143x23ACPArrayLL1 = ["5e81f423763d9f754677bf2e"];
|
||||||
|
const ammo1143x23ACPArrayLL2 = ammo1143x23ACPArrayLL1.concat(...["5efb0d4f4bc50b58e81710f3"]);
|
||||||
|
const ammo1143x23ACPArrayLL3 = ammo1143x23ACPArrayLL2.concat(...["5efb0cabfb3e451d70735af5", "5efb0fc6aeb21837e749c801"]);
|
||||||
|
|
||||||
|
const ammo12x70ArrayLL1 = ["560d5e524bdc2d25448b4571", "5d6e6772a4b936088465b17c", "5d6e67fba4b9361bc73bc779", "58820d1224597753c90aeb13", "5d6e6869a4b9361c140bcfde", "5d6e6891a4b9361bd473feea", ];
|
||||||
|
const ammo12x70ArrayLL2 = ammo12x70ArrayLL1.concat(...["5d6e6806a4b936088465b17e", "5d6e689ca4b9361bc8618956", "5d6e68e6a4b9361c140bcfe0"]);
|
||||||
|
const ammo12x70ArrayLL3 = ammo12x70ArrayLL2.concat(...["5d6e68b3a4b9361bca7e50b5", "5d6e68dea4b9361bcc29e659", "5d6e68a8a4b9360b6c0d54e2", "5d6e6911a4b9361bd5780d52", "5d6e68c4a4b9361b93413f79", "5c0d591486f7744c505b416f"]);
|
||||||
|
|
||||||
|
const ammo20x70ArrayLL1 = ["5a38ebd9c4a282000d722a5b", "5d6e695fa4b936359b35d852", "5d6e6a42a4b9364f07165f52", "5d6e6a53a4b9361bd473feec"];
|
||||||
|
const ammo20x70ArrayLL2 = ammo20x70ArrayLL1.concat(...["5d6e69b9a4b9361bc8618958", "5d6e69c7a4b9360b6c0d54e4"]);
|
||||||
|
const ammo20x70ArrayLL3 = ammo20x70ArrayLL2.concat(...["5d6e6a05a4b93618084f58d0", "5d6e6a5fa4b93614ec501745"]);
|
||||||
|
|
||||||
|
const ammo23x75ArrayLL3 = ["5e85a9a6eacf8c039e4e2ac1", "5f647f31b6238e5dd066e196"];
|
||||||
|
|
||||||
|
|
||||||
|
const progressionWhitelistLL1: IBotConfig.Equipment.whitelist.EquipmentFilterDetails =
|
||||||
|
{
|
||||||
|
"levelRange":
|
||||||
|
{
|
||||||
|
"min": 1,
|
||||||
|
"max": 15
|
||||||
|
},
|
||||||
|
"equipment":
|
||||||
|
{
|
||||||
|
"FirstPrimaryWeapon": [...primaryWeaponArrayLL1],
|
||||||
|
"Holster": [...holsterArrayLL1],
|
||||||
|
"Backpack": [...backpackArrayLL1],
|
||||||
|
"TacticalVest": [...tacticalVestArrayLL1],
|
||||||
|
"Earpiece": [...earpieceArrayLL1],
|
||||||
|
"Headwear": [...headwearArrayLL1],
|
||||||
|
"ArmorVest": [...armorVestArrayLL1],
|
||||||
|
"Eyewear": [...eyewearArrayLL1],
|
||||||
|
"ArmBand": [...armBandArrayLL1],
|
||||||
|
"FaceCover": [...faceCoverArrayLL1]
|
||||||
|
},
|
||||||
|
"cartridge":
|
||||||
|
{
|
||||||
|
"Caliber762x54R": [...ammo762x54ArrayLL1],
|
||||||
|
"Caliber762x51": [...ammo762x51ArrayLL1],
|
||||||
|
"Caliber762x39": [...ammo762x39ArrayLL1],
|
||||||
|
"Caliber762x25TT": [...ammo762x25TTArrayLL1],
|
||||||
|
"Caliber366TKM": [...ammo366TKMArrayLL1],
|
||||||
|
"Caliber556x45NATO": [...ammo556x45ArrayLL1],
|
||||||
|
"Caliber545x39": [...ammo545x39ArrayLL1],
|
||||||
|
"Caliber46x30": [...ammo46x30ArrayLL1],
|
||||||
|
"Caliber1143x23ACP": [...ammo1143x23ACPArrayLL1],
|
||||||
|
"Caliber9x19PARA": [...ammo9x19ArrayLL1],
|
||||||
|
"Caliber9x18PM": [...ammo9x18ArrayLL1],
|
||||||
|
"Caliber12g": [...ammo12x70ArrayLL1],
|
||||||
|
"Caliber20g": [...ammo20x70ArrayLL1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const progressionWhitelistLL2: IBotConfig.Equipment.whitelist.EquipmentFilterDetails =
|
||||||
|
{
|
||||||
|
"levelRange":
|
||||||
|
{
|
||||||
|
"min": 16,
|
||||||
|
"max": 25
|
||||||
|
},
|
||||||
|
"equipment":
|
||||||
|
{
|
||||||
|
"FirstPrimaryWeapon": [...primaryWeaponArrayLL2],
|
||||||
|
"Holster": [...holsterArrayLL2],
|
||||||
|
"Backpack": [...backpackArrayLL2],
|
||||||
|
"TacticalVest": [...tacticalVestArrayLL2],
|
||||||
|
"Earpiece": [...earpieceArrayLL2],
|
||||||
|
"Headwear": [...headwearArrayLL2],
|
||||||
|
"ArmorVest": [...armorVestArrayLL2],
|
||||||
|
"Eyewear": [...eyewearArrayLL2],
|
||||||
|
"ArmBand": [...armBandArrayLL2],
|
||||||
|
"FaceCover": [...faceCoverArrayLL2]
|
||||||
|
},
|
||||||
|
"cartridge":
|
||||||
|
{
|
||||||
|
"Caliber762x54R": [...ammo762x54ArrayLL2],
|
||||||
|
"Caliber762x51": [...ammo762x51ArrayLL2],
|
||||||
|
"Caliber762x39": [...ammo762x39ArrayLL2],
|
||||||
|
"Caliber762x35": [...ammo762x35ArrayLL2],
|
||||||
|
"Caliber762x25TT": [...ammo762x25TTArrayLL2],
|
||||||
|
"Caliber366TKM": [...ammo366TKMArrayLL2],
|
||||||
|
"Caliber556x45NATO": [...ammo556x45ArrayLL2],
|
||||||
|
"Caliber545x39": [...ammo545x39ArrayLL2],
|
||||||
|
"Caliber57x28": [...ammo57x28ArrayLL2],
|
||||||
|
"Caliber46x30": [...ammo46x30ArrayLL2],
|
||||||
|
"Caliber1143x23ACP": [...ammo1143x23ACPArrayLL2],
|
||||||
|
"Caliber9x39": [...ammo9x39ArrayLL2],
|
||||||
|
"Caliber9x33R": [...ammo9x33RArrayLL2],
|
||||||
|
"Caliber9x21": [...ammo9x21ArrayLL2],
|
||||||
|
"Caliber9x19PARA": [...ammo9x19ArrayLL2],
|
||||||
|
"Caliber9x18PM": [...ammo9x18ArrayLL2],
|
||||||
|
"Caliber12g": [...ammo12x70ArrayLL2],
|
||||||
|
"Caliber20g": [...ammo20x70ArrayLL2]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const progressionWhitelistLL3: IBotConfig.Equipment.whitelist.EquipmentFilterDetails =
|
||||||
|
{
|
||||||
|
"levelRange":
|
||||||
|
{
|
||||||
|
"min": 26,
|
||||||
|
"max": 36
|
||||||
|
},
|
||||||
|
"equipment":
|
||||||
|
{
|
||||||
|
"FirstPrimaryWeapon": [...primaryWeaponArrayLL3],
|
||||||
|
"Holster": [...holsterArrayLL3],
|
||||||
|
"Backpack": [...backpackArrayLL3],
|
||||||
|
"TacticalVest": [...tacticalVestArrayLL3],
|
||||||
|
"Earpiece": [...earpieceArrayLL3],
|
||||||
|
"Headwear": [...headwearArrayLL3],
|
||||||
|
"ArmorVest": [...armorVestArrayLL3],
|
||||||
|
"Eyewear": [...eyewearArrayLL3],
|
||||||
|
"ArmBand": [...armBandArrayLL3],
|
||||||
|
"FaceCover": [...faceCoverArrayLL3]
|
||||||
|
},
|
||||||
|
"cartridge":
|
||||||
|
{
|
||||||
|
"Caliber127x55": [...ammo127x55ArrayLL3],
|
||||||
|
"Caliber762x54R": [...ammo762x54ArrayLL3],
|
||||||
|
"Caliber762x51": [...ammo762x51ArrayLL3],
|
||||||
|
"Caliber762x39": [...ammo762x39ArrayLL3],
|
||||||
|
"Caliber762x35": [...ammo762x35ArrayLL3],
|
||||||
|
"Caliber762x25TT": [...ammo762x25TTArrayLL3],
|
||||||
|
"Caliber366TKM": [...ammo366TKMArrayLL3],
|
||||||
|
"Caliber556x45NATO": [...ammo556x45ArrayLL3],
|
||||||
|
"Caliber545x39": [...ammo545x39ArrayLL3],
|
||||||
|
"Caliber57x28": [...ammo57x28ArrayLL3],
|
||||||
|
"Caliber46x30": [...ammo46x30ArrayLL3],
|
||||||
|
"Caliber1143x23ACP": [...ammo1143x23ACPArrayLL3],
|
||||||
|
"Caliber9x39": [...ammo9x39ArrayLL3],
|
||||||
|
"Caliber9x33R": [...ammo9x33RArrayLL3],
|
||||||
|
"Caliber9x21": [...ammo9x21ArrayLL3],
|
||||||
|
"Caliber9x19PARA": [...ammo9x19ArrayLL3],
|
||||||
|
"Caliber9x18PM": [...ammo9x18ArrayLL3],
|
||||||
|
"Caliber12g": [...ammo12x70ArrayLL3],
|
||||||
|
"Caliber20g": [...ammo20x70ArrayLL3],
|
||||||
|
"Caliber23x75": [...ammo23x75ArrayLL3]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.botConfig.equipment.pmc.whitelist.push(progressionWhitelistLL1);
|
||||||
|
this.botConfig.equipment.pmc.whitelist.push(progressionWhitelistLL2);
|
||||||
|
this.botConfig.equipment.pmc.whitelist.push(progressionWhitelistLL3);
|
||||||
|
}
|
||||||
|
}
|
48
Valens-AIO/src/quests.ts
Normal file
48
Valens-AIO/src/quests.ts
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
|
||||||
|
export class Quests
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateQuests(): void
|
||||||
|
{
|
||||||
|
if (!this.modConfig.quests.onlyFoundInRaid)
|
||||||
|
{
|
||||||
|
this.onlyFoundInRaid();
|
||||||
|
this.logger.info("Quest Items No Longer Need Be Found In Raid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||||
|
private onlyFoundInRaid(): void
|
||||||
|
{
|
||||||
|
const quests = this.tables.templates.quests;
|
||||||
|
|
||||||
|
for (const questid in quests)
|
||||||
|
{
|
||||||
|
const questsAvailableForFinishConditions = quests[questid].conditions.AvailableForFinish;
|
||||||
|
const findItemConditions = questsAvailableForFinishConditions.find(x=>x.parent === "FindItem");
|
||||||
|
|
||||||
|
if (!findItemConditions)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (findItemConditions._props.onlyFoundInRaid)
|
||||||
|
{
|
||||||
|
findItemConditions._props.onlyFoundInRaid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,11 +1,11 @@
|
|||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { RaidConfig } from "../config/ts/raid";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
|
||||||
export class Raid
|
export class Raid
|
||||||
{
|
{
|
||||||
private modConfig: RaidConfig = require("../config/raid.json")
|
private modConfig: Config = require("../config/config.json")
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private tables: DatabaseServer;
|
private tables: DatabaseServer;
|
||||||
private inRaidConfig: IInRaidConfig;
|
private inRaidConfig: IInRaidConfig;
|
||||||
@ -13,13 +13,13 @@ export class Raid
|
|||||||
constructor(logger:Logger, databaseServer: DatabaseServer, inRaidConfig: IInRaidConfig)
|
constructor(logger:Logger, databaseServer: DatabaseServer, inRaidConfig: IInRaidConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer;
|
this.tables = databaseServer.getTables();
|
||||||
this.inRaidConfig = inRaidConfig;
|
this.inRaidConfig = inRaidConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateRaid(): void
|
public updateRaid(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig.raid;
|
||||||
|
|
||||||
if (mod.fixOpenZones)
|
if (mod.fixOpenZones)
|
||||||
{
|
{
|
||||||
@ -33,22 +33,22 @@ export class Raid
|
|||||||
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.timeLimit.enabled)
|
if (mod.timeLimit)
|
||||||
{
|
{
|
||||||
const maps = this.tables.getTables().locations;
|
const maps = this.tables.locations;
|
||||||
|
|
||||||
for (const map in maps)
|
for (const map in maps)
|
||||||
{
|
{
|
||||||
if (this.tables.getTables().locations[map].base?.EscapeTimeLimit)
|
if (this.tables.locations[map].base?.EscapeTimeLimit)
|
||||||
{
|
{
|
||||||
this.tables.getTables().locations[map].base.EscapeTimeLimit = this.modConfig.timeLimit.raidTime;
|
this.tables.locations[map].base.EscapeTimeLimit = this.modConfig.raid.timeLimit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit.raidTime} minutes.`);
|
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.aiAmount.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiAmount || mod.aiDifficulty.toLowerCase() != this.inRaidConfig.raidMenuSettings.aiDifficulty || mod.bossEnabled != true
|
if (mod.aiAmount.toLowerCase() != "asonline" ||mod.aiDifficulty.toLowerCase() != "asonline" ||mod.bossEnabled != true
|
||||||
|| mod.scavWars != this.inRaidConfig.raidMenuSettings.scavWars || mod.taggedAndCursed != this.inRaidConfig.raidMenuSettings.taggedAndCursed || mod.enablePve != this.inRaidConfig.raidMenuSettings.enablePve)
|
||mod.scavWars != false ||mod.taggedAndCursed != false ||mod.enablePve != false)
|
||||||
{
|
{
|
||||||
const inRaidConfig = this.inRaidConfig;
|
const inRaidConfig = this.inRaidConfig;
|
||||||
|
|
||||||
@ -66,13 +66,13 @@ export class Raid
|
|||||||
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.carExtractBaseStandingGain != this.inRaidConfig.carExtractBaseStandingGain)
|
if (mod.carExtractBaseStandingGain != 0.25)
|
||||||
{
|
{
|
||||||
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||||
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.scavExtractGain != this.inRaidConfig.scavExtractGain)
|
if (mod.scavExtractGain != 0.01)
|
||||||
{
|
{
|
||||||
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||||
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||||
@ -83,24 +83,24 @@ export class Raid
|
|||||||
{
|
{
|
||||||
const zones =
|
const zones =
|
||||||
{
|
{
|
||||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneBlockPost,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||||
"laboratory": "BotZoneGate1,BotZoneGate2,BotZoneBasement,BotZoneFloor1,BotZoneFloor2",
|
"laboratory": "BotZoneFloor1,BotZoneFloor2,BotZoneBasement",
|
||||||
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
||||||
"woods": "ZoneClearVill,ZoneHouse,ZoneScavBase2,ZoneHouse,ZoneWoodCutter,ZoneBigRocks,ZoneRoad,ZoneHighRocks,ZoneMiniHouse,ZoneBigRocks,ZoneRedHouse",
|
"woods": "ZoneRedHouse,ZoneWoodCutter,ZoneHouse,ZoneBigRocks,ZoneRoad,ZoneMiniHouse,ZoneScavBase2,ZoneBrokenVill,ZoneClearVill,ZoneHighRocks",
|
||||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneBunkeSniper,ZonePowerStationSniper,ZoneForestTruck,ZoneForestSpawn,ZoneBunker,GreenHouses,ZoneStartVillage,ZoneTunnel,ZonePassClose,ZonePassFar,ZoneForestGasStation",
|
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZonePassFar,ZonePassClose,ZoneTunnel,ZoneStartVillage,ZoneBunker,ZoneGreenHouses,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneForestTruck,ZoneForestSpawn,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"
|
"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"
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const location in zones)
|
for (const location in zones)
|
||||||
{
|
{
|
||||||
this.tables.getTables().locations[location].base.OpenZones = zones[location];
|
this.tables.locations[location].base.OpenZones = zones[location];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private chompiesBossFix(): void
|
private chompiesBossFix(): void
|
||||||
{
|
{
|
||||||
const labsBosses = this.tables.getTables().locations.laboratory.base.BossLocationSpawn;
|
const labsBosses = this.tables.locations.laboratory.base.BossLocationSpawn;
|
||||||
const reserveBosses = this.tables.getTables().locations.rezervbase.base.BossLocationSpawn;
|
const reserveBosses = this.tables.locations.rezervbase.base.BossLocationSpawn;
|
||||||
const spawn1 = labsBosses.find(x => x.TriggerId === "autoId_00008_EXFIL");
|
const spawn1 = labsBosses.find(x => x.TriggerId === "autoId_00008_EXFIL");
|
||||||
if (spawn1)
|
if (spawn1)
|
||||||
{
|
{
|
67
Valens-AIO/src/weapons.ts
Normal file
67
Valens-AIO/src/weapons.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
|
export class Weapons
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json")
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: DatabaseServer;
|
||||||
|
private mod: any;
|
||||||
|
private weapons: any;
|
||||||
|
|
||||||
|
constructor(logger:Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateWeapons(): void
|
||||||
|
{
|
||||||
|
this.mod = this.modConfig.weapons;
|
||||||
|
|
||||||
|
if (this.mod.overheat || this.mod.jam || this.mod.slide || this.mod.misfeed || this.mod.misfire)
|
||||||
|
{
|
||||||
|
this.weaponMalfunctions();
|
||||||
|
this.logger.info("Weapon Malfunctions Patched", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private weaponMalfunctions(): void
|
||||||
|
{
|
||||||
|
const items = this.tables.templates.items;
|
||||||
|
|
||||||
|
for (const id in items)
|
||||||
|
{
|
||||||
|
const base = items[id];
|
||||||
|
|
||||||
|
//Weapons malfunctions
|
||||||
|
|
||||||
|
if (this.mod.jam && base._props.AllowJam)
|
||||||
|
{
|
||||||
|
base._props.AllowJam = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mod.misfire && base._props.AllowMisfire)
|
||||||
|
{
|
||||||
|
base._props.AllowMisfire = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mod.feed && base._props.AllowFeed)
|
||||||
|
{
|
||||||
|
base._props.AllowFeed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mod.overheat && base._props.AllowOverheat)
|
||||||
|
{
|
||||||
|
base._props.AllowOverheat = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mod.slide && base._props.AllowSlide)
|
||||||
|
{
|
||||||
|
base._props.AllowSlide = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
export declare class Program {
|
export declare class Program {
|
||||||
private errorHandler;
|
|
||||||
constructor();
|
constructor();
|
||||||
start(): void;
|
start(): void;
|
||||||
}
|
}
|
@ -8,29 +8,8 @@ export declare class BotCallbacks {
|
|||||||
protected botController: BotController;
|
protected botController: BotController;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/limit
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/difficulty
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
|
||||||
* Handle client/game/bot/generate
|
|
||||||
* @returns IGetBodyResponseData
|
|
||||||
*/
|
|
||||||
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/maxCap
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotCap(): string;
|
getBotCap(): string;
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/bot/getBotBehaviours
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getBotBehaviours(): string;
|
|
||||||
}
|
}
|
@ -1,17 +1,17 @@
|
|||||||
import { BundleLoader } from "../loaders/BundleLoader";
|
import { BundleLoader } from "../loaders/BundleLoader";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class BundleCallbacks {
|
export declare class BundleCallbacks {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpServer: IHttpServer;
|
||||||
protected bundleLoader: BundleLoader;
|
protected bundleLoader: BundleLoader;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
getBundle(url: string, info: any, sessionID: string): string;
|
getBundle(url: string, info: any, sessionID: string): string;
|
@ -3,7 +3,6 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||||
import { IGetSuitsResponse } from "../models/eft/customization/IGetSuitsResponse";
|
|
||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -14,15 +13,10 @@ export declare class CustomizationCallbacks {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
constructor(customizationController: CustomizationController, saveServer: SaveServer, httpResponse: HttpResponseUtil);
|
||||||
/**
|
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<{
|
||||||
* Handles client/trading/customization/storage
|
_id: string;
|
||||||
* @returns
|
suites: string[];
|
||||||
*/
|
}>;
|
||||||
getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>;
|
|
||||||
/**
|
|
||||||
* Handles client/trading/customization
|
|
||||||
* @returns ISuit[]
|
|
||||||
*/
|
|
||||||
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
getTraderSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISuit[]>;
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
@ -1,74 +1,32 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
|
||||||
import { RagfairController } from "../controllers/RagfairController";
|
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IGlobals } from "../models/eft/common/IGlobals";
|
import { IGlobals } from "../models/eft/common/IGlobals";
|
||||||
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
||||||
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
|
||||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||||
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
|
||||||
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
||||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
/**
|
|
||||||
* Handle client requests
|
|
||||||
*/
|
|
||||||
export declare class DataCallbacks {
|
export declare class DataCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected ragfairController: RagfairController;
|
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
||||||
protected hideoutController: HideoutController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
|
||||||
/**
|
|
||||||
* Handles client/settings
|
|
||||||
* @returns ISettingsBase
|
|
||||||
*/
|
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
/**
|
|
||||||
* Handles client/globals
|
|
||||||
* @returns IGlobals
|
|
||||||
*/
|
|
||||||
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
getGlobals(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGlobals>;
|
||||||
/**
|
|
||||||
* Handles client/items
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getTemplateItems(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Handles client/handbook/templates
|
|
||||||
* @returns IHandbookBase
|
|
||||||
*/
|
|
||||||
getTemplateHandbook(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHandbookBase>;
|
|
||||||
/**
|
|
||||||
* Handles client/customization
|
|
||||||
* @returns Record<string, ICustomizationItem
|
|
||||||
*/
|
|
||||||
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
getTemplateSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, ICustomizationItem>>;
|
||||||
/**
|
|
||||||
* Handles client/account/customization
|
|
||||||
* @returns string[]
|
|
||||||
*/
|
|
||||||
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
getTemplateCharacter(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string[]>;
|
||||||
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
getTemplateQuests(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
getHideoutSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutSettingsBase>;
|
||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
/**
|
|
||||||
* Handle client/hideout/qte/list
|
|
||||||
*/
|
|
||||||
getQteList(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
/**
|
|
||||||
* Handle client/items/prices/
|
|
||||||
* Called when viewing a traders assorts
|
|
||||||
* TODO - fully implement this
|
|
||||||
*/
|
|
||||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetItemPricesResponse>;
|
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
import { DialogueController } from "../controllers/DialogueController";
|
import { DialogueController } from "../controllers/DialogueController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
|
||||||
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||||
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||||
@ -21,38 +20,26 @@ import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
|||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class DialogueCallbacks implements OnUpdate {
|
export declare class DialogueCallbacks extends OnUpdate {
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected dialogueController: DialogueController;
|
protected dialogueController: DialogueController;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, dialogueController: DialogueController);
|
||||||
/**
|
|
||||||
* Handles client/friend/list
|
|
||||||
* @returns IGetFriendListDataResponse
|
|
||||||
*/
|
|
||||||
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
getFriendList(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetFriendListDataResponse>;
|
||||||
/**
|
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
* Handles client/chatServer/list
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
|
||||||
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
||||||
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
removeDialog(url: string, info: IRemoveDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
pinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
unpinDialog(url: string, info: IPinDialogRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
setRead(url: string, info: ISetDialogReadRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
/**
|
|
||||||
* Handles client/mail/dialog/getAllAttachments
|
|
||||||
* @returns IGetAllAttachmentsResponse
|
|
||||||
*/
|
|
||||||
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
getAllAttachments(url: string, info: IGetAllAttachmentsRequestData, sessionID: string): IGetBodyResponseData<IGetAllAttachmentsResponse>;
|
||||||
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listOutbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
||||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
@ -1,13 +1,8 @@
|
|||||||
import { GameController } from "../controllers/GameController";
|
import { GameController } from "../controllers/GameController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||||
import { IGameKeepAliveResponse } from "../models/eft/game/IGameKeepAliveResponse";
|
|
||||||
import { IGameLogoutResponseData } from "../models/eft/game/IGameLogoutResponseData";
|
|
||||||
import { IGameStartResponse } from "../models/eft/game/IGameStartResponse";
|
|
||||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
|
||||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
@ -18,37 +13,13 @@ declare class GameCallbacks {
|
|||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected gameController: GameController;
|
protected gameController: GameController;
|
||||||
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
constructor(httpResponse: HttpResponseUtil, watermark: Watermark, gameController: GameController);
|
||||||
/**
|
|
||||||
* Handle client/game/version/validate
|
|
||||||
* @returns INullResponseData
|
|
||||||
*/
|
|
||||||
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
versionValidate(url: string, info: IVersionValidateRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Handle client/game/start
|
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* @returns IGameStartResponse
|
|
||||||
*/
|
|
||||||
gameStart(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameStartResponse>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/logout
|
|
||||||
* @returns IGameLogoutResponseData
|
|
||||||
*/
|
|
||||||
gameLogout(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameLogoutResponseData>;
|
|
||||||
/**
|
|
||||||
* Handle client/game/config
|
|
||||||
* @returns IGameConfigResponse
|
|
||||||
*/
|
|
||||||
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData<IGameConfigResponse>;
|
||||||
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IServerDetails[]>;
|
getServer(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICheckVersionResponse>;
|
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
/**
|
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Handle client/game/keepalive
|
|
||||||
* @returns IGameKeepAliveResponse
|
|
||||||
*/
|
|
||||||
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGameKeepAliveResponse>;
|
|
||||||
/**
|
|
||||||
* Handle singleplayer/settings/version
|
|
||||||
* @returns string
|
|
||||||
*/
|
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import { HandbookController } from "../controllers/HandbookController";
|
import { HandbookController } from "../controllers/HandbookController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class HandbookCallbacks implements OnLoad {
|
export declare class HandbookCallbacks extends OnLoad {
|
||||||
protected handbookController: HandbookController;
|
protected handbookController: HandbookController;
|
||||||
constructor(handbookController: HandbookController);
|
constructor(handbookController: HandbookController);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
@ -7,7 +7,6 @@ import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealReques
|
|||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class HealthCallbacks {
|
export declare class HealthCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
@ -22,27 +21,7 @@ export declare class HealthCallbacks {
|
|||||||
* @returns empty response, no data sent back to client
|
* @returns empty response, no data sent back to client
|
||||||
*/
|
*/
|
||||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
|
||||||
* Custom aki server request found in modules/QTEPatch.cs
|
|
||||||
* @param url
|
|
||||||
* @param info HealthListener.Instance.CurrentHealth class
|
|
||||||
* @param sessionID session id
|
|
||||||
* @returns empty response, no data sent back to client
|
|
||||||
*/
|
|
||||||
handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData<string>;
|
|
||||||
/**
|
|
||||||
* Handle Eat
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle Heal
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle RestoreHealth
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
@ -1,9 +1,7 @@
|
|||||||
import { HideoutController } from "../controllers/HideoutController";
|
import { HideoutController } from "../controllers/HideoutController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnUpdate } from "../di/OnUpdate";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
|
||||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
|
||||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
@ -12,64 +10,24 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
|
|||||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class HideoutCallbacks implements OnUpdate {
|
export declare class HideoutCallbacks extends OnUpdate {
|
||||||
protected hideoutController: HideoutController;
|
protected hideoutController: HideoutController;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||||
configServer: ConfigServer);
|
configServer: ConfigServer);
|
||||||
/**
|
|
||||||
* Handle HideoutUpgrade
|
|
||||||
*/
|
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutUpgradeComplete
|
|
||||||
*/
|
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
|
||||||
*/
|
|
||||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutTakeItemsFromAreaSlots
|
|
||||||
*/
|
|
||||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutToggleArea
|
|
||||||
*/
|
|
||||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutSingleProductionStart
|
|
||||||
*/
|
|
||||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle HideoutScavCaseProductionStart
|
|
||||||
*/
|
|
||||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
* Handle HideoutContinuousProductionStart
|
|
||||||
*/
|
|
||||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle HideoutTakeProduction
|
|
||||||
*/
|
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
* Handle HideoutQuickTimeEvent
|
|
||||||
*/
|
|
||||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
|
||||||
*/
|
|
||||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
|
||||||
*/
|
|
||||||
improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
9
Valens-AIO/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
9
Valens-AIO/types/callbacks/HttpCallbacks.d.ts
vendored
Normal file
@ -0,0 +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;
|
||||||
|
getRoute(): string;
|
||||||
|
getImage(): string;
|
||||||
|
}
|
23
Valens-AIO/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
23
Valens-AIO/types/callbacks/InraidCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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";
|
||||||
|
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);
|
||||||
|
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
||||||
|
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
||||||
|
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;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import { InsuranceController } from "../controllers/InsuranceController";
|
import { InsuranceController } from "../controllers/InsuranceController";
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -10,23 +10,16 @@ import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { InsuranceService } from "../services/InsuranceService";
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class InsuranceCallbacks implements OnUpdate {
|
export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||||
protected insuranceController: InsuranceController;
|
protected insuranceController: InsuranceController;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||||
/**
|
onLoad(): void;
|
||||||
* Handle client/insurance/items/list/cost
|
|
||||||
* @returns IGetInsuranceCostResponseData
|
|
||||||
*/
|
|
||||||
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
|
||||||
/**
|
|
||||||
* Handle Insure
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
@ -16,7 +16,6 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
|||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
@ -37,5 +36,4 @@ export declare class InventoryCallbacks {
|
|||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
|
||||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
@ -9,5 +8,4 @@ export declare class ItemEventCallbacks {
|
|||||||
protected itemEventRouter: ItemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
protected getErrorCode(warnings: Warning[]): number;
|
|
||||||
}
|
}
|
@ -11,5 +11,4 @@ export declare class LocationCallbacks {
|
|||||||
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
constructor(httpResponse: HttpResponseUtil, locationController: LocationController);
|
||||||
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>;
|
||||||
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>;
|
||||||
getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string;
|
|
||||||
}
|
}
|
@ -7,10 +7,10 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
|||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||||
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -34,13 +34,9 @@ export declare class MatchCallbacks {
|
|||||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
|
||||||
* Handle client/match/group/status
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
|
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
|
||||||
}
|
}
|
@ -1,21 +1,22 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks implements OnLoad {
|
declare class ModCallbacks extends OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpServer: IHttpServer;
|
||||||
protected postAkiModLoader: PostAkiModLoader;
|
protected postAkiModLoader: PostAkiModLoader;
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
getBundle(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
export { ModCallbacks };
|
export { ModCallbacks };
|
@ -4,7 +4,6 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
|||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
import { INotifierChannel } from "../models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
import { ISelectProfileRequestData } from "../models/eft/notifier/ISelectProfileRequestData";
|
||||||
import { ISelectProfileResponse } from "../models/eft/notifier/ISelectProfileResponse";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class NotifierCallbacks {
|
export declare class NotifierCallbacks {
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
@ -20,10 +19,6 @@ export declare class NotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
/**
|
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Handle client/game/profile/select
|
|
||||||
* @returns ISelectProfileResponse
|
|
||||||
*/
|
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import { PresetController } from "../controllers/PresetController";
|
import { PresetController } from "../controllers/PresetController";
|
||||||
import { OnLoad } from "../di/OnLoad";
|
import { OnLoad } from "../di/OnLoad";
|
||||||
export declare class PresetCallbacks implements OnLoad {
|
export declare class PresetCallbacks extends OnLoad {
|
||||||
protected presetController: PresetController;
|
protected presetController: PresetController;
|
||||||
constructor(presetController: PresetController);
|
constructor(presetController: PresetController);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
import { ProfileController } from "../controllers/ProfileController";
|
import { ProfileController } from "../controllers/ProfileController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
@ -13,51 +12,20 @@ import { ISearchFriendResponse } from "../models/eft/profile/ISearchFriendRespon
|
|||||||
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNicknameRequestData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
/** Handle profile related client events */
|
|
||||||
export declare class ProfileCallbacks {
|
export declare class ProfileCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected profileController: ProfileController;
|
protected profileController: ProfileController;
|
||||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
||||||
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
createProfile(url: string, info: IProfileCreateRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
/**
|
getProfileData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Get the complete player profile (scav + pmc character)
|
regenerateScav(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* @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;
|
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>;
|
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
/**
|
||||||
* Called when creating a character when choosing a character face/voice
|
* Called when creating a character, when you choose a character face/voice
|
||||||
* @param url
|
* @param url
|
||||||
* @param info response (empty)
|
* @param info response (empty)
|
||||||
* @param sessionID
|
* @param sessionID
|
@ -21,13 +21,6 @@ export declare class QuestCallbacks {
|
|||||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle client/quest/list
|
|
||||||
* @param url
|
|
||||||
* @param info
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||||
}
|
}
|
@ -1,6 +1,5 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { RagfairController } from "../controllers/RagfairController";
|
import { RagfairController } from "../controllers/RagfairController";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -15,33 +14,28 @@ import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferReque
|
|||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
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 httpResponse: HttpResponseUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): void;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
|
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
* Handle /client/items/prices
|
|
||||||
* Called when clicking an item to list on flea
|
|
||||||
*/
|
|
||||||
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
@ -6,20 +6,6 @@ import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepa
|
|||||||
export declare class RepairCallbacks {
|
export declare class RepairCallbacks {
|
||||||
protected repairController: RepairController;
|
protected repairController: RepairController;
|
||||||
constructor(repairController: RepairController);
|
constructor(repairController: RepairController);
|
||||||
/**
|
|
||||||
* use trader to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Use repair kit to repair item
|
|
||||||
* @param pmcData
|
|
||||||
* @param body
|
|
||||||
* @param sessionID
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
9
Valens-AIO/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
9
Valens-AIO/types/callbacks/SaveCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
constructor(saveServer: SaveServer);
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
onUpdate(secondsSinceLastRun: number): boolean;
|
||||||
|
}
|
@ -6,9 +6,6 @@ import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRag
|
|||||||
export declare class TradeCallbacks {
|
export declare class TradeCallbacks {
|
||||||
protected tradeController: TradeController;
|
protected tradeController: TradeController;
|
||||||
constructor(tradeController: TradeController);
|
constructor(tradeController: TradeController);
|
||||||
/**
|
|
||||||
* Handle client/game/profile/items/moving TradingConfirm
|
|
||||||
*/
|
|
||||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
@ -1,23 +1,18 @@
|
|||||||
import { OnLoad } from "../di/OnLoad";
|
|
||||||
import { OnUpdate } from "../di/OnUpdate";
|
|
||||||
import { TraderController } from "../controllers/TraderController";
|
import { TraderController } from "../controllers/TraderController";
|
||||||
|
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected traderController: TraderController;
|
protected traderController: TraderController;
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): void;
|
||||||
onUpdate(): Promise<boolean>;
|
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
/**
|
|
||||||
* Handle client/trading/api/getUserAssortPrice/trader
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
getProfilePurchases(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, IBarterScheme[][]>>;
|
||||||
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>;
|
||||||
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>;
|
||||||
|
onUpdate(): boolean;
|
||||||
}
|
}
|
@ -1,15 +1,10 @@
|
|||||||
import { WeatherController } from "../controllers/WeatherController";
|
import { WeatherController } from "../controllers/WeatherController";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
export declare class WeatherCallbacks {
|
export declare class WeatherCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected weatherController: WeatherController;
|
protected weatherController: WeatherController;
|
||||||
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
constructor(httpResponse: HttpResponseUtil, weatherController: WeatherController);
|
||||||
/**
|
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
* Handle client/weather
|
|
||||||
* @returns IWeatherData
|
|
||||||
*/
|
|
||||||
getWeather(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IWeatherData>;
|
|
||||||
}
|
}
|
@ -3,15 +3,6 @@ import { ContextVariableType } from "./ContextVariableType";
|
|||||||
export declare class ApplicationContext {
|
export declare class ApplicationContext {
|
||||||
private variables;
|
private variables;
|
||||||
private static holderMaxSize;
|
private static holderMaxSize;
|
||||||
/**
|
|
||||||
* Called like:
|
|
||||||
*
|
|
||||||
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
|
||||||
*
|
|
||||||
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue<IStartOfflineRaidRequestData>();
|
|
||||||
* @param type
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||||
getValues(type: ContextVariableType): ContextVariable[];
|
getValues(type: ContextVariableType): ContextVariable[];
|
||||||
addValue(type: ContextVariableType, value: any): void;
|
addValue(type: ContextVariableType, value: any): void;
|
@ -4,7 +4,7 @@ export declare class ContextVariable {
|
|||||||
private timestamp;
|
private timestamp;
|
||||||
private type;
|
private type;
|
||||||
constructor(value: any, type: ContextVariableType);
|
constructor(value: any, type: ContextVariableType);
|
||||||
getValue<T>(): T;
|
getValue(): any;
|
||||||
getTimestamp(): Date;
|
getTimestamp(): Date;
|
||||||
getType(): ContextVariableType;
|
getType(): ContextVariableType;
|
||||||
}
|
}
|
4
Valens-AIO/types/context/ContextVariableType.d.ts
vendored
Normal file
4
Valens-AIO/types/context/ContextVariableType.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare enum ContextVariableType {
|
||||||
|
SESSION_ID = 0,
|
||||||
|
MATCH_INFO = 1
|
||||||
|
}
|
35
Valens-AIO/types/controllers/BotController.d.ts
vendored
Normal file
35
Valens-AIO/types/controllers/BotController.d.ts
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { BotGenerator } from "../generators/BotGenerator";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
export declare class BotController {
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botGenerator: BotGenerator;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Return the number of bot loadout varieties to be generated
|
||||||
|
* @param type bot Type we want the loadout gen count for
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
|
getBotCoreDifficulty(): IBotCore;
|
||||||
|
/**
|
||||||
|
* Get bot difficulty settings
|
||||||
|
* adjust PMC settings to ensure they engage the correct bot types
|
||||||
|
* @param type what bot the server is requesting settings for
|
||||||
|
* @param difficulty difficulty level server requested settings for
|
||||||
|
* @returns Difficulty object
|
||||||
|
*/
|
||||||
|
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
||||||
|
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string): Difficulty;
|
||||||
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
getBotCap(): number;
|
||||||
|
}
|
@ -5,18 +5,16 @@ import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothin
|
|||||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
export declare class CustomizationController {
|
export declare class CustomizationController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
25
Valens-AIO/types/controllers/DialogueController.d.ts
vendored
Normal file
25
Valens-AIO/types/controllers/DialogueController.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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";
|
||||||
|
export declare class DialogueController {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, saveServer: SaveServer, dialogueHelper: DialogueHelper);
|
||||||
|
getFriendList(sessionID: string): IGetFriendListDataResponse;
|
||||||
|
generateDialogueList(sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||||
|
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||||
|
generateDialogueView(dialogueID: string, sessionID: string): IGetMailDialogViewResponseData;
|
||||||
|
removeDialogue(dialogueID: string, sessionID: string): void;
|
||||||
|
setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void;
|
||||||
|
setRead(dialogueIDs: string[], sessionID: string): void;
|
||||||
|
getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse;
|
||||||
|
protected messagesHaveUncollectedRewards(messages: Message[]): boolean;
|
||||||
|
protected removeExpiredItems(sessionID: string): void;
|
||||||
|
update(): void;
|
||||||
|
}
|
28
Valens-AIO/types/controllers/GameController.d.ts
vendored
Normal file
28
Valens-AIO/types/controllers/GameController.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
|
import { Watermark } from "../utils/Watermark";
|
||||||
|
export declare class GameController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected watermark: Watermark;
|
||||||
|
protected httpServerHelper: HttpServerHelper;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected profileFixerService: ProfileFixerService;
|
||||||
|
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 logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
|
getServer(): any[];
|
||||||
|
}
|
@ -1,28 +1,23 @@
|
|||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
|
||||||
export declare class HealthController {
|
export declare class HealthController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
||||||
/**
|
/**
|
||||||
* stores in-raid player health
|
* stores in-raid player health
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -30,7 +25,7 @@ export declare class HealthController {
|
|||||||
* @param sessionID
|
* @param sessionID
|
||||||
* @param addEffects Should effects found be added or removed from profile
|
* @param addEffects Should effects found be added or removed from profile
|
||||||
*/
|
*/
|
||||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||||
/**
|
/**
|
||||||
* When healing in menu
|
* When healing in menu
|
||||||
* @param pmcData
|
* @param pmcData
|
||||||
@ -39,35 +34,13 @@ export declare class HealthController {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Consume food/water outside of a raid
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body request Object
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Occurs on post-raid healing page
|
* Occurs on post-raid healing page
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param healthTreatmentRequest Request data from client
|
* @param info Request data from client
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
healthTreatment(pmcData: IPmcData, info: 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;
|
|
||||||
}
|
}
|
102
Valens-AIO/types/controllers/HideoutController.d.ts
vendored
Normal file
102
Valens-AIO/types/controllers/HideoutController.d.ts
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
import { ScavCaseRewardGenerator } from "../generators/ScavCaseRewardGenerator";
|
||||||
|
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
|
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 { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||||
|
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||||
|
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||||
|
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
|
import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTakeItemOutRequestData";
|
||||||
|
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
|
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||||
|
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||||
|
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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class HideoutController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected playerService: PlayerService;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected paymentHelper: PaymentHelper;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected hideoutHelper: HideoutHelper;
|
||||||
|
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
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);
|
||||||
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse object
|
||||||
|
*/
|
||||||
|
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param pmcData Profile to update
|
||||||
|
* @param removeResourceRequest client request
|
||||||
|
* @param output response to send to client
|
||||||
|
* @param hideoutArea Area fuel is being removed from
|
||||||
|
* @returns IItemEventRouterResponse response
|
||||||
|
*/
|
||||||
|
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||||
|
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Handles event after clicking 'start' on the scav case hideout page
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param body client request object
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns item event router response
|
||||||
|
*/
|
||||||
|
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Add generated scav case rewards to player profile
|
||||||
|
* @param pmcData player profile to add rewards to
|
||||||
|
* @param rewards reward items to add to profile
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
/**
|
||||||
|
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||||
|
* @param sessionID
|
||||||
|
* @param pmcData
|
||||||
|
* @param body
|
||||||
|
* @param output
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
update(): void;
|
||||||
|
}
|
44
Valens-AIO/types/controllers/InraidController.d.ts
vendored
Normal file
44
Valens-AIO/types/controllers/InraidController.d.ts
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
|
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
|
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||||
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { InsuranceService } from "../services/InsuranceService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class InraidController {
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
|
protected healthHelper: HealthHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected insuranceService: InsuranceService;
|
||||||
|
protected inRaidHelper: InRaidHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected inraidConfig: IInRaidConfig;
|
||||||
|
constructor(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);
|
||||||
|
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||||
|
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Mark inventory items as FiR if player survived raid, otherwise remove FiR from them
|
||||||
|
* @param offraidData Save Progress Request
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param isPlayerScav Was the player a pScav
|
||||||
|
*/
|
||||||
|
private markOrRemoveFoundInRaidItems;
|
||||||
|
private handlePostRaidPlayerScavProcess;
|
||||||
|
private handlePostRaidPlayerScavKarmaChanges;
|
||||||
|
}
|
@ -8,7 +8,7 @@ import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
@ -19,7 +19,7 @@ import { TimeUtil } from "../utils/TimeUtil";
|
|||||||
export declare class InsuranceController {
|
export declare class InsuranceController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -30,24 +30,15 @@ export declare class InsuranceController {
|
|||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
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);
|
||||||
* Process insurance items prior to being given to player in mail
|
|
||||||
*/
|
|
||||||
processReturn(): void;
|
processReturn(): void;
|
||||||
/**
|
|
||||||
* Add insurance to an item
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param body Insurance request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse object to send to client
|
|
||||||
*/
|
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Calculate insurance cost
|
* Calculate insurance cost
|
||||||
* @param info request object
|
* @param info request object
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
* @returns IGetInsuranceCostResponseData object to send to client
|
* @returns response object to send to client
|
||||||
*/
|
*/
|
||||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
@ -2,7 +2,6 @@ import { InventoryHelper } from "../helpers/InventoryHelper";
|
|||||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||||
@ -21,46 +20,34 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
|||||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
|
||||||
export declare class InventoryController {
|
export declare class InventoryController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected randomUtil: RandomUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||||
* otherwise, move is contained within the same profile_f.
|
* otherwise, move is contained within the same profile_f.
|
||||||
* @param pmcData Profile
|
|
||||||
* @param moveRequest Move request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Remove Item from Profile
|
* Remove Item from Profile
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
* Deep tree item deletion, also removes items from insurance list
|
||||||
@ -105,11 +92,7 @@ export declare class InventoryController {
|
|||||||
*/
|
*/
|
||||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Add a tag to an inventory item
|
* Handles Tagging of items (primary Containers).
|
||||||
* @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;
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
@ -129,23 +112,10 @@ export declare class InventoryController {
|
|||||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle ApplyInventoryChanges
|
* Handles sorting of Inventory.
|
||||||
* Sorts supplied items.
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @param request sort request
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
*/
|
||||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
|
||||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
|
||||||
* @param pmcData Profile data
|
|
||||||
* @param body open loot container request data
|
|
||||||
* @param sessionID Session id
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
}
|
18
Valens-AIO/types/controllers/LocationController.d.ts
vendored
Normal file
18
Valens-AIO/types/controllers/LocationController.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { LocationGenerator } from "../generators/LocationGenerator";
|
||||||
|
import { ILocationBase } from "../models/eft/common/ILocationBase";
|
||||||
|
import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class LocationController {
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected locationGenerator: LocationGenerator;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
constructor(jsonUtil: JsonUtil, logger: ILogger, locationGenerator: LocationGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil);
|
||||||
|
get(location: string): ILocationBase;
|
||||||
|
generate(name: string): ILocationBase;
|
||||||
|
generateAll(): ILocationsGenerateAllResponse;
|
||||||
|
}
|
@ -6,34 +6,26 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
|||||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
|
||||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
import { MatchLocationService } from "../services/MatchLocationService";
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
|
||||||
export declare class MatchController {
|
export declare class MatchController {
|
||||||
protected logger: ILogger;
|
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected matchLocationService: MatchLocationService;
|
protected matchLocationService: MatchLocationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected matchConfig: IMatchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
protected botConfig: IBotConfig;
|
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
@ -41,17 +33,6 @@ export declare class MatchController {
|
|||||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||||
protected getMatch(location: string): any;
|
protected getMatch(location: string): any;
|
||||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||||
/**
|
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||||
* Handle /client/raid/configuration
|
|
||||||
* @param request
|
|
||||||
* @param sessionID
|
|
||||||
*/
|
|
||||||
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
|
||||||
/**
|
|
||||||
* Convert a difficulty value from pre-raid screen to a bot difficulty
|
|
||||||
* @param botDifficulty dropdown difficulty value
|
|
||||||
* @returns bot difficulty
|
|
||||||
*/
|
|
||||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
|
||||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
import { INoteActionData } from "../models/eft/notes/INoteActionData";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
export declare class NoteController {
|
export declare class NoteController {
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
constructor(itemEventRouter: ItemEventRouter);
|
||||||
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse;
|
@ -3,15 +3,15 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
import { IPresetBuildActionRequestData } from "../models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
import { WeaponBuild } from "../models/eft/profile/IAkiProfile";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
export declare class PresetBuildController {
|
export declare class PresetBuildController {
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, saveServer: SaveServer);
|
constructor(hashUtil: HashUtil, itemEventRouter: ItemEventRouter, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
getUserBuilds(sessionID: string): WeaponBuild[];
|
getUserBuilds(sessionID: string): WeaponBuild[];
|
||||||
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
@ -1,7 +1,6 @@
|
|||||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||||
@ -25,9 +24,8 @@ export declare class ProfileController {
|
|||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected questHelper: QuestHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
||||||
getMiniProfiles(): IMiniProfile[];
|
getMiniProfiles(): IMiniProfile[];
|
||||||
getMiniProfile(sessionID: string): any;
|
getMiniProfile(sessionID: string): any;
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
76
Valens-AIO/types/controllers/QuestController.d.ts
vendored
Normal file
76
Valens-AIO/types/controllers/QuestController.d.ts
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
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 { 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 { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { PlayerService } from "../services/PlayerService";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class QuestController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected itemEventRouter: ItemEventRouter;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected questHelper: QuestHelper;
|
||||||
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
|
protected playerService: PlayerService;
|
||||||
|
protected localeService: LocaleService;
|
||||||
|
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);
|
||||||
|
/**
|
||||||
|
* Get all quests visible to player
|
||||||
|
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||||
|
* @param sessionID session id
|
||||||
|
* @returns array of IQuest
|
||||||
|
*/
|
||||||
|
getClientQuests(sessionID: string): IQuest[];
|
||||||
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Remove completed quest from 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
|
||||||
|
*/
|
||||||
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Send a popup to player on completion of a quest
|
||||||
|
* @param sessionID session id
|
||||||
|
* @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;
|
||||||
|
/**
|
||||||
|
* Returns a list of quests that should be failed when a quest is completed
|
||||||
|
* @param completedQuestId quest completed id
|
||||||
|
* @returns array of quests
|
||||||
|
*/
|
||||||
|
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
||||||
|
/**
|
||||||
|
* Fail the quests provided
|
||||||
|
* @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;
|
||||||
|
}
|
@ -9,10 +9,8 @@ import { RagfairOfferHelper } from "../helpers/RagfairOfferHelper";
|
|||||||
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
import { RagfairSellHelper } from "../helpers/RagfairSellHelper";
|
||||||
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
import { RagfairSortHelper } from "../helpers/RagfairSortHelper";
|
||||||
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
import { RagfairTaxHelper } from "../helpers/RagfairTaxHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
import { IAddOfferRequestData, Requirement } from "../models/eft/ragfair/IAddOfferRequestData";
|
||||||
@ -24,26 +22,22 @@ import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
|||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||||
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
/**
|
|
||||||
* Handle RagfairCallback events
|
|
||||||
*/
|
|
||||||
export declare class RagfairController {
|
export declare class RagfairController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -58,69 +52,21 @@ export declare class RagfairController {
|
|||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected traderHelper: TraderHelper;
|
|
||||||
protected ragfairHelper: RagfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, 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);
|
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, searchRequest: ISearchRequestData): IGetOffersResult;
|
getOffers(sessionID: string, info: 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 isLinkedSearch(info: ISearchRequestData): boolean;
|
||||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||||
update(): void;
|
update(): void;
|
||||||
/**
|
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||||
* Called when creating an offer on flea, fills values in top right corner
|
|
||||||
* @param getPriceRequest
|
|
||||||
* @returns min/avg/max values for an item based on flea offers available
|
|
||||||
*/
|
|
||||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
|
||||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||||
getAllFleaPrices(): Record<string, number>;
|
getAllFleaPrices(): Record<string, number>;
|
||||||
getStaticPrices(): Record<string, number>;
|
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
@ -7,35 +7,35 @@ import { IRepairActionDataRequest } from "../models/eft/repair/IRepairActionData
|
|||||||
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
import { IRepairConfig } from "../models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { RepairService } from "../services/RepairService";
|
|
||||||
export declare class RepairController {
|
export declare class RepairController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected repairHelper: RepairHelper;
|
protected repairHelper: RepairHelper;
|
||||||
protected repairService: RepairService;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Repair with trader
|
* Repair with trader
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param sessionID session id
|
||||||
* @returns item event router action
|
* @returns item event router action
|
||||||
*/
|
*/
|
||||||
traderRepair(sessionID: string, body: ITraderRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Repair with repair kit
|
* Repair with repair kit
|
||||||
* @param sessionID session id
|
|
||||||
* @param body endpoint request data
|
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
|
* @param body endpoint request data
|
||||||
|
* @param sessionID session id
|
||||||
* @returns item event router action
|
* @returns item event router action
|
||||||
*/
|
*/
|
||||||
repairWithKit(sessionID: string, body: IRepairActionDataRequest, pmcData: IPmcData): IItemEventRouterResponse;
|
repairWithKit(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
@ -1,4 +1,3 @@
|
|||||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
@ -8,20 +7,16 @@ import { Exit } from "../models/eft/common/ILocationBase";
|
|||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { TraderInfo } from "../models/eft/common/tables/IBotBase";
|
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 { 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 { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
import { IRepeatableQuestChangeRequest } from "../models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
import { ELocationName } from "../models/enums/ELocationName";
|
import { ELocationName } from "../models/enums/ELocationName";
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
import { IQuestConfig, IRepeatableQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
import { PaymentService } from "../services/PaymentService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
@ -58,7 +53,6 @@ export declare class RepeatableQuestController {
|
|||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -66,16 +60,13 @@ export declare class RepeatableQuestController {
|
|||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
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);
|
||||||
/**
|
/**
|
||||||
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -102,13 +93,6 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
|
||||||
* @param repeatableConfig daily/weekly config
|
|
||||||
* @param pmcData Profile to search
|
|
||||||
* @returns IPmcDataRepeatableQuest
|
|
||||||
*/
|
|
||||||
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest;
|
|
||||||
/**
|
/**
|
||||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
@ -117,18 +101,17 @@ export declare class RepeatableQuestController {
|
|||||||
/**
|
/**
|
||||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
||||||
*/
|
*/
|
||||||
generateDebugDailies(dailiesPool: any, factory: any, number: number): any;
|
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
|
||||||
/**
|
/**
|
||||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||||
* The templates include Elimination, Completion and Extraction quest types
|
* The templates include Elimination, Completion and Extraction quest types
|
||||||
*
|
*
|
||||||
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
||||||
* @param {string} traderId trader from which the quest will be provided
|
* @param {string} traderId trader from which the quest will be provided
|
||||||
* @param {string} side scav daily or pmc daily/weekly quest
|
|
||||||
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
||||||
* (needs to be filled with reward and conditions by called to make a valid quest)
|
* (needs to be filled with reward and conditions by called to make a valid quest)
|
||||||
*/
|
*/
|
||||||
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
|
generateRepeatableTemplate(type: string, traderId: string): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Exploration quest
|
* Generates a valid Exploration quest
|
||||||
*
|
*
|
||||||
@ -158,12 +141,6 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||||
/**
|
|
||||||
* Cpnvert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
|
||||||
* @param locationKey e.g factory4_day
|
|
||||||
* @returns guid
|
|
||||||
*/
|
|
||||||
protected getQuestLocationByMapId(locationKey: string): string;
|
|
||||||
/**
|
/**
|
||||||
* Exploration repeatable quests can specify a required extraction point.
|
* Exploration repeatable quests can specify a required extraction point.
|
||||||
* This method creates the according object which will be appended to the conditions array
|
* This method creates the according object which will be appended to the conditions array
|
||||||
@ -239,18 +216,5 @@ export declare class RepeatableQuestController {
|
|||||||
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
||||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
changeRepeatableQuest(pmcDataIn: 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;
|
|
||||||
}
|
}
|
@ -1,30 +1,20 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { TradeHelper } from "../helpers/TradeHelper";
|
import { TradeHelper } from "../helpers/TradeHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { Upd } from "../models/eft/common/tables/IItem";
|
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
|
||||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { Upd } from "../models/eft/common/tables/IItem";
|
||||||
|
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
|
||||||
declare class TradeController {
|
declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected httpResponse: HttpResponseUtil;
|
constructor(logger: ILogger, itemEventRouter: ItemEventRouter, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
|
||||||
protected localisationService: LocalisationService;
|
|
||||||
protected configServer: ConfigServer;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
|
||||||
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
26
Valens-AIO/types/controllers/TraderController.d.ts
vendored
Normal file
26
Valens-AIO/types/controllers/TraderController.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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 { TraderAssortService } from "../services/TraderAssortService";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
|
export declare class TraderController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected traderHelper: TraderHelper;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected traderAssortService: TraderAssortService;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, jsonUtil: JsonUtil);
|
||||||
|
load(): void;
|
||||||
|
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||||
|
getAllTraders(sessionID: string): ITraderBase[];
|
||||||
|
updateTraders(): boolean;
|
||||||
|
getAssort(sessionId: string, traderId: string): ITraderAssort;
|
||||||
|
getPurchasesData(traderID: string, sessionID: string): Record<string, IBarterScheme[][]>;
|
||||||
|
}
|
@ -1,18 +1,11 @@
|
|||||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
export declare class WeatherController {
|
export declare class WeatherController {
|
||||||
protected weatherGenerator: WeatherGenerator;
|
protected weatherGenerator: WeatherGenerator;
|
||||||
protected logger: ILogger;
|
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||||
generate(): IWeatherData;
|
generate(): IWeatherData;
|
||||||
/**
|
|
||||||
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
|
||||||
* @returns Date object
|
|
||||||
*/
|
|
||||||
getCurrentInRaidTime(): Date;
|
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
export declare class WishlistController {
|
export declare class WishlistController {
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected itemEvenRouter: ItemEventRouter;
|
||||||
constructor(eventOutputHolder: EventOutputHolder);
|
constructor(itemEvenRouter: ItemEventRouter);
|
||||||
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
@ -1,9 +1,5 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
/**
|
|
||||||
* Handle the registration of classes to be used by the Dependency Injection code
|
|
||||||
*/
|
|
||||||
export declare class Container {
|
export declare class Container {
|
||||||
static registerPostLoadTypes(container: DependencyContainer, childContainer: DependencyContainer): void;
|
|
||||||
static registerTypes(depContainer: DependencyContainer): void;
|
static registerTypes(depContainer: DependencyContainer): void;
|
||||||
static registerListTypes(depContainer: DependencyContainer): void;
|
static registerListTypes(depContainer: DependencyContainer): void;
|
||||||
private static registerUtils;
|
private static registerUtils;
|
4
Valens-AIO/types/di/OnLoad.d.ts
vendored
Normal file
4
Valens-AIO/types/di/OnLoad.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnLoad {
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
7
Valens-AIO/types/di/OnLoadOnUpdate.d.ts
vendored
Normal file
7
Valens-AIO/types/di/OnLoadOnUpdate.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { OnLoad } from "./OnLoad";
|
||||||
|
import { OnUpdate } from "./OnUpdate";
|
||||||
|
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
onLoad(): void;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
4
Valens-AIO/types/di/OnUpdate.d.ts
vendored
Normal file
4
Valens-AIO/types/di/OnUpdate.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export declare class OnUpdate {
|
||||||
|
onUpdate(timeSinceLastRun: number): boolean;
|
||||||
|
getRoute(): string;
|
||||||
|
}
|
5
Valens-AIO/types/di/Serializer.d.ts
vendored
Normal file
5
Valens-AIO/types/di/Serializer.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||||
|
export declare class Serializer {
|
||||||
|
serialize(sessionID: string, req: any, resp: any, body: any, httpServer: IHttpServer): void;
|
||||||
|
canHandle(something: string): boolean;
|
||||||
|
}
|
96
Valens-AIO/types/generators/BotGenerator.d.ts
vendored
Normal file
96
Valens-AIO/types/generators/BotGenerator.d.ts
vendored
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Health, IBotType, Inventory } 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 { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotInventoryGenerator } from "./BotInventoryGenerator";
|
||||||
|
declare namespace BotGenerator {
|
||||||
|
interface IRandomisedBotLevelResult {
|
||||||
|
level: number;
|
||||||
|
exp: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export declare class BotGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botInventoryGenerator: BotInventoryGenerator;
|
||||||
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected gameEventHelper: GameEventHelper;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Generate a player scav bot object
|
||||||
|
* @param role e.g. assault / pmcbot
|
||||||
|
* @param difficulty easy/normal/hard/impossible
|
||||||
|
* @param botTemplate base bot template to use (e.g. assault/pmcbot)
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
generatePlayerScav(role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||||
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Choose if a bot should become a PMC by checking if bot type is allowed to become a Pmc in botConfig.convertFromChances and doing a random int check
|
||||||
|
* @param botRole the bot role to check if should be a pmc
|
||||||
|
* @returns true if should be a pmc
|
||||||
|
*/
|
||||||
|
protected shouldBotBePmc(botRole: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
|
/**
|
||||||
|
* Get a clone of the database\bots\base.json file
|
||||||
|
* @returns IBotBase object
|
||||||
|
*/
|
||||||
|
protected getCloneOfBotBase(): IBotBase;
|
||||||
|
protected generateBot(bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||||
|
/**
|
||||||
|
* Log the number of PMCs generated to the debug console
|
||||||
|
*/
|
||||||
|
protected logPmcGeneratedCount(output: IBotBase[]): void;
|
||||||
|
protected generateRandomLevel(min: number, max: number): BotGenerator.IRandomisedBotLevelResult;
|
||||||
|
/**
|
||||||
|
* Converts health object to the required format
|
||||||
|
* @param healthObj health object from bot json
|
||||||
|
* @param playerScav Is a pscav bot being generated
|
||||||
|
* @returns PmcHealth object
|
||||||
|
*/
|
||||||
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
|
/**
|
||||||
|
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||||
|
* @param pmcSide eft side (usec/bear)
|
||||||
|
* @returns pmc side as defined in config
|
||||||
|
*/
|
||||||
|
protected getPmcRole(pmcSide: string): string;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
|
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
|
protected getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
|
/**
|
||||||
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
|
* @param bot bot to add dogtag to
|
||||||
|
* @returns Bot with dogtag added
|
||||||
|
*/
|
||||||
|
protected generateDogtag(bot: IBotBase): IBotBase;
|
||||||
|
}
|
||||||
|
export {};
|
24
Valens-AIO/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
24
Valens-AIO/types/generators/BotInventoryGenerator.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
|
import { Inventory, Chances, Generation, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
|
import { BotLootGenerator } from "./BotLootGenerator";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
|
export declare class BotInventoryGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
|
protected botLootGenerator: BotLootGenerator;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper);
|
||||||
|
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||||
|
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
||||||
|
protected generateInventoryBase(): PmcInventory;
|
||||||
|
}
|
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