|
1 | 1 | package com.bladecoder.ink.runtime; |
2 | 2 |
|
| 3 | +import java.util.List; |
| 4 | + |
3 | 5 | /** |
4 | 6 | * A generated Choice from the story. A single ChoicePoint in the Story could |
5 | 7 | * potentially generate different Choices dynamically dependent on state, so |
6 | 8 | * they're separated. |
7 | 9 | */ |
8 | 10 | public class Choice extends RTObject { |
9 | | - Path targetPath; |
10 | | - boolean isInvisibleDefault; |
11 | | - |
12 | | - /** |
13 | | - * The original index into currentChoices list on the Story when this Choice |
14 | | - * was generated, for convenience. |
15 | | - */ |
16 | | - private int index = 0; |
17 | | - |
18 | | - int originalThreadIndex = 0; |
19 | | - |
20 | | - /** |
21 | | - * The main text to presented to the player for this Choice. |
22 | | - */ |
23 | | - private String text; |
24 | | - |
25 | | - private CallStack.Thread threadAtGeneration; |
26 | | - |
27 | | - String sourcePath; |
28 | | - |
29 | | - public Choice() throws Exception { |
30 | | - } |
31 | | - |
32 | | - public int getIndex() { |
33 | | - return index; |
34 | | - } |
35 | | - |
36 | | - /** |
37 | | - * The target path that the Story should be diverted to if this Choice is |
38 | | - * chosen. |
39 | | - */ |
40 | | - public String getPathStringOnChoice() throws Exception { |
41 | | - return targetPath.toString (); |
42 | | - } |
43 | | - |
44 | | - public void setPathStringOnChoice(String value) throws Exception { |
45 | | - targetPath = new Path (value); |
46 | | - } |
47 | | - |
48 | | - public String getText() { |
49 | | - return text; |
50 | | - } |
51 | | - |
52 | | - public CallStack.Thread getThreadAtGeneration() { |
53 | | - return threadAtGeneration; |
54 | | - } |
55 | | - |
56 | | - public void setIndex(int value) { |
57 | | - index = value; |
58 | | - } |
59 | | - |
60 | | - public void setText(String value) { |
61 | | - text = value; |
62 | | - } |
63 | | - |
64 | | - public void setThreadAtGeneration(CallStack.Thread value) { |
65 | | - threadAtGeneration = value; |
66 | | - } |
| 11 | + Path targetPath; |
| 12 | + boolean isInvisibleDefault; |
| 13 | + |
| 14 | + List<String> tags; |
| 15 | + |
| 16 | + /** |
| 17 | + * The original index into currentChoices list on the Story when this Choice |
| 18 | + * was generated, for convenience. |
| 19 | + */ |
| 20 | + private int index = 0; |
| 21 | + |
| 22 | + int originalThreadIndex = 0; |
| 23 | + |
| 24 | + /** |
| 25 | + * The main text to presented to the player for this Choice. |
| 26 | + */ |
| 27 | + private String text; |
| 28 | + |
| 29 | + private CallStack.Thread threadAtGeneration; |
| 30 | + |
| 31 | + String sourcePath; |
| 32 | + |
| 33 | + public Choice() throws Exception { |
| 34 | + } |
| 35 | + |
| 36 | + public int getIndex() { |
| 37 | + return index; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * The target path that the Story should be diverted to if this Choice is |
| 42 | + * chosen. |
| 43 | + */ |
| 44 | + public String getPathStringOnChoice() throws Exception { |
| 45 | + return targetPath.toString(); |
| 46 | + } |
| 47 | + |
| 48 | + public void setPathStringOnChoice(String value) throws Exception { |
| 49 | + targetPath = new Path(value); |
| 50 | + } |
| 51 | + |
| 52 | + public String getText() { |
| 53 | + return text; |
| 54 | + } |
| 55 | + |
| 56 | + public List<String> getTags() { |
| 57 | + return tags; |
| 58 | + } |
| 59 | + |
| 60 | + ; |
| 61 | + |
| 62 | + public CallStack.Thread getThreadAtGeneration() { |
| 63 | + return threadAtGeneration; |
| 64 | + } |
| 65 | + |
| 66 | + public void setIndex(int value) { |
| 67 | + index = value; |
| 68 | + } |
| 69 | + |
| 70 | + public void setText(String value) { |
| 71 | + text = value; |
| 72 | + } |
| 73 | + |
| 74 | + public void setThreadAtGeneration(CallStack.Thread value) { |
| 75 | + threadAtGeneration = value; |
| 76 | + } |
67 | 77 |
|
68 | 78 | } |
0 commit comments