5e-Framework
5e-Framework copied to clipboard
Multiple owners on Lib: token not handled correctly when making regular token
Describe the bug If multiple owners are assigned to a character's Lib: token, creating a new token for the character will result in the new token having a single owner which is a comma-separated list of the owners on the Lib: token.
To Reproduce Steps to reproduce the behavior:
- Open the Edit Token dialog for a character's Lib: token.
- Set multiple players as owners of a character's Lib: token (e.g., "player1" and "player2")
- Select the character in the compendium and click "Make Token".
- Find the newly created character token and edit it.
- Go to the Ownership tab and see the a single owner whose name is a comma separate list (e.g., "player1,player2").
Expected behavior All owners on the Lib: token should be copied to the new character token and should not be mangled together.
Screenshots
Here we can see I assigned myself ("kwvanderlinde") and some player ("player") as owners of the Lib: token:
And here we can see a brand new owner call "kwvanderlinde,player" has been set on the character token:
Desktop (please complete the following information):
- OS: Linux Mint 20.3
- Maptool Version 1.11.4
- Framework Version: 2.5.6, seems to still be present on 2.5.7 as well
Additional context
I've already had to fix this for my own campaign as my players always use different names each time they connect :sweat_smile:. It's as simple as editing Make Token@Lib:Character
to use
getOwners("json",id,start)
instead of
getOwners(",",id,start)
The reason being that setOwner()
only accepts JSON arrays if passing multiple owners.
At least that fixes my use case of making tokens via the Compendium. Don't know about other methods of making character tokens.