Skip to content

Commit

Permalink
Dynamic content support in tags + tags in choices + tags in seqs
Browse files Browse the repository at this point in the history
  • Loading branch information
bladecoder committed Oct 21, 2022
1 parent 5e6b211 commit e9f9aa2
Show file tree
Hide file tree
Showing 121 changed files with 4,144 additions and 3,895 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Matching Ink v1.0.0
version=1.0.1
# Matching Ink v1.1.1
version=1.1.0

126 changes: 68 additions & 58 deletions src/main/java/com/bladecoder/ink/runtime/Choice.java
Original file line number Diff line number Diff line change
@@ -1,68 +1,78 @@
package com.bladecoder.ink.runtime;

import java.util.List;

/**
* A generated Choice from the story. A single ChoicePoint in the Story could
* potentially generate different Choices dynamically dependent on state, so
* they're separated.
*/
public class Choice extends RTObject {
Path targetPath;
boolean isInvisibleDefault;

/**
* The original index into currentChoices list on the Story when this Choice
* was generated, for convenience.
*/
private int index = 0;

int originalThreadIndex = 0;

/**
* The main text to presented to the player for this Choice.
*/
private String text;

private CallStack.Thread threadAtGeneration;

String sourcePath;

public Choice() throws Exception {
}

public int getIndex() {
return index;
}

/**
* The target path that the Story should be diverted to if this Choice is
* chosen.
*/
public String getPathStringOnChoice() throws Exception {
return targetPath.toString ();
}

public void setPathStringOnChoice(String value) throws Exception {
targetPath = new Path (value);
}

public String getText() {
return text;
}

public CallStack.Thread getThreadAtGeneration() {
return threadAtGeneration;
}

public void setIndex(int value) {
index = value;
}

public void setText(String value) {
text = value;
}

public void setThreadAtGeneration(CallStack.Thread value) {
threadAtGeneration = value;
}
Path targetPath;
boolean isInvisibleDefault;

List<String> tags;

/**
* The original index into currentChoices list on the Story when this Choice
* was generated, for convenience.
*/
private int index = 0;

int originalThreadIndex = 0;

/**
* The main text to presented to the player for this Choice.
*/
private String text;

private CallStack.Thread threadAtGeneration;

String sourcePath;

public Choice() throws Exception {
}

public int getIndex() {
return index;
}

/**
* The target path that the Story should be diverted to if this Choice is
* chosen.
*/
public String getPathStringOnChoice() throws Exception {
return targetPath.toString();
}

public void setPathStringOnChoice(String value) throws Exception {
targetPath = new Path(value);
}

public String getText() {
return text;
}

public List<String> getTags() {
return tags;
}

;

public CallStack.Thread getThreadAtGeneration() {
return threadAtGeneration;
}

public void setIndex(int value) {
index = value;
}

public void setText(String value) {
text = value;
}

public void setThreadAtGeneration(CallStack.Thread value) {
threadAtGeneration = value;
}

}
Loading

0 comments on commit e9f9aa2

Please sign in to comment.