death-save / maestro

Audio-focused QOL module for Foundry Virtual Tabletop
GNU General Public License v3.0
18 stars 17 forks source link

Make Item Track item-id detection more system agnostic #143

Closed eclarke12 closed 3 years ago

eclarke12 commented 3 years ago

Currently looks for data-item-id in the chat card html, which may not be present. Need to add additional implementations for other systems.

eclarke12 commented 3 years ago

At the moment I can't see a better way to handle this unless a system agnostic reference to the item is added to the ChatMessage. https://gitlab.com/foundrynet/foundryvtt/-/issues/5877

bdenne2 commented 3 years ago

Item tracks don't play in Call of Cthulhu (https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT). From my first look, it looks to be due to https://github.com/death-save/maestro/blob/009bf4d45295f48d8b2bd73af288057f1087850c/modules/item-track.js#L63 this system uses "data-actor-key" instead of "data-actor-id". Figured I'd pipe in since this is a system with a different actorId attribute instead of itemId.

eclarke12 commented 3 years ago

Item tracks don't play in Call of Cthulhu (https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT). From my first look, it looks to be due to https://github.com/death-save/maestro/blob/009bf4d45295f48d8b2bd73af288057f1087850c/modules/item-track.js#L63

this system uses "data-actor-key" instead of "data-actor-id". Figured I'd pipe in since this is a system with a different actorId attribute instead of itemId.

Thanks this helps a lot!