kandashi / Active-Token-Lighting

MIT License
23 stars 25 forks source link

Add allowControlWithoutGm setting #121

Closed Larkinabout closed 1 year ago

Larkinabout commented 1 year ago
kaelad02 commented 1 year ago

Any idea why the GM check is there in the first place? I could understand if there were socket calls to the GM then locking those features behind a GM check would be necessary, but I don't see that. I don't see any socket calls to the GM to do work on behalf of regular players. To be honest, I'd rather remove the GM check than add this setting.

Larkinabout commented 1 year ago

I figured it was a security measure to stop players messing with lights behind the GM's back, which would make sense in some situations. I could expect some GMs wanting to keep that feature.

Larkinabout commented 1 year ago

I added in a hook for userConnected in the latest commit as attempting to only trigger the check on 'ready' meant players would still have permission to turn lights on after the GM left. I think the main trigger on 'ready' is still the right choice given it avoids rechecking permission for every update of an effect.

I also added in a bypass to allow players to turn off their lights without the GM present as I couldn't see any reason why that would be unwanted and it avoids double info messages when you try to turn a light on as a player and then turn it off again.