inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
3.97k stars 482 forks source link

Parsing tags in choices is broken #840

Closed CharlieHess closed 1 year ago

CharlieHess commented 1 year ago

As of the 1.1.1 release, we should be able to put tags in choices, and retrieve them on the Choice object. I am testing the simplest possible Ink and this feature does not seem to work? Is there something wrong with my Ink or my code? I tried putting tags both before the choice and within the choice-only text.

=== test_knot ===
#tag test
Lorem ipsum dolores sit amet.
    *   #tag test  [Bla bla bla. # tag test]
        Bla bla bla. → END
    +   # tag test [Bla bla bla. # tag test]
    Bla bla bla. → END
using Ink.Runtime;

[...]

void BuildChoicePanel() {
  for (int idx = 0; idx < _story.Choices.Count; idx++) {
    Debug.Log(_story.Choices[idx].tags); // always null
  }
}
CharlieHess commented 1 year ago

Through a roundabout bug, after upgrading to 1.1.1, I was still testing on an older compiled version of my Ink so the changes to add tags were not actually there. My mistake.