When generating armors for static loot, try and use default preset first before generating randomly
This commit is contained in:
parent
1101927768
commit
cb10ec4148
@ -1092,6 +1092,19 @@ export class LocationGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (this.itemHelper.armorItemCanHoldMods(chosenTpl))
|
else if (this.itemHelper.armorItemCanHoldMods(chosenTpl))
|
||||||
|
{
|
||||||
|
const defaultPreset = this.presetHelper.getDefaultPreset(chosenTpl);
|
||||||
|
if (defaultPreset)
|
||||||
|
{
|
||||||
|
const presetAndMods: Item[] = this.itemHelper.replaceIDs(
|
||||||
|
null,
|
||||||
|
this.jsonUtil.clone(defaultPreset._items),
|
||||||
|
);
|
||||||
|
this.itemHelper.remapRootItemId(presetAndMods);
|
||||||
|
|
||||||
|
items = presetAndMods;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// We make base item above, at start of function, no need to do it here
|
// We make base item above, at start of function, no need to do it here
|
||||||
if (itemTemplate._props.Slots?.length > 0)
|
if (itemTemplate._props.Slots?.length > 0)
|
||||||
@ -1103,6 +1116,7 @@ export class LocationGenerator
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return { items: items, width: width, height: height };
|
return { items: items, width: width, height: height };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user