Closed FurtherV closed 1 year ago
This behavior of getUserLevel
is definitely weird. I'll investigate whether that is intended. testUserPermission
works as expected for additional GMs if the optional parameter exact
is false
(if true
, it doesn't, but that doesn't matter in AV use case).
Yep, was talking in the foundry discord about it. See this message and surrounding: https://discord.com/channels/170995199584108546/722566083499786352/1080511430010347572
Tested on a fresh foundry install with only dnd5e and adequate vision.
When you have multiple users with the game master role / permission, only the first game master (or the one which created the tokens / actors) has the linked actors senses. For any other game master the actor senses are not linked at all.
On line 156 in the script.js file you have this check:
const userIsObserver = actor.getUserLevel(game.user) >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER;
The problem is thatactor.getUserLevel(game.user
returns 0 for additional game masters and assistant game masters. Maybe this is a core bug?