jbhaywood / 5e-statblock-importer

A module for FoundryVTT that creates a new actor from any 5e monster or NPC statblock.
MIT License
18 stars 12 forks source link

First Sense on a creature fails after initial import #84

Closed MaxPat931 closed 7 months ago

MaxPat931 commented 7 months ago

The first sense on a creature is only imported the first time you use the importer, any subsequent imports after that always drop the first sense, requiring a refresh.

SenseDrop.webm

I havent been able to make progress on this one, but I suspect it has to do with setSenses?

https://github.com/jbhaywood/5e-statblock-importer/blob/87d629b5ad03f3137365cb2dfcd9d7573e694590/scripts/sbiParser.js#L423-L441

jbhaywood commented 7 months ago

This is definitely weird. I can't think of why it would be happening since it's not like we're saving any data from on run to another, unless it's accidental somewhere. But I think we're creating new objects every time.