PhilippeKr / TorchLight

Slightly enhanced Torch and Light Module for Foundry VTT, based on the excellent work of RealDeuce on the Torch Module.
4 stars 18 forks source link

Lantern Names #19

Open veejaypee opened 3 years ago

veejaypee commented 3 years ago

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

FranboLobo commented 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.

PalaNolho commented 3 years ago

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?

FranboLobo commented 3 years ago

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.