Open veejaypee opened 3 years ago
I was having the same issue with the additional problem of not knowing what the "correct" names of the items were. As a work-around changing the inventory names to "Lantern, Hooded" or "Lantern, Bullseye" or "Oil (flask)" works.
instead of hardcoding the name, why not simply refer to the name that is configured in the settings? That way it would be generic and work for anything no?
What if I have a strange flower that gives light like a lantern?
As far as I can tell the only configurable item is for the consumable for torch and lantern. I haven't tried changing the torch one, but changing the lantern one has no effect,
I don't believe the names of the lanterns that are acceptable are configured in the settings.
I do love this module. Just didn't figure out what item Name needed to be in the inventory for the Lanterns.
The item names "Lantern, Hooded" and "Lantern, Bullseye" as well as "Oil (flask)" are implemented in the dnd5e v7.9 compendiums as "Hooded Lantern" "Bullseye Lantern" and "Oil Flask"
Changing or adding the Strings does the trick!
if (noCheck || (hasItemInInventory("Oil (flask) || (hasItemInInventory("Oil Flask") && (hasItemInInventory("Lantern, Hooded") || (hasItemInInventory("Hooded Lantern") || hasItemInInventory("Lantern, Bullseye" || hasItemInInventory("Bullseye Lantern"))))
https://github.com/PhilippeKr/TorchLight/blob/0522f5a7750408bca6e459a231d1ffb9c9822b7f/torchlight.js#L333