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 19 forks source link

Add `fullyQualified` option for `Sequencer.Database.getPathsUnder` #181

Closed LukeAbby closed 1 year ago

LukeAbby commented 1 year ago

The hardest part about this change is frankly figuring out the name but unfortunately I couldn't think of anything too illustrative. I'd be open to any changes in terms of name... or really any changes.

Here's the output:

Sequencer.Database.getPathsUnder("jb2a.magic_signs.rune.02.complete"); // ["01", "02", "03", ...]
Sequencer.Database.getPathsUnder("jb2a.magic_signs.rune.02.complete", { fullyQualified: true }); // ["jb2a.magic_signs.rune.02.complete.01.blue", "jb2a.magic_signs.rune.02.complete.01.green", "jb2a.magic_signs.rune.02.complete.01.grey" ...]

This basically makes it both recursive and fully qualified, i.e. contains the starting portion. This way everything output is a completely valid entry name. I found a macro or two where this'd be useful.

Haxxer commented 1 year ago

Thanks for the contribution!