Fixed scav case never giving unarmored rigs as a reward
This commit is contained in:
parent
7b557a31ad
commit
cdec8729aa
@ -314,7 +314,7 @@ export class ScavCaseRewardGenerator
|
||||
}
|
||||
// Armor or weapon = use default preset from globals.json
|
||||
else if (
|
||||
this.itemHelper.armorItemCanHoldMods(rewardItemDb._id)
|
||||
this.itemHelper.armorItemHasRemovableOrSoftInsertSlots(rewardItemDb._id)
|
||||
|| this.itemHelper.isOfBaseclass(rewardItemDb._id, BaseClasses.WEAPON)
|
||||
)
|
||||
{
|
||||
|
@ -106,6 +106,21 @@ export class ItemHelper
|
||||
return this.isOfBaseclasses(itemTpl, [BaseClasses.HEADWEAR, BaseClasses.VEST, BaseClasses.ARMOR]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the provided item tpl need soft/removable inserts to function
|
||||
* @param itemTpl Armor item
|
||||
* @returns True if item needs some kind of insert
|
||||
*/
|
||||
public armorItemHasRemovableOrSoftInsertSlots(itemTpl: string): boolean
|
||||
{
|
||||
if (!this.armorItemCanHoldMods(itemTpl))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (this.armorItemHasRemovablePlateSlots(itemTpl) || this.itemRequiresSoftInserts(itemTpl));
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the pased in tpl have ability to hold removable plate items
|
||||
* @param itemTpl item tpl to check for plate support
|
||||
|
Loading…
Reference in New Issue
Block a user