p4535992 / foundryvtt-arms-reach

FoundryVTT Door little Utilities, Arms Reach for door
MIT License
3 stars 4 forks source link

Cannot open doors on one scene only #10

Closed SpironoZeppeli closed 3 years ago

SpironoZeppeli commented 3 years ago

Environment Details

Issue Description

As a GM, I am unable to open doors in one scene only, unless I have a token selected. All other scenes are fine, but I have to select a token to open a door within the effected scene. Distance between the token and the door does not matter.

If this is a feature I have enabled somehow I apologise, but I cannot find such feature and therefore I'm assuming this is in some way a bug.

p4535992 commented 3 years ago

As a GM you own many tokens, if no token is selected i get the first token from the array of the tokens you owned on the current scene.

My guess is you own more than one token only in that scene (or you are very lucky and the first token from the array is the right one on the others scenes), Same thing if you are a player , but usually the player own only one token for scene.

At the moment there is no "find nearest token to the door i clicked" algorithm.

My suggestion for now is to set the module setting "Notifications failed interactions even for GM" to false, so as GM you avoid the cheking for the distance.

SpironoZeppeli commented 3 years ago

Used what you said there as good info, turns out the first token I placed was a hazard in the PF2E system. Hazards cannot open doors, so it being the first object placed in a scene renders you unable to interact with doors. Simply deleting and recreating the token now allows me to open doors again. Not sure where within the token's data that the ability to open doors in kept, but seems the best system agonostic fix for this bug is to iterate through the ownedTokens and check if it has door interaction permission before choosing it to be the designated door opener.

p4535992 commented 3 years ago

Should be fixed by now.