v1.5.3 including new recoil tweaks, and the ability to wear both armor, and armor vests.
This commit is contained in:
parent
2c37fd2276
commit
1a80b7b26e
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"armorPlusArmorVests": false,
|
||||||
|
|
||||||
"armorMaterials":
|
"armorMaterials":
|
||||||
{
|
{
|
||||||
"uhmwpe":
|
"uhmwpe":
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export interface ArmorConfig
|
export interface ArmorConfig
|
||||||
{
|
{
|
||||||
|
armorPlusArmorVests: boolean
|
||||||
armorMaterials: Armor
|
armorMaterials: Armor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export interface WeaponsConfig
|
export interface WeaponsConfig
|
||||||
{
|
{
|
||||||
malfunctions: Malfunctions
|
malfunctions: Malfunctions
|
||||||
|
recoilTweaks: boolean
|
||||||
smgInHolsters: boolean
|
smgInHolsters: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,5 +8,6 @@
|
|||||||
"slide": false
|
"slide": false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"recoilTweaks": true,
|
||||||
"smgInHolsters": false
|
"smgInHolsters": false
|
||||||
}
|
}
|
10
src/armor.ts
10
src/armor.ts
@ -28,7 +28,15 @@ export class Armor
|
|||||||
const ceramic = this.modConfig.armorMaterials.ceramic;
|
const ceramic = this.modConfig.armorMaterials.ceramic;
|
||||||
const glass = this.modConfig.armorMaterials.glass;
|
const glass = this.modConfig.armorMaterials.glass;
|
||||||
const armor = this.tables.getTables().globals.config.ArmorMaterials;
|
const armor = this.tables.getTables().globals.config.ArmorMaterials;
|
||||||
|
|
||||||
|
if (mod.armorPlusArmorVests)
|
||||||
|
{
|
||||||
|
const armors = this.tables.getTables().templates.items;
|
||||||
|
for (const armor in armors)
|
||||||
|
{
|
||||||
|
armors[armor]._props.BlocksArmorVest = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (uhmwpe.destructibility != 0.45 || uhmwpe.minRepairDegradation != 0.01 || uhmwpe.maxRepairDegradation != 0.03
|
if (uhmwpe.destructibility != 0.45 || uhmwpe.minRepairDegradation != 0.01 || uhmwpe.maxRepairDegradation != 0.03
|
||||||
|| uhmwpe.explosionDestructibility != 0.4 || uhmwpe.minRepairKitDegradation != 0.005 || uhmwpe.maxRepairKitDegradation != 0.025)
|
|| uhmwpe.explosionDestructibility != 0.4 || uhmwpe.minRepairKitDegradation != 0.005 || uhmwpe.maxRepairKitDegradation != 0.025)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WeaponsConfig } from "../config/ts/weapons";
|
import { WeaponsConfig } from "../config/ts/weapons";
|
||||||
|
import { GlobalsConfig } from "../config/ts/globals;
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Weapons
|
export class Weapons
|
||||||
@ -19,6 +20,7 @@ export class Weapons
|
|||||||
{
|
{
|
||||||
const mod = this.modConfig;
|
const mod = this.modConfig;
|
||||||
this.weapons = this.tables.getTables().templates.items;
|
this.weapons = this.tables.getTables().templates.items;
|
||||||
|
const global = this.tables.getTables().globals;
|
||||||
|
|
||||||
if (mod.malfunctions.overheat || mod.malfunctions.jam || mod.malfunctions.slide || mod.malfunctions.misfeed || mod.malfunctions.misfire)
|
if (mod.malfunctions.overheat || mod.malfunctions.jam || mod.malfunctions.slide || mod.malfunctions.misfeed || mod.malfunctions.misfire)
|
||||||
{
|
{
|
||||||
@ -26,6 +28,12 @@ export class Weapons
|
|||||||
this.logger.info("Weapon Malfunctions Patched");
|
this.logger.info("Weapon Malfunctions Patched");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mod.recoilTweaks)
|
||||||
|
{
|
||||||
|
this.recoilTweaks();
|
||||||
|
this.logger.info("Weapon Recoil has been tweaked");
|
||||||
|
}
|
||||||
|
|
||||||
if (mod.smgInHolsters)
|
if (mod.smgInHolsters)
|
||||||
{
|
{
|
||||||
this.smgInHolsters();
|
this.smgInHolsters();
|
||||||
@ -72,6 +80,36 @@ export class Weapons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private recoilTweaks(): void
|
||||||
|
{
|
||||||
|
const weapons = this.tables.getTables().templates.items;
|
||||||
|
const globals = this.tables.getTables().globals.config;
|
||||||
|
|
||||||
|
for (let weapon in weapons) {
|
||||||
|
let fileData = weapons[weapon];
|
||||||
|
if (fileData._props.weapClass != null && fileData._props.weapClass !== undefined)
|
||||||
|
{
|
||||||
|
if (fileData._props.weapClass !== "pistol")
|
||||||
|
{
|
||||||
|
fileData._props.CameraRecoil *= 0.25;
|
||||||
|
fileData._props.CameraSnap = 3.5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fileData._props.CameraRecoil *= 0.45;
|
||||||
|
fileData._props.CameraSnap = 3.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
globals.Aiming.RecoilCrank = true;
|
||||||
|
globals.Aiming.AimProceduralIntensity = 0.7;
|
||||||
|
globals.Aiming.RecoilHandDamping = 0.6;
|
||||||
|
globals.Aiming.RecoilDamping = 0.5;
|
||||||
|
globals.Aiming.RecoilConvergenceMult *= 5;
|
||||||
|
globals.Aiming.RecoilVertBonus = 30;
|
||||||
|
globals.Aiming.RecoilBackBonus = 80;
|
||||||
|
}
|
||||||
|
|
||||||
private smgInHolsters(): void
|
private smgInHolsters(): void
|
||||||
{
|
{
|
||||||
for (const weaponId in this.weapons)
|
for (const weaponId in this.weapons)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user