explicitly override feature clone UUIDs to ensure correct system identification

This commit is contained in:
CPTN Cosmo 2026-04-26 18:12:01 +02:00
parent 81a267b228
commit 68f8d5104c

View file

@ -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}`);
} }