Protected randomiseArmorInsertsDurabilities()
from missing mod errors
(cherry picked from commit 64f8e7b7e88aea84f4864f078775200178a84a88)
This commit is contained in:
parent
648bce9529
commit
de4b3ac180
@ -1257,7 +1257,14 @@ export class FenceService
|
|||||||
// Find items mod to apply dura changes to
|
// Find items mod to apply dura changes to
|
||||||
const modItemToAdjust = armorItemAndMods
|
const modItemToAdjust = armorItemAndMods
|
||||||
.find((mod) => mod.slotId!.toLowerCase() === plateSlot._name.toLowerCase());
|
.find((mod) => mod.slotId!.toLowerCase() === plateSlot._name.toLowerCase());
|
||||||
this.itemHelper.addUpdObjectToItem(modItemToAdjust!);
|
|
||||||
|
if (!modItemToAdjust)
|
||||||
|
{
|
||||||
|
this.logger.warning(`Unable to randomise armor items ${armorItemAndMods[0]._tpl} ${plateSlot._name} slot as it cannot be found, skipping`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.itemHelper.addUpdObjectToItem(modItemToAdjust);
|
||||||
|
|
||||||
if (!modItemToAdjust?.upd?.Repairable)
|
if (!modItemToAdjust?.upd?.Repairable)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user