feat: add seedIkonisHomebrew function to automatically populate default augment blueprints into Daggerheart Homebrew settings

This commit is contained in:
CPTN Cosmo 2026-04-26 19:25:16 +02:00
parent 6cfadbc1ac
commit e77007a29b
2 changed files with 49 additions and 3 deletions

View file

@ -1,4 +1,4 @@
import { patchDHWeapon, patchIkonisLogic, patchDhCharacter } from './ikonis-data.js';
import { patchDHWeapon, patchIkonisLogic, patchDhCharacter, seedIkonisHomebrew } from './ikonis-data.js';
import { patchIkonisSheet } from './ikonis-sheet.js';
const MODULE_ID = 'dh-ikonis';
@ -61,8 +61,13 @@ Hooks.on('setup', () => {
Hooks.once('ready', async () => {
console.log(`${MODULE_ID} | Ready.`);
if (game.user.isGM && game.settings.get(MODULE_ID, "enableCurrencyOverride")) {
await overrideCurrency();
if (game.user.isGM) {
// Seed default Ikonis features into native Homebrew if missing
await seedIkonisHomebrew();
if (game.settings.get(MODULE_ID, "enableCurrencyOverride")) {
await overrideCurrency();
}
}
const DhCharacter = game.system.api?.models?.actors?.DhCharacter || CONFIG.Actor.dataModels?.character;