Fix armor plates/visors/helmet plate inserts not having thier durability altered on ragfair

This commit is contained in:
Dev 2024-01-14 22:28:53 +00:00
parent f15a2ff71d
commit 2f07d6083f
2 changed files with 21 additions and 2 deletions

View File

@ -134,6 +134,12 @@
"min": 0.05, "min": 0.05,
"max": 1 "max": 1
}, },
"644120aa86ffbe10ee032b6f": {
"_name": "ARMOR_PLATE",
"conditionChance": 0.45,
"min": 0.2,
"max": 1
},
"543be6674bdc2df1348b4569": { "543be6674bdc2df1348b4569": {
"_name": "FOOD_DRINK", "_name": "FOOD_DRINK",
"conditionChance": 0.05, "conditionChance": 0.05,
@ -145,6 +151,18 @@
"conditionChance": 0.12, "conditionChance": 0.12,
"min": 0.7, "min": 0.7,
"max": 0.99 "max": 0.99
},
"5a341c4686f77469e155819e": {
"_name": "FACECOVER",
"conditionChance": 0.32,
"min": 0.6,
"max": 1
},
"5448e5724bdc2ddf718b4568": {
"_name": "VISORS",
"conditionChance": 0.32,
"min": 0.7,
"max": 1
} }
}, },
"stackablePercent": { "stackablePercent": {

View File

@ -592,8 +592,9 @@ export class RagfairOfferGenerator
itemConditionValues.max, itemConditionValues.max,
); );
// Randomise armor // Randomise armor + plates + armor related things
if (this.itemHelper.armorItemCanHoldMods(rootItem._tpl)) if (this.itemHelper.armorItemCanHoldMods(rootItem._tpl)
|| this.itemHelper.isOfBaseclasses(rootItem._tpl, [BaseClasses.ARMOR_PLATE, BaseClasses.ARMORED_EQUIPMENT]))
{ {
// Chance to not adjust armor // Chance to not adjust armor
if (!this.randomUtil.getChance100(this.ragfairConfig.dynamic.condition[BaseClasses.ARMORED_EQUIPMENT].conditionChance * 100)) if (!this.randomUtil.getChance100(this.ragfairConfig.dynamic.condition[BaseClasses.ARMORED_EQUIPMENT].conditionChance * 100))