gsimon2 / hide-player-ui

Foundry Virtual Tabletop module for hiding player control ui.
GNU General Public License v3.0
2 stars 4 forks source link

Fix an issue where the GM would be considered a player. #57

Closed joelplourde4 closed 2 months ago

joelplourde4 commented 2 months ago

I've just purchased Foundry and found your module pretty nice, it works exactly like it should ... except if you attempt to configure the settings, then if you login as a GM, it doesn't work lol.

Issue

The following issue: https://github.com/gsimon2/hide-player-ui/issues/46

I've just installed your module, set up my player's permission but then when I connected as a GM oops, nothing. As if I was a player.

Solution

That boolean check was wrong it was:

true (isGM) && (!true || !true) true && (false || false) true && false false

I've used the Return Early principle to try to narrow down the most traverse code path, let me know if you need me to remove the comments.

gsimon2 commented 2 months ago

Thanks for submitting this. I will test the change this week and if all looks good will push a release.