fantasycalendar / FoundryVTT-Sequencer

This module implements a basic pipeline that can be used for managing the flow of a set of functions, effects, sounds, and macros.
Other
47 stars 25 forks source link

[BUG] - preload: true does not work on arrays #312

Closed MrVauxs closed 3 weeks ago

MrVauxs commented 4 weeks ago

Describe the bug When creating a Sequence with .play({ preload: true }) and .file() calls with an array of strings as the parameter, the sequence fails.

To Reproduce

// Works
new Sequence()
    .effect()
        .file("jb2a.antilife_shell.blue_no_circle") // <---
        .attachTo(_token)
    .play({preload: true}) // <---
// Works
new Sequence()
    .effect()
        .file( [ "jb2a.antilife_shell.blue_no_circle" ] ) // <---
        .attachTo(_token)
    .play() // <---
// Doesnt work
new Sequence()
    .effect()
        .file( [ "jb2a.antilife_shell.blue_no_circle" ] ) // <---
        .attachTo(_token)
    .play({preload: true}) // <---

Expected behavior That Sequencer picks one of the animations at random and then passes that choice to the preloader.

chrome_yJZ2mqJZCf

MrVauxs commented 3 weeks ago

I believe https://github.com/fantasycalendar/FoundryVTT-Sequencer/pull/311 fixes this.