explicitly override feature clone UUIDs to ensure correct system identification
This commit is contained in:
parent
81a267b228
commit
68f8d5104c
1 changed files with 4 additions and 2 deletions
|
|
@ -161,9 +161,10 @@ export function patchDhCharacter(DhCharacter) {
|
||||||
if (bondedUuid) {
|
if (bondedUuid) {
|
||||||
const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid);
|
const feature = _featureCache.get(bondedUuid) || fromUuidSync(bondedUuid);
|
||||||
if (feature) {
|
if (feature) {
|
||||||
// Use constructor to ensure compatibility
|
// Use constructor and override UUID so system can find it for descriptions
|
||||||
const ItemClass = getDocumentClass("Item");
|
const ItemClass = getDocumentClass("Item");
|
||||||
const featureClone = new ItemClass(feature.toObject(), { parent: this.parent });
|
const featureClone = new ItemClass(feature.toObject(), { parent: this.parent });
|
||||||
|
Object.defineProperty(featureClone, "uuid", { value: feature.uuid, enumerable: false });
|
||||||
ikonisFeatures.push(featureClone);
|
ikonisFeatures.push(featureClone);
|
||||||
console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`);
|
console.log(`DH-Ikonis | Resolved bonded feature: ${feature.name}`);
|
||||||
}
|
}
|
||||||
|
|
@ -180,9 +181,10 @@ export function patchDhCharacter(DhCharacter) {
|
||||||
|
|
||||||
const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid);
|
const feature = _featureCache.get(aug.featureUuid) || fromUuidSync(aug.featureUuid);
|
||||||
if (feature) {
|
if (feature) {
|
||||||
// Use constructor to ensure compatibility
|
// Use constructor and override UUID so system can find it for descriptions
|
||||||
const ItemClass = getDocumentClass("Item");
|
const ItemClass = getDocumentClass("Item");
|
||||||
const featureClone = new ItemClass(feature.toObject(), { parent: this.parent });
|
const featureClone = new ItemClass(feature.toObject(), { parent: this.parent });
|
||||||
|
Object.defineProperty(featureClone, "uuid", { value: feature.uuid, enumerable: false });
|
||||||
ikonisFeatures.push(featureClone);
|
ikonisFeatures.push(featureClone);
|
||||||
console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`);
|
console.log(`DH-Ikonis | Resolved augment feature: ${feature.name}`);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue