Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Events are not called when Lib-tokens is on the hidden-layer #3581

Closed
Lector opened this issue Sep 2, 2022 · 2 comments · Fixed by #4363
Closed

[Bug]: Events are not called when Lib-tokens is on the hidden-layer #3581

Lector opened this issue Sep 2, 2022 · 2 comments · Fixed by #4363
Assignees
Labels

Comments

@Lector
Copy link

Lector commented Sep 2, 2022

Describe the Bug

When a Lib-token is on the hidden-layer some events are not called until you edit and save one macro on this Lib-token.
Please follow the steps below to reconstruct this behavior. The events onTokenMove and onInitiativeChange are NOT called on a hidden Lib-token. onCampaignLoad is called on a hidden Lib-token. This bug occurs until someone edits one of the macros on the corresponding Lib-token. When doing so it calles the events for every player, that was connected to the server at the time one of the macros was saved. Players connecting later will not get their eventy called until someone resaves on of the macros again.

To Reproduce

  1. Open Maptool
  2. Drag a token onto the map
  3. Rename it to Lib:macros
  4. Change it to the hidden layer
  5. Add the macro "onTokenMove" to Lib:macros with the following content:
    [h: broadcast("onTokenMove was called!")]
  6. Change to token layer and add another token to the map. Move it around. It should print a prompt to the chat.
  7. Save the campaign and load it again.
  8. Move the token around. Now the chat remains empty until you open and edit one of the macros on the Lib:macros token.

Expected Behaviour

I would like all event-macros on every lib-token to be called independet of the layer this tokens are on.

Screenshots

No response

MapTool Info

Version: 1.11.5

Desktop

No response

Additional Context

Here is the link to the discord-thread where i had the issue with onTokenMove not being called:
https://discord.com/channels/296230822262865920/1015084154301456455

@Lector Lector added the bug label Sep 2, 2022
@kwvanderlinde
Copy link
Collaborator

I might pick this up soon as I stumbled across the reason for it yesterday. Will probably do it as part of a bigger simplification to how we handle layers internally.

@kwvanderlinde
Copy link
Collaborator

I tried this out on 1.13.2 and on the latest develop. Still seeing the issue for onTokenMove, but onInitiativeChange is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Testing
Development

Successfully merging a pull request may close this issue.

2 participants