fantasycalendar / FoundryVTT-Tagger

Other
6 stars 4 forks source link

[BUG] {#} isn't checked within MATT's `Run Macro` arguments #28

Open PlasticMohawk opened 1 year ago

PlasticMohawk commented 1 year ago

Describe the bug

The primary issue is tags used in MATT's Run Macro command as arguments, which contain {#} (for use with Token Attacher prefabs), do not seem to be "checked" when an instance of the TA prefab is created.

Please feel free to reach out in Discord if you have any questions. Username: plasticmohawk

To Reproduce

Using MATT and Token Attacher, I have created a portal entrance and exit. You can see this in operation in the JB2A Discord (link).

The prefab of each side of the portal uses the following tags:

portal-enter-{#} portal-exit-{#}

The MATT actions of the "entrance" and "exit" prefabs are set up like this:

image

When I create an instance of these prefabs (by dragging the TA prefab from the right sidebar), the tags unfurl as expected, like this:

image

However, the Teleport actions of the instances now look like this:

image

Further, the arguments of the Run Macro don't seem to unfurl at all. See below:

"Entrance" side of the portal image

"Exit" side of the portal image

As a result, I need to manually edit my tag values to ensure my Rube Goldberg machine of a portal system works correctly.

Expected behavior

As a user, I...

Screenshots See above

Setup:

Active modules:

Additional context

Below is the JS of the macro being referenced above.

const [enter] = await Tagger.getByTag(args[0]);
const [exit] = await Tagger.getByTag(args[1]);

/*
ui.notifications.info("From: " + enter.id);
ui.notifications.info("To: " + exit.id);
*/

let sequence = new Sequence()
    .wait(200)
    .effect()
        .file("modules/jb2a_patreon/Library/1st_Level/Shield/Shield_02_Regular_Red_Intro_400x400.webm")
        .atLocation(enter)
        .scale(1)
    .wait(200)
    .effect()
        .file("modules/jb2a_patreon/Library/1st_Level/Shield/Shield_02_Regular_Red_OutroFade_400x400.webm")
        .atLocation(exit)
        .scale(1)
sequence.play();