Closed yahavatar closed 3 years ago
That's amazing, thank you. Sorry, I've had no time to look into it. Really appreciate it!
espositos, no problem. Please be aware that I'm not that familiar with all of the details of your code and did the best I could to get it working. I don't think my fixes are 100% stable, but they might be a start.
Thanks you so much for the work you have done! yah.
No, it's great just having an idea of what has changed.
I have pushed a patch based on your changes. If it's not working, let me know.
Unfortunately, I am seeing a few different errors now. It looks like it kind of works for creatures, but errors out on dnd5e-actions.js on line 633 then 851. Sorry if I'm creating issues for you...
yah.
I'm seeing failure to work for actors with a spell list, which this error message seems to indicate also:
dnd5e-actions.js:853 Uncaught (in promise) ReferenceError: getData is not defined
at dnd5e-actions.js:853
at Array.filter (
When enabling "Show Conditions Category", HUD stops working alltogether, and throws this errror:
Uncaught (in promise) TypeError: actor.effects.entries.some is not a function
at dnd5e-actions.js:633
at Array.forEach (
I got the module to work... Made the following changes. Lines numbers are approximate. Can't be 100% sure as there might have been blank lines that got deleted. The testing is not exhaustive, but I've been able to restore most all functionality that I was missing and I see no errors in the console anymore.
dnd5e-actions.js: line 260 was: let prep = s.data.preparation.mode; line 260 now: let prep = s.data.data.preparation.mode;
line 367 was: const activationType = f.data.activation.type; line 367 now: const activationType = f.data.data.activation.type;
line 560 was: const effects = actor.effects.entries; line 560 now: const effects = actor.effects;
line 621 was: const cssClass = actor.effects.entries.some(e => e.data.flags.core?.statusId === c.id) ? 'active' : ''; line 621 now: const cssClass = actor.effects.some(e => e.data.flags.core?.statusId === c.id) ? 'active' : '';
line 832 was: result = spells.filter(i => i.data.preparation.prepared || nonpreparableSpells.includes(i.data.preparation.mode) || i.data.level === 0) line 832 now: result = spells.filter(i => i.data.data.preparation.prepared || nonpreparableSpells.includes(i.data.data.preparation.mode) || i.data.data.level === 0)
line 834 was: result = spells.filter(i => i.data.preparation.prepared); line 834 now: result = spells.filter(i => i.data.data.preparation.prepared);
I do hope this helps a little. yah.