diff --git a/scripts/module.js b/scripts/module.js index a3b3a3f..eccad62 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -35,26 +35,19 @@ Hooks.once('init', () => { type: String, choices: { "none": "None", - "default": "Default", - "fire": "Fire", - "ice": "Ice", - "force": "Force", - "lightning": "Lightning", - "magic": "Magic", - "stars": "Stars", - "thunder": "Thunder" + "WhiteGlow": "White Glow", + "Darkness": "Darkness", + "GlassImpact": "Glass Impact", + "Confetti": "Confetti", + "DoubleSpirals": "Double Spirals", + "Blaze": "Blaze", + "MagicVortex": "Magic Vortex" }, - default: 'default' - }); - - // Check if DSN is ready and log effects - Hooks.once('diceSoNiceReady', (dice3d) => { - console.log('DSN Ready. Helper:', dice3d); - const sfxModes = dice3d.getSFXModes(); - console.log('DSN SFX Modes:', sfxModes); + default: 'Blaze' }); }); + // Hook to handle conditional settings in the UI Hooks.on('renderSettingsConfig', (app, html, data) => { // Search for our specific inputs with safer selectors (ending with key) @@ -208,29 +201,20 @@ Hooks.on('renderChatMessageHTML', (message, html, data) => { // Hook into DiceSoNice to trigger effects Hooks.on('diceSoNiceRollStart', (messageId, context) => { - console.log('DSN Hook Fired', messageId, context); const roll = context.roll; if (!roll) return; if (isCriticalHit(roll)) { - console.log('DSN: Critical Hit Detected'); const effect = game.settings.get('dh-immersive-crits', 'dsnCritEffect'); - console.log('DSN Effect Setting:', effect); if (effect && effect !== 'none') { - const effectName = effect === 'default' ? 'Stars' : capitalize(effect); - console.log('DSN Applying Effect Name:', effectName); - // Function to apply effect to a die/term const applyEffect = (term) => { if (!term.options) term.options = {}; - // Try both id (for presets) and specialEffect (for classes) to be safe, - // based on different DSN versions/styles. - // 'Stars', 'Fire', etc are likely registered system effects. + // 'effect' key from settings is now the direct Class Name (PascalCase) term.options.sfx = { - specialEffect: effectName + specialEffect: effect }; - console.log('Applied sfx to term:', term, term.options.sfx); }; // Check if roll.dice exists and has elements @@ -238,7 +222,6 @@ Hooks.on('diceSoNiceRollStart', (messageId, context) => { roll.dice.forEach(die => applyEffect(die)); } else { // Determine if we need to iterate terms for Duality Rolls - console.log('No roll.dice found. Checking terms:', roll.terms); if (roll.terms) { roll.terms.forEach(term => { if (term.faces) { // It's a die @@ -248,8 +231,6 @@ Hooks.on('diceSoNiceRollStart', (messageId, context) => { } } } - } else { - console.log('DSN: Not a Critical Hit'); } });