From 02736524bdfe40c486679a7b95640fd4f6d4edb2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 17 Sep 2019 12:27:18 -0400 Subject: [PATCH] Update Tutorial.java --- core/src/io/anuke/mindustry/game/Tutorial.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/game/Tutorial.java b/core/src/io/anuke/mindustry/game/Tutorial.java index d2534c151b..8eb8e9e054 100644 --- a/core/src/io/anuke/mindustry/game/Tutorial.java +++ b/core/src/io/anuke/mindustry/game/Tutorial.java @@ -187,7 +187,7 @@ public class Tutorial{ } },; - protected final String line = Core.bundle.has("tutorial." + name() + ".mobile") && mobile ? "tutorial." + name() + ".mobile" : "tutorial." + name(); + protected String line = ""; protected final Function text; protected Array sentences; protected final BooleanProvider done; @@ -203,7 +203,10 @@ public class Tutorial{ /** displayed tutorial stage text.*/ public String text(){ - if(sentences == null) this.sentences = Array.select(Core.bundle.get(line).split("\n"), s -> !s.isEmpty()); + if(sentences == null){ + this.line = Core.bundle.has("tutorial." + name() + ".mobile") && mobile ? "tutorial." + name() + ".mobile" : "tutorial." + name(); + this.sentences = Array.select(Core.bundle.get(line).split("\n"), s -> !s.isEmpty()); + } String line = sentences.get(control.tutorial.sentence); return line.contains("{") ? text.get(line) : line; }