mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-27 08:00:04 +07:00
Update Tutorial.java
This commit is contained in:
parent
c357b97b3b
commit
02736524bd
@ -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<String, String> text;
|
protected final Function<String, String> text;
|
||||||
protected Array<String> sentences;
|
protected Array<String> sentences;
|
||||||
protected final BooleanProvider done;
|
protected final BooleanProvider done;
|
||||||
@ -203,7 +203,10 @@ public class Tutorial{
|
|||||||
|
|
||||||
/** displayed tutorial stage text.*/
|
/** displayed tutorial stage text.*/
|
||||||
public String 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);
|
String line = sentences.get(control.tutorial.sentence);
|
||||||
return line.contains("{") ? text.get(line) : line;
|
return line.contains("{") ? text.get(line) : line;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user