Skip to content

Commit 9846f87

Browse files
committed
Added story name when extracted Ink texts.
1 parent 4f36964 commit 9846f87

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

adventure-editor/src/main/java/com/bladecoder/engineeditor/common/ModelTools.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public static void extractInkTexts(String story) throws IOException {
455455

456456
StringBuilder tsvString = new StringBuilder();
457457

458-
extractInkTextsInternal(root, tsvString);
458+
extractInkTextsInternal("ink." + story + ".", root, tsvString);
459459
FileUtils.writeStringToFile(new File(file + ".tsv"), tsvString.toString());
460460

461461
String json = root.toJson(OutputType.json);
@@ -464,18 +464,18 @@ public static void extractInkTexts(String story) throws IOException {
464464
Ctx.project.setModified();
465465
}
466466

467-
private static void extractInkTextsInternal(JsonValue v, StringBuilder sb) {
467+
private static void extractInkTextsInternal(String prefix, JsonValue v, StringBuilder sb) {
468468
if(v.isArray() || v.isObject()) {
469469
for (int i = 0; i < v.size; i++) {
470470
JsonValue aValue = v.get(i);
471471

472-
extractInkTextsInternal(aValue, sb);
472+
extractInkTextsInternal(prefix, aValue, sb);
473473
}
474474
} else if(v.isString() && v.asString().charAt(0) == '^') {
475475
String value = v.asString().substring(1).trim();
476476
// String key = "ink." + value.hashCode();
477477

478-
String key = "ink.";
478+
String key = prefix;
479479

480480
try {
481481
MessageDigest md = MessageDigest.getInstance("SHA-1");

adventure-editor/src/main/resources/versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Autogenerated by build.gradle
2-
#Thu Dec 22 23:36:15 CET 2016
2+
#Fri Dec 30 08:41:59 CET 2016
33
roboVMVersion=2.3.0
44
gwtVersion=2.8.0
55
libgdxVersion=1.9.5

0 commit comments

Comments
 (0)