Drop tmp/js folder
This commit is contained in:
parent
d3d1ef149e
commit
efe6e7ab1e
@ -1,45 +0,0 @@
|
||||
/*import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Airdrop
|
||||
{
|
||||
private modConfig = require("../config/config.jsonc");
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private airdropConfig: IAirdropConfig;
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
this.airdropConfig = airdropConfig;
|
||||
}
|
||||
|
||||
public updateAirdrops();
|
||||
{
|
||||
if (this.modConfig.airdropChancePercent != 25)
|
||||
{
|
||||
this.airdropChance();
|
||||
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}`);
|
||||
}
|
||||
}
|
||||
|
||||
private airdropChance();
|
||||
{
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
@ -1,259 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Ammo = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Ammo {
|
||||
constructor(logger, databaseServer) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
}
|
||||
updateAmmo() {
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.ammo);
|
||||
/**
|
||||
* Grenade Launcher Ammo Max Stacks
|
||||
*
|
||||
* 5ede475b549eed7c6d5c18fb = M386 (HE) grenade
|
||||
* 5ede475339ee016e8c534742 = M576 (MP-APERS) grenade
|
||||
* 5f0c892565703e5c461894e9 = M433 (HEDP) grenade
|
||||
* 5ede4739e0350d05467f73e8 = M406 (HE) grenade
|
||||
* 5ede474b0c226a66f5402622 = M381 (HE) grenade
|
||||
* 5ede47405b097655935d7d16 = M441 (HE) grenade
|
||||
*/
|
||||
if (this.modConfig.ammoStacks.grenadeCartridges != 1) {
|
||||
const itemArray = ["5ede475b549eed7c6d5c18fb", "5ede475339ee016e8c534742", "5f0c892565703e5c461894e9", "5ede4739e0350d05467f73e8", "5ede474b0c226a66f5402622", "5ede47405b097655935d7d16"];
|
||||
for (const id in itemArray) {
|
||||
items[id]._props.StackMaxSize = mod.ammoStacks.grenadeCartridges;
|
||||
this.logger.info(`Grenade Cartridges Max Stacks set to ${mod.ammoStacks.grenadeCartridges}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Marksman Caliber Ammo Max Stacks // 17
|
||||
*
|
||||
* 5a608bf24f39f98ffc77720e = 7.62x51 M62 Tracer // 7
|
||||
* 58dd3ad986f77403051cba8f = M80
|
||||
* 5a6086ea4f39f99cd479502f = M61
|
||||
* 5e023e53d4353e3302577c4c = BCP FMJ
|
||||
* 5e023e88277cce2b522ff2b1 = Ultra Nosler
|
||||
* 5e023e6e34d52a55c3304f71 = TCW SP
|
||||
* 5e023e6e34d52a55c3304f71 = M993
|
||||
*
|
||||
* 560d61e84bdc2da74d8b4571 = 7.62x54 R SNB gzh // 6
|
||||
* 5887431f2459777e1612938f = R LPS gzh
|
||||
* 59e77a2386f7742ee578960a = R PS gzh
|
||||
* 5e023cf8186a883be655e54f = T-46M gzh
|
||||
* 5e023d34e8a400319a28ed44 = BT gzh
|
||||
* 5e023d48186a883be655e551 = BS gzh
|
||||
*
|
||||
* 5fc382b6d6fa9c00c571bbc3 = .338 LM TAC-X // 4
|
||||
* 5fc382c1016cce60e8341b20 = UCW
|
||||
* 5fc382a9d724d907e2077dab = AP
|
||||
* 5fc275cf85fd526b824a571a = FMJ
|
||||
*/
|
||||
if (mod.ammoStacks.marksmanCartridges != 40) {
|
||||
const itemArray = ["5a608bf24f39f98ffc77720e", "58dd3ad986f77403051cba8f", "5a6086ea4f39f99cd479502f", "5e023e53d4353e3302577c4c", "5e023e88277cce2b522ff2b1", "5e023e6e34d52a55c3304f71",
|
||||
"5e023e6e34d52a55c3304f71", "560d61e84bdc2da74d8b4571", "5887431f2459777e1612938f", "59e77a2386f7742ee578960a", "5e023cf8186a883be655e54f", "5e023d34e8a400319a28ed44",
|
||||
"5e023d48186a883be655e551", "5fc382b6d6fa9c00c571bbc3", "5fc382c1016cce60e8341b20", "5fc382a9d724d907e2077dab", "5fc275cf85fd526b824a571a"];
|
||||
for (const id in itemArray) {
|
||||
items[id]._props.StackMaxSize = mod.ammoStacks.marksmanCartridges;
|
||||
this.logger.info(`Marksman Cartridges Max Stacks set to ${mod.ammoStacks.marksmanCartridges}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Pistol Caliber Ammo Max Stacks // 53
|
||||
*
|
||||
* 5ba26835d4351e0035628ff5 = 4.6x30mm AP SX // 4
|
||||
* 5ba26812d4351e003201fef1 = Action SX
|
||||
* 5ba2678ad4351e44f824b344 = FMJ SX
|
||||
* 5ba26844d4351e00334c9475 = Subsonic SX
|
||||
*
|
||||
* 5cc80f79e4a949033c7343b2 = 5.7x28mm SS198LF // 7
|
||||
* 5cc86832d7f00c000d3a6e6c = R37.F
|
||||
* 5cc80f38e4a949001152b560 = SS190
|
||||
* 5cc86840d7f00c002412c56c = R37.X
|
||||
* 5cc80f53e4a949000e1ea4f8 = L191
|
||||
* 5cc80f8fe4a949033b0224a2 = SS197SR
|
||||
* 5cc80f67e4a949035e43bbba = SB193
|
||||
*
|
||||
* 5735ff5c245977640e39ba7e = 7.62x25mm TT FMJ43 // 7
|
||||
* 573601b42459776410737435 = LRN
|
||||
* 5736026a245977644601dc61 = P gl
|
||||
* 573603562459776430731618 = Pst gzh
|
||||
* 573602322459776445391df1 = LRNPC
|
||||
* 5735fdcd2459776445391d61 = AKBS
|
||||
* 573603c924597764442bd9cb - PT gzh
|
||||
*
|
||||
* 5737218f245977612125ba51 = 9x18mm PM SP8 gzh // 14
|
||||
* 573719762459775a626ccbc1 = P gzh
|
||||
* 57371aab2459775a77142f22 = PstM gzh
|
||||
* 573720e02459776143012541 = RG028 gzh
|
||||
* 573718ba2459775a75491131 = BZhT gzh
|
||||
* 5737207f24597760ff7b25f2 = PM PSV
|
||||
* 57372140245977611f70ee91 = SP7 gzh
|
||||
* 573719df2459775a626ccbc2 = PBM gzh
|
||||
* 57371f8d24597761006c6a81 = PSO gzh
|
||||
* 5737201124597760fc4431f1 = Pst gzh
|
||||
* 57371f2b24597761224311f1 = PS gs PPO
|
||||
* 57371eb62459776125652ac1 = PRS gs
|
||||
* 57371e4124597760ff7b25f1 = PPT gzh
|
||||
* 57371b192459775a9f58a5e0 = PPe gzh
|
||||
*
|
||||
* 58864a4f2459770fcc257101 = 9x19mm PSO gzh // 8
|
||||
* 56d59d3ad2720bdb418b4577 = Pst gzh
|
||||
* 5c3df7d588a4501f290594e5 = Green tracer
|
||||
* 5c0d56a986f774449d5de529 = RIP
|
||||
* 5c925fa22e221601da359b7b = AP 6.3
|
||||
* 5a3c16fe86f77452b62de32a = Luger CCI
|
||||
* 5efb0da7a29a85116f6ea05f = PBP gzh
|
||||
* 5efb0e16aeb21837e749c7ff = Quakemaker
|
||||
*
|
||||
* 5a26abfac4a28232980eabff = 9x21mm P gzh // 4
|
||||
* 5a269f97c4a282000b151807 = PS gzh
|
||||
* 5a26ac06c4a282000c5a90a8 = PE gzh
|
||||
* 5a26ac0ec4a28200741e1e18 = BT gzh
|
||||
*
|
||||
* 62330b3ed4dc74626d570b95 = .357 Mag FMJ // 4
|
||||
* 62330bfadc5883093563729b = Hollow Point
|
||||
* 62330c40bdd19b369e1e53d1 = Soft Point
|
||||
* 62330c18744e5e31df12f516 = Jacket HP
|
||||
*
|
||||
* 5e81f423763d9f754677bf2e = .45 ACP Match FMJ // 5
|
||||
* 5efb0fc6aeb21837e749c801 = Hydra-Shok
|
||||
* 5efb0d4f4bc50b58e81710f3 = Lasermatch FMJ
|
||||
* 5efb0cabfb3e451d70735af5 = AP
|
||||
* 5ea2a8e200685063ec28c05a = RIP
|
||||
*/
|
||||
if (mod.ammoStacks.pistolCartridges != 50) {
|
||||
const itemArray = ["5ba26835d4351e0035628ff5", "5ba26812d4351e003201fef1", "5ba2678ad4351e44f824b344", "5ba26844d4351e00334c9475", "5cc80f79e4a949033c7343b2", "5cc86832d7f00c000d3a6e6c",
|
||||
"5cc80f38e4a949001152b560", "5cc86840d7f00c002412c56c", "5cc80f53e4a949000e1ea4f8", "5cc80f8fe4a949033b0224a2", "5cc80f67e4a949035e43bbba", "5735ff5c245977640e39ba7e",
|
||||
"573601b42459776410737435", "5736026a245977644601dc61", "573603562459776430731618", "573602322459776445391df1", "5735fdcd2459776445391d61", "573603c924597764442bd9cb",
|
||||
"5737218f245977612125ba51", "573719762459775a626ccbc1", "57371aab2459775a77142f22", "573720e02459776143012541", "573718ba2459775a75491131", "5737207f24597760ff7b25f2",
|
||||
"57372140245977611f70ee91", "573719df2459775a626ccbc2", "57371f8d24597761006c6a81", "5737201124597760fc4431f1", "57371f2b24597761224311f1", "57371eb62459776125652ac1", "57371e4124597760ff7b25f1", "57371b192459775a9f58a5e0",
|
||||
"58864a4f2459770fcc257101", "56d59d3ad2720bdb418b4577", "5c3df7d588a4501f290594e5", "5c0d56a986f774449d5de529", "5c925fa22e221601da359b7b", "5a3c16fe86f77452b62de32a",
|
||||
"5efb0da7a29a85116f6ea05f", "5efb0e16aeb21837e749c7ff", "5a26abfac4a28232980eabff", "5a269f97c4a282000b151807", "5a26ac06c4a282000c5a90a8", "5a26ac0ec4a28200741e1e18",
|
||||
"62330b3ed4dc74626d570b95", "62330bfadc5883093563729b", "62330c40bdd19b369e1e53d1", "62330c18744e5e31df12f516", "5e81f423763d9f754677bf2e", "5efb0fc6aeb21837e749c801",
|
||||
"5efb0d4f4bc50b58e81710f3", "5efb0cabfb3e451d70735af5", "5ea2a8e200685063ec28c05a"];
|
||||
for (const id in itemArray) {
|
||||
items[id]._props.StackMaxSize = mod.ammoStacks.pistolCartridges;
|
||||
this.logger.info(`Pistol Cartridges Max Stacks set to ${mod.ammoStacks.pistolCartridges}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Rifle Calibers Max Ammo Stacks // 47
|
||||
*
|
||||
* 56dff3afd2720bba668b4567 = 5.45x39mm PS gs // 13
|
||||
* 56dff421d2720b5f5a8b4567 = SP
|
||||
* 5c0d5e4486f77478390952fe = PPBS gs "Igolnik"
|
||||
* 56dff338d2720bbd668b4569 = PRS gs
|
||||
* 56dff061d2720bb5668b4567 = BT gs
|
||||
* 56dff4ecd2720b5f5a8b4568 = US gs
|
||||
* 56dfef82d2720bbd668b4567 = BP gs
|
||||
* 56dff216d2720bbd668b4568 = HP
|
||||
* 56dff026d2720bb8668b4567 = BS gs
|
||||
* 56dff4a2d2720bbd668b456a = T gs
|
||||
* 56dff2ced2720bb4668b4567 = PP gs
|
||||
* 56dff0bed2720bb0668b4567 = FMJ
|
||||
*
|
||||
* 59e68f6f86f7746c9f75e846 = 5.56x45mm M856 // 11
|
||||
* 59e6918f86f7746c9f75e849 = Mk255 Mod 0 (RRLP)
|
||||
* 59e690b686f7746c9f75e848 = M995
|
||||
* 54527ac44bdc2d36668b4567 = M855A1
|
||||
* 59e6906286f7746c9f75e847 = M856A1
|
||||
* 54527a984bdc2d4e668b4567 = M855
|
||||
* 59e6927d86f77411da468256 = HP
|
||||
* 59e6920f86f77411d82aa167 = FMJ
|
||||
* 5c0d5ae286f7741e46554302 = Warmage
|
||||
* 60194943740c5d77f6705eea = MK 318 Mod 0 (SOST)
|
||||
* 601949593ae8f707c4608daa = SSA AP
|
||||
*
|
||||
* 619636be6db0f2477964e710 = .300 Blackout M62 Tracer // 5
|
||||
* 5fbe3ffdf8b6a877a729ea82 = BCP FMJ
|
||||
* 5fd20ff893a8961fc660a954 = AP
|
||||
* 6196364158ef8c428c287d9f = V-Max
|
||||
* 6196365d58ef8c428c287da1 = Whisper
|
||||
*
|
||||
* 5656d7c34bdc2d9d198b4587 = 7.62x39mm PS gzh // 6
|
||||
* 59e4d3d286f774176a36250a = HP
|
||||
* 59e4d24686f7741776641ac7 = US gzh
|
||||
* 59e4cf5286f7741778269d8a = T-45M1 gzh
|
||||
* 59e0d99486f7744a32234762 = BP gzh
|
||||
* 601aa3d2b2bcb34913271e6d = MAI AP
|
||||
*
|
||||
* 57a0dfb82459774d3078b56c = 9x39mm SP-5 gs // 5
|
||||
* 5c0d688c86f77413ae3407b2 = BP gs
|
||||
* 57a0e5022459774d1673f889 = SP-6 gs
|
||||
* 5c0d668f86f7747ccb7f13b2 = SPP gs
|
||||
* 61962d879bb3d20b0946d385 = PAB-9 gs
|
||||
*
|
||||
* 59e6542b86f77411dc52a77a = .366 TKM FMJ // 4
|
||||
* 59e6658b86f77411d949b250 = Geksa
|
||||
* 59e655cb86f77411dc52a77b = EKO
|
||||
* 5f0596629e22f464da6bbdd9 = AP-M
|
||||
*
|
||||
* 5cadf6ddae9215051e1c23b2 = 12.7x55mm PS12 // 3
|
||||
* 5cadf6eeae921500134b2799 = PS12B
|
||||
* 5cadf6e5ae921500113bb973 = PS12A
|
||||
*/
|
||||
if (mod.ammoStacks.rifleCartridges != 60) {
|
||||
const itemArray = ["56dff3afd2720bba668b4567", "56dff421d2720b5f5a8b4567", "5c0d5e4486f77478390952fe", "56dff338d2720bbd668b4569", "56dff061d2720bb5668b4567", "56dff4ecd2720b5f5a8b4568",
|
||||
"56dfef82d2720bbd668b4567", "56dff216d2720bbd668b4568", "56dff026d2720bb8668b4567", "56dff4a2d2720bbd668b456a", "56dff2ced2720bb4668b4567", "56dff0bed2720bb0668b4567", "59e68f6f86f7746c9f75e846",
|
||||
"59e6918f86f7746c9f75e849", "59e690b686f7746c9f75e848", "54527ac44bdc2d36668b4567", "59e6906286f7746c9f75e847", "54527a984bdc2d4e668b4567", "59e6927d86f77411da468256", "59e6920f86f77411d82aa167",
|
||||
"5c0d5ae286f7741e46554302", "60194943740c5d77f6705eea", "601949593ae8f707c4608daa", "619636be6db0f2477964e710", "5fbe3ffdf8b6a877a729ea82", "5fd20ff893a8961fc660a954", "6196364158ef8c428c287d9f",
|
||||
"6196365d58ef8c428c287da1", "5656d7c34bdc2d9d198b4587", "59e4d3d286f774176a36250a", "59e4d24686f7741776641ac7", "59e4cf5286f7741778269d8a", "59e0d99486f7744a32234762", "601aa3d2b2bcb34913271e6d",
|
||||
"57a0dfb82459774d3078b56c", "5c0d688c86f77413ae3407b2", "57a0e5022459774d1673f889", "5c0d668f86f7747ccb7f13b2", "61962d879bb3d20b0946d385", "59e6542b86f77411dc52a77a", "59e6658b86f77411d949b250",
|
||||
"59e655cb86f77411dc52a77b", "5f0596629e22f464da6bbdd9", "5cadf6ddae9215051e1c23b2", "5cadf6eeae921500134b2799", "5cadf6e5ae921500113bb973"];
|
||||
for (const id in itemArray) {
|
||||
items[id]._props.StackMaxSize = mod.ammoStacks.rifleCartridges;
|
||||
this.logger.info(`Rifle Cartridges Max Stacks set to ${mod.ammoStacks.rifleCartridges}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Shotgun Cartridges Max Ammo Stacks // 28
|
||||
*
|
||||
* 560d5e524bdc2d25448b4571 = 12x70 7mm Buckshot // 16
|
||||
* 5d6e6806a4b936088465b17e = 8.5mm Magnum
|
||||
* 5c0d591486f7744c505b416f = RIP
|
||||
* 5d6e68c4a4b9361b93413f79 = .50 BMG Slug
|
||||
* 5d6e6772a4b936088465b17c = 5.25mm Buckshot
|
||||
* 5d6e67fba4b9361bc73bc779 = 6.5mm Express
|
||||
* 5d6e6911a4b9361bd5780d52 = Flechette
|
||||
* 5d6e68e6a4b9361c140bcfe0 = FTX Custom Lite slug
|
||||
* 5d6e68a8a4b9360b6c0d54e2 = AP-20 armor-piercing slug
|
||||
* 5d6e68dea4b9361bcc29e659 = Dual sabot slug
|
||||
* 5d6e689ca4b9361bc8618956 = Poleva-6u slug
|
||||
* 5d6e6891a4b9361bd473feea = Poleva 3 slug
|
||||
* 5d6e6869a4b9361c140bcfde = Grizzly 40 slug
|
||||
* 5d6e68d1a4b93622fe60e845 = SuperFormance HP slug
|
||||
* 5d6e68b3a4b9361bca7e50b5 = Copper Sabot Premier HP slug
|
||||
* 58820d1224597753c90aeb13 = lead slug
|
||||
*
|
||||
* 5a38ebd9c4a282000d722a5b = 20x70 7.5mm Buckshot // 8
|
||||
* 5d6e6a05a4b93618084f58d0 = Star slug
|
||||
* 5d6e69c7a4b9360b6c0d54e4 = 7.3mm buckshot
|
||||
* 5d6e6a5fa4b93614ec501745 = Devastator slug
|
||||
* 5d6e695fa4b936359b35d852 = 5.6mm buckshot
|
||||
* 5d6e6a42a4b9364f07165f52 = Poleva-6u slug
|
||||
* 5d6e6a53a4b9361bd473feec = Poleva-3 slug
|
||||
* 5d6e69b9a4b9361bc8618958 = 6.2mm buckshot
|
||||
*
|
||||
* 5e85a9a6eacf8c039e4e2ac1 = 23x75mm Shrapnel-10 buckshot // 4
|
||||
* 5f647f31b6238e5dd066e196 = Shrapnel-25 buckshot
|
||||
* 5e85a9f4add9fe03027d9bf1 = Zvezda flashbang round
|
||||
* 5e85aa1a988a8701445df1f5 = Barrikada slug
|
||||
*
|
||||
*/
|
||||
if (mod.ammoStacks.shotgunCartridges != 20) {
|
||||
const itemArray = ["560d5e524bdc2d25448b4571", "5d6e6806a4b936088465b17e", "5c0d591486f7744c505b416f", "5d6e68c4a4b9361b93413f79", "5d6e6772a4b936088465b17c", "5d6e67fba4b9361bc73bc779",
|
||||
"5d6e6911a4b9361bd5780d52", "5d6e68e6a4b9361c140bcfe0", "5d6e68a8a4b9360b6c0d54e2", "5d6e68dea4b9361bcc29e659", "5d6e689ca4b9361bc8618956", "5d6e6891a4b9361bd473feea",
|
||||
"5d6e6869a4b9361c140bcfde", "5d6e68d1a4b93622fe60e845", "5d6e68b3a4b9361bca7e50b5", "58820d1224597753c90aeb13", "5a38ebd9c4a282000d722a5b", "5d6e6a05a4b93618084f58d0",
|
||||
"5d6e69c7a4b9360b6c0d54e4", "5d6e6a5fa4b93614ec501745", "5d6e695fa4b936359b35d852", "5d6e6a42a4b9364f07165f52", "5d6e6a53a4b9361bd473feec", "5d6e69b9a4b9361bc8618958",
|
||||
"5e85a9a6eacf8c039e4e2ac1", "5f647f31b6238e5dd066e196", "5e85a9f4add9fe03027d9bf1", "5e85aa1a988a8701445df1f5"];
|
||||
for (const id in itemArray) {
|
||||
items[id]._props.StackMaxSize = mod.ammoStacks.shotgunCartridges;
|
||||
this.logger.info(`Shotgun Cartridges Max Stacks set to ${mod.ammoStacks.shotgunCartridges}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Ammo = Ammo;
|
@ -1,101 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Bots = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Bots {
|
||||
constructor(logger, databaseServer, botConfig) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.botConfig = botConfig;
|
||||
this.tables = databaseServer.getTables();
|
||||
}
|
||||
updateBots() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.bots);
|
||||
// Changes PMC difficulty to Easy, Normal, Hard, Impossible or AsOnline. Default AsOnline.
|
||||
if (mod.pmc.pmcDifficulty.toLowerCase() != "AsOnline") {
|
||||
this.botConfig.pmc.difficulty = mod.pmcDifficulty;
|
||||
this.logger.info(`PMC Bot Difficulty set to ${mod.pmcDifficulty}`);
|
||||
}
|
||||
// Enables common and secure containers to spawn on PMCs while additionally whitelisting the parent IDs. Rarity adjusted via PMC lootNValue. Default true.
|
||||
if (mod.pmc.containersOnPMCs) {
|
||||
this.containersOnPMCs();
|
||||
this.logger.info(`Containers On PMCs: ${mod.pmc.containersOnPMCs}`);
|
||||
}
|
||||
// Chance that PMC bot will be USEC or BEAR. Higher value means higher chance for the PMC to be USEC. Default is 50%
|
||||
if (mod.pmc.isUsec != 50) {
|
||||
this.botConfig.pmc.isUsec = mod.isUsec;
|
||||
this.logger.info(`PMC isUsec Chance is: ${mod.isUsec}`);
|
||||
}
|
||||
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
||||
if (mod.pmc.maxBackpackLootTotalRub != 150000
|
||||
|| mod.pmc.maxPocketLootTotalRub != 50000
|
||||
|| mod.pmc.maxVestLootTotalRub != 50000) {
|
||||
this.botConfig.pmc.maxBackpackLootTotalRub = mod.pmc.maxBackpackLootTotalRub;
|
||||
this.botConfig.pmc.maxPocketLootTotalRub = mod.pmc.maxPocketLootTotalRub;
|
||||
this.botConfig.pmc.maxVestLootTotalRub = mod.pmc.maxVestLootTotalRub;
|
||||
this.logger.info("PMC Loot Value totals changed!");
|
||||
this.logger.info(`Max Backpack Total Value: ${mod.pmc.maxBackpackLootTotalRub}`);
|
||||
this.logger.info(`Max Pocket Total Value: ${mod.pmc.maxPocketLootTotalRub}`);
|
||||
this.logger.info(`Max Vest Total Value: ${mod.pmc.maxVestLootTotalRub}`);
|
||||
}
|
||||
// Chance that the PMC bot of your side (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||
if (mod.pmc.chanceSameSideIsHostilePercent != 50) {
|
||||
this.botConfig.pmc.chanceSameSideIsHostilePercent = mod.pmc.chanceSameSideIsHostilePercent;
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${mod.pmc.chanceSameSideIsHostilePercent}`);
|
||||
}
|
||||
// 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}`);
|
||||
}
|
||||
if (mod.pmc.lootNValue != 1.7 || mod.scav.lootNValue != 2) {
|
||||
this.botConfig.lootNValue.scav = mod.scav.lootNValue;
|
||||
this.botConfig.lootNValue.pmc = mod.pmc.lootNValue;
|
||||
this.logger.info("Loot NValue for bots has been changed!");
|
||||
this.logger.info(`Scav lootNValue set to ${mod.scav.lootNValue}`);
|
||||
this.logger.info(`PMC lootNValue set to ${mod.pmc.lootNValue}`);
|
||||
}
|
||||
}
|
||||
containersOnPMCs() {
|
||||
const usec = this.tables.bots.types.usec.inventory.items.Backpack;
|
||||
const bear = this.tables.bots.types.bear.inventory.items.Backpack;
|
||||
usec.push(...this.containers());
|
||||
bear.push(...this.containers());
|
||||
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
||||
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
dynaLoot.push("5795f317245977243854e041");
|
||||
}
|
||||
containers() {
|
||||
/* 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
|
||||
* Ammunition case: 5aafbde786f774389d0cbc0f
|
||||
* Documents case: 590c60fc86f77412b13fddcf
|
||||
* Key tool: 59fafd4b86f7745ca07e123
|
||||
* Injector case: 619cbf7d23893217ec30b689
|
||||
* Dogtag case: 5c093e3486f77430cb02e593
|
||||
* Keycard holder: 619cbf9e0a7c3a1a2731940a
|
||||
* WZ Wallet: 60b0f6c058e0b0481a09ad11
|
||||
* Pistol case: 567143bf4bdc2d1a0f8b4567
|
||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||
* Kappa container: 5c093ca986f7740a1867ab12
|
||||
* Gamme container: 60b0f6c058e0b0481a09ad11
|
||||
*/
|
||||
const lootItems = ["5d235bb686f77443f4331278", "5c127c4486f7745625356c13", "59fb023c86f7746d0d4b423c", "5b6d9ce188a4501afc1b2b25", "59fb042886f7746c5005a7b2", "5c0a840b86f7742ffa4f2482",
|
||||
"59fb016586f7746d0d4b423a", "5c093db286f7740a1b2617e3", "5aafbcd986f7745e590fff23", "5b7c710788a4506dec015957", "5e2af55f86f7746d4159f07c", "5448bf274bdc2dfc2f8b456a", "5c093ca986f7740a1867ab12",
|
||||
"5aafbde786f774389d0cbc0f", "590c60fc86f77412b13fddcf", "59fafd4b86f7745ca07e1232", "619cbf7d23893217ec30b689", "619cbf9e0a7c3a1a2731940a", "5c093e3486f77430cb02e593", "60b0f6c058e0b0481a09ad11",
|
||||
"567143bf4bdc2d1a0f8b4567", "60b0f6c058e0b0481a09ad11", "59db794186f77448bc595262", "5857a8b324597729ab0a0e7d"];
|
||||
return lootItems;
|
||||
}
|
||||
}
|
||||
exports.Bots = Bots;
|
@ -1,56 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Flea = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Flea {
|
||||
constructor(logger, ragfairConfig, tables) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.ragfairConfig = ragfairConfig;
|
||||
this.tables = tables;
|
||||
}
|
||||
updateFlea() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(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");
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Flea = Flea;
|
@ -1,50 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Globals = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Globals {
|
||||
constructor(logger, databaseServer) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
}
|
||||
updateGlobals() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.globals);
|
||||
const global = this.databaseServer.getTables().globals;
|
||||
if (mod.damagePerMeter != 9 || mod.safeHeight != 3) {
|
||||
global.config.Health.Falling.DamagePerMeter = mod.damagePerMeter;
|
||||
global.config.Health.Falling.SafeHeight = mod.safeHeight;
|
||||
this.logger.info(`Safe Fall Height set to ${mod.safeHeight} meters`);
|
||||
this.logger.info(`Damage Per Meter set to ${mod.damagePerMeter} meters`);
|
||||
}
|
||||
if (mod.maxLoyaltyTraders) {
|
||||
global.config.MaxLoyaltyLevelForAll = mod.maxLoyaltyTraders;
|
||||
this.logger.info(`Max Loyalty Traders is: ${mod.maxLoyaltyTraders}`);
|
||||
}
|
||||
if (mod.timeBeforeDeployLocal != 10) {
|
||||
global.config.TimeBeforeDeployLocal = mod.timeBeforeDeployLocal;
|
||||
this.logger.info(`Time Before Deploy set to: ${mod.timeBeforeDeployLocal}`);
|
||||
}
|
||||
if (mod.match_end.survived_exp_requirement != 200 || mod.match_end.survived_seconds_requirement != 420 || mod.match_end.survived_exp_reward != 300
|
||||
|| mod.match_end.mia_exp_reward != 200 || mod.match_end.runner_exp_reward != 200 || mod.match_end.leftMult != 0
|
||||
|| mod.match_end.miaMult != 1 || mod.match_end.survivedMult != 1.3 || mod.match_end.runnerMult != 0.5
|
||||
|| mod.match_end.killedMult != 1 || mod.match_end.headShotMult != 1.2 || mod.match_end.expOnDamageAllHealth != 50) {
|
||||
const global1 = this.databaseServer.getTables().globals.config.exp.match_end;
|
||||
const mod = this.modConfig.globals.match_end;
|
||||
global1.survived_exp_requirement = mod.survived_exp_requirement;
|
||||
global1.survived_seconds_requirement = mod.survived_seconds_requirement;
|
||||
global1.survived_exp_reward = mod.survived_exp_reward;
|
||||
global1.mia_exp_reward = mod.mia_exp_reward;
|
||||
global1.runner_exp_reward = mod.runner_exp_reward;
|
||||
global1.leftMult = mod.leftMult;
|
||||
global1.miaMult = mod.miaMult;
|
||||
global1.survivedMult = mod.survivedMult;
|
||||
global1.runnerMult = mod.runnerMult;
|
||||
global1.killedMult = mod.killedMult;
|
||||
this.databaseServer.getTables().globals.config.exp.kill.headShotMult = mod.headShotMult;
|
||||
this.databaseServer.getTables().globals.config.exp.kill.expOnDamageAllHealth = mod.expOnDamageAllHealth;
|
||||
this.logger.info("Match End Globals Patched");
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Globals = Globals;
|
@ -1,56 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Hideout = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Hideout {
|
||||
constructor(logger, databaseServer) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
}
|
||||
updateHideout() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(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.databaseServer.getTables().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}`);
|
||||
}
|
||||
}
|
||||
updateConstructionTime() {
|
||||
for (const area of this.databaseServer.getTables().hideout.areas) {
|
||||
for (const stage in area.stages) {
|
||||
const stageData = area.stages[stage];
|
||||
stageData.constructionTime *= this.modConfig.hideout.constructionTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
updateProductionTime() {
|
||||
for (const production of this.databaseServer.getTables().hideout.production) {
|
||||
production.productionTime *= this.modConfig.hideout.productionTime;
|
||||
}
|
||||
}
|
||||
updateScavCase() {
|
||||
for (const scavCase of this.databaseServer.getTables().hideout.scavcase) {
|
||||
scavCase.ProductionTime *= this.modConfig.hideout.scavCaseTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Hideout = Hideout;
|
@ -1,27 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Insurance = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Insurance {
|
||||
constructor(logger, insuranceConfig) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.insuranceConfig = insuranceConfig;
|
||||
}
|
||||
updateInsurance() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Insurance = Insurance;
|
@ -1,102 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Items = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Items {
|
||||
constructor(logger, databaseServer) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
}
|
||||
updateItems() {
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.items);
|
||||
// Weight Modifier. Multiplier of Weight *= modConfig.weightModifier
|
||||
if (mod.weightModifier != 1) {
|
||||
this.updateWeight();
|
||||
this.logger.info(`Weight Multipler patched to ${mod.weightModifier}`);
|
||||
}
|
||||
// Removes the ExcludedFilter on Backpacks
|
||||
// which in turn enables common containers to spawn in the loot pool of AI.
|
||||
if (mod.removeBackpackFilter) {
|
||||
this.updateBackpacks();
|
||||
this.logger.info(`Backpack Restrictions Removed: ${mod.removeBackpackFilter}`);
|
||||
}
|
||||
// Standard Stash Size Changes
|
||||
if (mod.standardStash.vertical != 28 || mod.standardStash.horizontal != 10) {
|
||||
items["566abbc34bdc2d92178b4576"]._grids._props.cellsV = mod.standardStash.vertical;
|
||||
items["566abbc34bdc2d92178b4576"]._grids._props.cellsH = mod.standardStash.horizontal;
|
||||
this.logger.info(`Standard Stash Vertical changed to ${mod.standardStash.vertical}`);
|
||||
this.logger.info(`Standard Stash Horizontal changed to ${mod.tandardStash.horizontal}`);
|
||||
}
|
||||
// Left Behind Stash Size Changes
|
||||
if (mod.behindStash.vertical != 38 || mod.behindStash.horizontal != 10) {
|
||||
items["5811ce572459770cba1a34ea"]._grids._props.cellsV = mod.behindStash.vertical;
|
||||
items["5811ce572459770cba1a34ea"]._grids._props.cellsH = mod.behindStash.horizontal;
|
||||
this.logger.info(`Left Behind Stash Vertical changed to ${mod.behindStash.vertical}`);
|
||||
this.logger.info(`Left Behind Stash Horizontal changed to ${mod.behindStash.horizontal}`);
|
||||
}
|
||||
// Prepare for Escape Stash Size Changes
|
||||
if (mod.escapeStash.vertical != 48 || mod.escapeStash.horizontal != 10) {
|
||||
items["5811ce662459770f6f490f32"]._grids._props.cellsV = mod.escapeStash.vertical;
|
||||
items["5811ce662459770f6f490f32"]._grids._props.cellsH = mod.escapeStash.horizontal;
|
||||
this.logger.info(`Prepare for Escape Stash Vertical changed to ${mod.escapeStash.vertical}`);
|
||||
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${mod.escapeStash.horizontal}`);
|
||||
}
|
||||
// Edge of Darkness Stash Size Changes
|
||||
if (mod.eodStash.vertical != 68 || mod.eodStash.horizontal != 10) {
|
||||
items["5811ce772459770e9e5f9532"]._grids._props.cellsV = mod.eodStash.vertical;
|
||||
items["5811ce772459770e9e5f9532"]._grids._props.cellsH = mod.eodStash.horizontal;
|
||||
this.logger.info(`Edge of Darkness Stash Vertical changed to ${mod.eodStash.vertical}`);
|
||||
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${mod.eodStash.horizontal}`);
|
||||
}
|
||||
// Toggles true/false the Examined By Default config on all items in database/templates/items.json
|
||||
if (mod.examinedByDefault) {
|
||||
this.examinedByDefault();
|
||||
this.logger.info(`Examined By Default is ${mod.examinedByDefault}`);
|
||||
}
|
||||
// Roubles Max Stack
|
||||
if (mod.roublesMaxStack != 500000) {
|
||||
items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = mod.roublesMaxStack;
|
||||
this.logger.info(`Rouble Max Stack set to ${mod.roublesMaxStack}`);
|
||||
}
|
||||
// Dollars Max Stack
|
||||
if (mod.dollarsMaxStack != 50000) {
|
||||
items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = mod.dollarsMaxStack;
|
||||
this.logger.info(`Dollar Max Stack set to ${mod.dollarsMaxStack}`);
|
||||
}
|
||||
// Euros Max Stack
|
||||
if (mod.eurosMaxStack != 50000) {
|
||||
items["569668774bdc2da2298b4568"]._props.StackMaxSize = mod.eurosMaxStack;
|
||||
this.logger.info(`Euro Max Stack set to ${mod.eurosMaxStack}`);
|
||||
}
|
||||
}
|
||||
// Functions Functions.
|
||||
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||
updateWeight() {
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items) {
|
||||
if (item._props?.Weight) {
|
||||
item._props.Weight *= this.modConfig.items.weightModifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Updates backpacks and removes any values in the ExcludedFilter under props > Grids > props > filters > ExcludedFilter in database/templates/items.json
|
||||
updateBackpacks() {
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items) {
|
||||
if (item._parent === "5448e53e4bdc2d60728b4567") {
|
||||
for (const grid of item._props.Grids)
|
||||
grid._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.
|
||||
examinedByDefault() {
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items) {
|
||||
item._props.ExaminedByDefault = this.modConfig.items.examinedByDefault;
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Items = Items;
|
@ -1,32 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Locations = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Locations {
|
||||
constructor(logger, databaseServer) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
}
|
||||
updateLocations() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.locations);
|
||||
const maps = this.tables.locations;
|
||||
if (mod.allExtractsAvailable) {
|
||||
for (const map in maps) {
|
||||
if (map.toLowerCase() === "base") {
|
||||
continue;
|
||||
}
|
||||
const mapBase = this.tables.locations[map].base;
|
||||
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined) {
|
||||
continue;
|
||||
}
|
||||
for (const i in mapBase.exits) {
|
||||
const exit = mapBase[i];
|
||||
exit.Chance = 100;
|
||||
}
|
||||
}
|
||||
this.logger.info("All Extracts Are Available @ 100% Chance");
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Locations = Locations;
|
@ -1,99 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Loot = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Loot {
|
||||
constructor(logger, databaseServer, locationConfig) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.locationConfig = locationConfig;
|
||||
this.tables = databaseServer.getTables();
|
||||
}
|
||||
updateLoot() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(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.
|
||||
*/
|
||||
containersInMarkedRoom() {
|
||||
// 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());*/
|
||||
}
|
||||
containers() {
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
exports.Loot = Loot;
|
@ -1,51 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const ConfigTypes_1 = require("@spt-aki/models/enums/ConfigTypes");
|
||||
const ammo_1 = require("./ammo");
|
||||
const bots_1 = require("./bots");
|
||||
const flea_1 = require("./flea");
|
||||
const hideout_1 = require("./hideout");
|
||||
const items_1 = require("./items");
|
||||
const loot_1 = require("./loot");
|
||||
const raid_1 = require("./raid");
|
||||
const globals_1 = require("./globals");
|
||||
const insurance_1 = require("./insurance");
|
||||
//import { Airdrop } from "./airdrop";
|
||||
class ValensAIO {
|
||||
constructor() {
|
||||
this.modConfig = require("../config/config.json");
|
||||
}
|
||||
postDBLoad(container) {
|
||||
// get database from server
|
||||
this.logger = container.resolve("WinstonLogger");
|
||||
this.databaseServer = container.resolve("DatabaseServer");
|
||||
this.configServer = container.resolve("ConfigServer");
|
||||
this.locationConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.LOCATION);
|
||||
this.ragfairConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.RAGFAIR);
|
||||
this.botConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.BOT);
|
||||
this.tables = this.databaseServer.getTables();
|
||||
this.inRaidConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.IN_RAID);
|
||||
this.insuranceConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.INSURANCE);
|
||||
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
||||
//airdrop.updateAirdrops();
|
||||
const ammo = new ammo_1.Ammo(this.logger, this.databaseServer);
|
||||
ammo.updateAmmo();
|
||||
const bots = new bots_1.Bots(this.logger, this.databaseServer, this.botConfig);
|
||||
bots.updateBots();
|
||||
const flea = new flea_1.Flea(this.logger, this.ragfairConfig, this.tables);
|
||||
flea.updateFlea();
|
||||
const globals = new globals_1.Globals(this.logger, this.databaseServer);
|
||||
globals.updateGlobals();
|
||||
const hideout = new hideout_1.Hideout(this.logger, this.databaseServer);
|
||||
hideout.updateHideout();
|
||||
const insurance = new insurance_1.Insurance(this.logger, this.insuranceConfig);
|
||||
insurance.updateInsurance();
|
||||
const items = new items_1.Items(this.logger, this.databaseServer);
|
||||
items.updateItems();
|
||||
const loot = new loot_1.Loot(this.logger, this.databaseServer, this.locationConfig);
|
||||
loot.updateLoot();
|
||||
const raid = new raid_1.Raid(this.logger, this.databaseServer, this.inRaidConfig);
|
||||
raid.updateRaid();
|
||||
}
|
||||
}
|
||||
module.exports = { mod: new ValensAIO() };
|
@ -1,90 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Raid = void 0;
|
||||
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||
class Raid {
|
||||
constructor(logger, databaseServer, inRaidConfig) {
|
||||
this.modConfig = require("../config/config.json");
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
this.inRaidConfig = inRaidConfig;
|
||||
}
|
||||
updateRaid() {
|
||||
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.raid);
|
||||
if (mod.fixOpenZones) {
|
||||
this.fixOpenZones();
|
||||
this.logger.info(`Open Zones: ${mod.fixOpenZones}.`);
|
||||
}
|
||||
if (mod.chompiesBossFix) {
|
||||
this.chompiesBossFix();
|
||||
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`);
|
||||
}
|
||||
if (mod.timeLimit) {
|
||||
const maps = this.tables.locations;
|
||||
for (const map in maps) {
|
||||
if (this.tables.locations[map].base?.EscapeTimeLimit) {
|
||||
this.tables.locations[map].base.EscapeTimeLimit = this.modConfig.raid.timeLimit;
|
||||
}
|
||||
}
|
||||
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||
}
|
||||
if (mod.aiAmount.toLowerCase() != "asonline" || mod.aiDifficulty.toLowerCase() != "asonline" || mod.bossEnabled != true
|
||||
|| mod.scavWars != false || mod.taggedAndCursed != false || mod.enablePve != false) {
|
||||
const inRaidConfig = this.inRaidConfig;
|
||||
inRaidConfig.raidMenuSettings["aiAmount"] = mod.aiAmount;
|
||||
inRaidConfig.raidMenuSettings["aiDifficulty"] = mod.aiDifficulty;
|
||||
inRaidConfig.raidMenuSettings["bossEnabled"] = mod.bossEnabled;
|
||||
inRaidConfig.raidMenuSettings["scavWars"] = mod.scavWars;
|
||||
inRaidConfig.raidMenuSettings["taggedAndCursed"] = mod.taggedAndCursed;
|
||||
inRaidConfig.raidMenuSettings["enablePve"] = mod.enablePve;
|
||||
this.logger.info(`AI Amount set to ${mod.aiAmount}`);
|
||||
this.logger.info(`AI Difficulty set to ${mod.aiDifficulty}`);
|
||||
this.logger.info(`Boss Enabled set to ${mod.bossEnabled}`);
|
||||
this.logger.info(`Scav Wars set to ${mod.scavWars}`);
|
||||
this.logger.info(`Tagged And Cursed set to ${mod.taggedAndCursed}`);
|
||||
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||
}
|
||||
if (mod.carExtractBaseStandingGain != 0.25) {
|
||||
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||
}
|
||||
if (mod.scavExtractGain != 0.01) {
|
||||
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||
}
|
||||
}
|
||||
fixOpenZones() {
|
||||
const zones = {
|
||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneBlockPost,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||
"laboratory": "BotZoneFloor1,BotZoneFloor2,BotZoneBasement",
|
||||
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
||||
"woods": "ZoneRedHouse,ZoneWoodCutter,ZoneHouse,ZoneBigRocks,ZoneRoad,ZoneMiniHouse,ZoneScavBase2,ZoneBrokenVill,ZoneClearVill,ZoneHighRocks",
|
||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZonePassFar,ZonePassClose,ZoneTunnel,ZoneStartVillage,ZoneBunker,ZoneGreenHouses,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneForestTruck,ZoneForestSpawn,ZoneForestGasStation",
|
||||
"lighthouse": "Zone_TreatmentContainers,Zone_LongRoad,Zone_Blockpost,Zone_TreatmentBeach,Zone_Hellicopter,Zone_RoofContainers,Zone_Village,Zone_OldHouse,Zone_RoofRocks,Zone_DestroyedHouse,Zone_Chalet,Zone_SniperPeak,Zone_RoofBeach,Zone_Containers,Zone_TreatmentRocks,Zone_Rocks"
|
||||
};
|
||||
for (const location in zones) {
|
||||
this.tables.locations[location].base.OpenZones = zones[location];
|
||||
}
|
||||
}
|
||||
chompiesBossFix() {
|
||||
const labsBosses = this.tables.locations.laboratory.base.BossLocationSpawn;
|
||||
const reserveBosses = this.tables.locations.rezervbase.base.BossLocationSpawn;
|
||||
const spawn1 = labsBosses.find(x => x.TriggerId === "autoId_00008_EXFIL");
|
||||
if (spawn1) {
|
||||
spawn1.TriggerId = "00404";
|
||||
}
|
||||
const spawn2 = labsBosses.find(x => x.TriggerId === "autoId_00010_EXFIL");
|
||||
if (spawn2) {
|
||||
spawn2.TriggerId = "00409";
|
||||
}
|
||||
const spawn3 = reserveBosses.find(x => x.TriggerId === "00457");
|
||||
if (spawn3) {
|
||||
spawn3.TriggerId = "autoId_00632_EXFIL";
|
||||
}
|
||||
const spawn4 = reserveBosses.find(x => x.TriggerId === "00452");
|
||||
if (spawn4) {
|
||||
spawn4.TriggerId = "autoId_00000_D2_LEVER";
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Raid = Raid;
|
Loading…
x
Reference in New Issue
Block a user