EvaTheDM / mildly-magical-inspiration

This module lets Gamemasters create card decks and hand those cards out to their players. It can be used as an alternative way to handout inspiration to players in D&D 5th Edition.
MIT License
1 stars 1 forks source link

fixes a bug that caused a loop when awarding cards #22

Closed EvaTheDM closed 3 years ago

EvaTheDM commented 3 years ago

As noted by issue#19 a loop begins running when awarding cards, while more than two users (one of them the gamemaster) are online.

The bug was caused due to a hook being called by everyone to update settings without first checking if they were a gamemaster capable of updating the settings.

Additionally recalling the cards to the deck now causes all open Card Viewer windows (viewing one's hand, award window, etc.) to close and the Deck Config window to rerender, as well as removing all cards from players' queues.