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
41 stars 17 forks source link

[BUG] - .preset() cannot extend Sequence #234

Closed MrVauxs closed 3 weeks ago

MrVauxs commented 3 weeks ago

Describe the bug When adding a preset to a Sequence type, i.e. not .effect(), .animation(), etc., Sequencer errors. chrome_SJPCvYfTqv

To Reproduce

Sequencer.Presets.add("ranged", function (seq, { file, target, source }) {
    return seq
        .effect()
        .file(file)
        .stretchTo(target)
        .atLocation(source)
}, true)

new Sequence()
    .preset("ranged", { source: token, target: game.user.targets.first(), file: "jb2a.arrow.cold.blue" })
    .play()

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Setup:

Active modules:

Additional context https://discord.com/channels/772596237605011466/881983179920142356/1252666127255867516