remove bonded feature logic and unused imports from ikonis-sheet.js

This commit is contained in:
CPTN Cosmo 2026-04-26 19:04:02 +02:00
parent e21e66d6c2
commit a421950b3e

View file

@ -1,4 +1,4 @@
import { getAugments, getSlotCount, getAttachedFeature } from './ikonis-data.js'; import { getAugments, getSlotCount } from './ikonis-data.js';
/** /**
* Patches the Daggerheart Weapon sheet to include the Ikonis tab. * Patches the Daggerheart Weapon sheet to include the Ikonis tab.
@ -26,8 +26,6 @@ export function patchIkonisSheet() {
} }
// 2. Add the Motherboard Part to PARTS // 2. Add the Motherboard Part to PARTS
// We REMOVE the 'tab' property here to prevent Foundry from automatically hiding it
// instead, we will handle visibility in the template.
if (!Weapon.PARTS.motherboard) { if (!Weapon.PARTS.motherboard) {
Weapon.PARTS.motherboard = { Weapon.PARTS.motherboard = {
template: 'modules/dh-ikonis/templates/ikonis-motherboard.hbs', template: 'modules/dh-ikonis/templates/ikonis-motherboard.hbs',
@ -56,17 +54,9 @@ export function patchIkonisSheet() {
processedAugments.push({ ...base, installed: true }); processedAugments.push({ ...base, installed: true });
} }
const bondedUuid = doc.getFlag('dh-ikonis', 'bondedFeatureUuid') || game.settings.get('dh-ikonis', 'defaultBondedUuid');
const bonded = { enabled: true, feature: null };
if (bondedUuid) {
const item = await getAttachedFeature(bondedUuid);
if (item) bonded.feature = { name: item.name, img: item.img, uuid: item.uuid };
}
context.ikonis = { context.ikonis = {
enabled: true, enabled: true,
augments: processedAugments, augments: processedAugments,
bonded: bonded,
isGM: game.user?.isGM || false isGM: game.user?.isGM || false
}; };