Added The ability to have enhancements on armored rigs and helmets. (!200)

Added the vest and headwear classes to be eligible for armor enhancement

Co-authored-by: Snow <Notarealemail@email.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/200
Co-authored-by: snowythefox811 <snowythefox811@noreply.dev.sp-tarkov.com>
Co-committed-by: snowythefox811 <snowythefox811@noreply.dev.sp-tarkov.com>
This commit is contained in:
snowythefox811 2024-01-18 09:04:45 +00:00 committed by chomp
parent 28cd6903ef
commit 35eb9feebf
2 changed files with 68 additions and 2 deletions

View File

@ -52,6 +52,72 @@
}
}
},
"vest": {
"rarityWeight": {
"common": 5,
"rare": 1
},
"bonusTypeWeight": {
"DamageReduction": 1
},
"common": {
"DamageReduction": {
"valuesMinMax": {
"min": 0.9,
"max": 0.98
},
"activeDurabilityPercentMinMax": {
"min": 75,
"max": 90
}
}
},
"rare": {
"DamageReduction": {
"valuesMinMax": {
"min": 0.8,
"max": 0.9
},
"activeDurabilityPercentMinMax": {
"min": 75,
"max": 90
}
}
}
},
"headwear": {
"rarityWeight": {
"common": 5,
"rare": 1
},
"bonusTypeWeight": {
"DamageReduction": 1
},
"common": {
"DamageReduction": {
"valuesMinMax": {
"min": 0.9,
"max": 0.98
},
"activeDurabilityPercentMinMax": {
"min": 75,
"max": 90
}
}
},
"rare": {
"DamageReduction": {
"valuesMinMax": {
"min": 0.8,
"max": 0.9
},
"activeDurabilityPercentMinMax": {
"min": 75,
"max": 90
}
}
}
},
"weapon": {
"rarityWeight": {
"common": 5,

View File

@ -442,7 +442,7 @@ export class RepairService
if (this.shouldBuffItem(repairDetails, pmcData))
{
if (this.itemHelper.isOfBaseclasses(repairDetails.repairedItem._tpl, [BaseClasses.ARMOR, BaseClasses.VEST]))
if (this.itemHelper.isOfBaseclasses(repairDetails.repairedItem._tpl, [BaseClasses.ARMOR, BaseClasses.VEST, BaseClasses.HEADWEAR]))
{
const armorConfig = this.repairConfig.repairKit.armor;
this.addBuff(armorConfig, repairDetails.repairedItem);
@ -541,7 +541,7 @@ export class RepairService
*/
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes
{
if (this.itemHelper.isOfBaseclass(itemTemplate._id, BaseClasses.ARMOR))
if (this.itemHelper.isOfBaseclasses(itemTemplate._id, [BaseClasses.ARMOR, BaseClasses.VEST, BaseClasses.HEADWEAR]))
{
if (itemTemplate._props.ArmorType === "Light")
{