Skip to content

Commit

Permalink
Add "sourcePath" to Choice, which tells you where the original Choice…
Browse files Browse the repository at this point in the history
…Point was defined, useful for knowing where in the story you are.
  • Loading branch information
joethephish committed Oct 11, 2016
1 parent 6cd111f commit 8760d71
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ink-engine-runtime/Choice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ public class Choice : Runtime.Object
/// </summary>
public string pathStringOnChoice { get { return choicePoint.pathStringOnChoice; } }

/// <summary>
/// Get the path to the original choice point - where was this choice defined in the story?
/// </summary>
/// <value>A dot separated path into the story data.</value>
public string sourcePath {
get {
return choicePoint.path.componentsString;
}
}

/// <summary>
/// The original index into currentChoices list on the Story when
/// this Choice was generated, for convenience.
Expand Down

0 comments on commit 8760d71

Please sign in to comment.