Commit 8ef2587
authored
feat: Expose additional flame_jenny Command classes (#3641)
It is possible to take the name of a `Node` in a `YarnProject` and
inspect the `DialogueEntry` objects that its iterator returns. However,
even though `DialogueEntry` objects can be either a `DialogueLine`, a
`DialogueChoice`, or a `Command`, there is no way to actually reference
a `Command`! `UserDefinedCommand` exists as a concrete implementation of
`Command`, but there are other `Command` types that someone might be
interested in. For my purposes, the `JumpCommand` and `VisitCommand`
both are `Command` types that allow for the user to leave to other
nodes. It would be convenient to be able to recursively follow these
commands to their new nodes and also perform the same introspection that
I would like to do the original node. This PR just exposes these
additional, pre-existing classes for external use.1 parent ea29929 commit 8ef2587
4 files changed
Lines changed: 3 additions & 5 deletions
File tree
- packages/flame_jenny/jenny
- lib
- src/parse
- test/structure/commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
0 commit comments