Merge branch 'master' into SimulatorPreview
Dieser Commit ist enthalten in:
Commit
ff0d3fe2e5
@ -191,30 +191,6 @@ public final class ScriptExecutor {
|
|||||||
|
|
||||||
private String[] replaceExpressions(String s) {
|
private String[] replaceExpressions(String s) {
|
||||||
s = s.replaceAll(" +", " ");
|
s = s.replaceAll(" +", " ");
|
||||||
// TODO: Remove this code as the Expression System below will replace it!
|
|
||||||
Set<String> variables = new HashSet<>(localVariables.allVariables());
|
|
||||||
variables.addAll(Constants.allVariables());
|
|
||||||
variables.addAll(globalVariables.allVariables());
|
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
|
||||||
for (String variable : variables) {
|
|
||||||
s = s.replace("<" + variable + ">", getValue(variable));
|
|
||||||
s = s.replace("<" + variable + ".type>", getOrItselfValue(variable).type());
|
|
||||||
}
|
|
||||||
for (String constVariable : Constants.allVariables()) {
|
|
||||||
s = s.replace("<const." + constVariable + ">", getConstant(constVariable));
|
|
||||||
s = s.replace("<const." + constVariable + ".type>", Constants.getConstant(constVariable, player).type());
|
|
||||||
}
|
|
||||||
for (String localVariable : localVariables.allVariables()) {
|
|
||||||
s = s.replace("<local." + localVariable + ">", getLocal(localVariable));
|
|
||||||
s = s.replace("<local." + localVariable + ".type>", getLocalVariables().getValue(localVariable).type());
|
|
||||||
}
|
|
||||||
for (String globalVariable : globalVariables.allVariables()) {
|
|
||||||
s = s.replace("<global." + globalVariable + ">", getGlobal(globalVariable));
|
|
||||||
s = s.replace("<global." + globalVariable + ".type>", globalVariables.getValue(globalVariable).type());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
StringBuilder st = new StringBuilder();
|
StringBuilder st = new StringBuilder();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren