-
Notifications
You must be signed in to change notification settings - Fork 271
Closed
Labels
Description
Describe the Bug
When clicking a macro button on a Lib:token, getMacroLocation() returns only the part of the token name after the Lib:. When invoking the macro via [macro("someMacro@Lib:token"): ""], getMacroLocation() returns the full token name.
On 1.17, getMacroLocation() always returned the full token name.
To Reproduce
- Add a token to the map and name it
Lib:Dragon. - Add a
Testingmacro toLib:Dragonwith these contents:[h: broadcast(getMacroLocation())] - Add a
Test2macro toLib:Dragonwith these contents:[h: broadcast(getMacroLocation())] [macro("Testing@TOKEN"): ""] [macro("Testing@this"): ""] - Click
Testingand observe the following printed to chat:Dragon - Click
Test2and observe the following printed to chat:Dragon Lib:Dragon Dragon
Expected Behaviour
getMacroLocation() should return the full token name when the location is a Lib:token.
In particular, the behaviour of the given macros should match 1.17. I.e., clicking on Testing should result in:
Lib:Dragon
And clicking on Test2 should result in:
Lib:Dragon
Lib:Dragon
Lib:Dragon
Screenshots
No response
MapTool Info
1.18.0-rc.1
Desktop
Linux Mint 22.1
Additional Context
@token has a similar issue with getMacroLocation(), and so does @this.
Locations like @gm also differ from 1.17, but only in case.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Merged