diff --git a/mod.ts b/mod.ts index 30105c2..60f5c79 100644 --- a/mod.ts +++ b/mod.ts @@ -2,6 +2,7 @@ import { DependencyContainer } from "tsyringe"; import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod"; import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; +import { IQuestCondition } from "@spt/models/eft/common/tables/IQuest"; class Mod implements IPostAkiLoadMod, IPostDBLoadMod { @@ -14,15 +15,57 @@ class Mod implements IPostAkiLoadMod, IPostDBLoadMod public postDBLoad(container: DependencyContainer): void { - const databaseServer = container.resolve("DatabaseServer"); - const tables = databaseServer.getTables(); - + const db = container.resolve("DatabaseServer").getTables(); + const quests = db.templates.quests; const item = "5857a8bc2459772bad15db29", price = 500000; +const peacekeeper = db.traders["5935c25fb3acc3127c3d8cd9"]; - const mechanic = tables.traders["5a7c2eca46aef81a7ca2145d"]; + const UnlockEpsilon = quests["59ca2eb686f77445a80ed049"].rewards.Success; + UnlockEpsilon.push( + { + "id": "655b7fd21f2b6843ec751fds", + "index": 7, + "items": [ + { + "_id": "65ba7538bf3fc35a9a0a02ds", + "_tpl": "59db794186f77448bc595262" + } + ], + "loyaltyLevel": 3, + "target": "65ba7538bf3fc35a9a0a02ds", + "traderId": peacekeeper, + "type": "AssortmentUnlock" + } + ); - mechanic.assort.items.push({ + peacekeeper.assort.items.push + ( + { + "_id": item, + "_tpl": item, + "parentId": "hideout", + "slotId": "hideout", + "upd": + { + "UnlimitedCount": false, + "StackObjectsCount": 1 + } + } + ); + peacekeeper.assort.barter_scheme[item] = + [ + [ + { + "count": 8000, + "_tpl": "5696686a4bdc2da3298b456a" + } + ] + ]; + peacekeeper.assort.loyal_level_items[item] = 3; + + const mechanic = db.traders["5a7c2eca46aef81a7ca2145d"]; + mechanic.assort.items.push({ "_id": item, "_tpl": item, "parentId": "hideout", @@ -62,4 +105,5 @@ class Mod implements IPostAkiLoadMod, IPostDBLoadMod } } + module.exports = { mod: new Mod() } \ No newline at end of file