SteamWar/BauSystem2.0
Archiviert
12
0

Add ScriptExecutor replace vars twice

Dieser Commit ist enthalten in:
yoyosource 2021-05-02 12:59:18 +02:00
Ursprung bcbabb8158
Commit 4c604d968b

Datei anzeigen

@ -106,17 +106,19 @@ public final class ScriptExecutor {
variables.addAll(Constants.allVariables()); variables.addAll(Constants.allVariables());
variables.addAll(globalVariables.allVariables()); variables.addAll(globalVariables.allVariables());
for (String variable : variables) { for (int i = 0; i < 2; i++) {
s = s.replace("<" + variable + ">", getValue(variable) + ""); for (String variable : variables) {
} s = s.replace("<" + variable + ">", getValue(variable) + "");
for (String constVariable : Constants.allVariables()) { }
s = s.replace("<const." + constVariable + ">", getConstant(constVariable) + ""); for (String constVariable : Constants.allVariables()) {
} s = s.replace("<const." + constVariable + ">", getConstant(constVariable) + "");
for (String localVariable : localVariables.allVariables()) { }
s = s.replace("<local." + localVariable + ">", getLocal(localVariable) + ""); for (String localVariable : localVariables.allVariables()) {
} s = s.replace("<local." + localVariable + ">", getLocal(localVariable) + "");
for (String globalVariable : globalVariables.allVariables()) { }
s = s.replace("<global." + globalVariable + ">", getGlobal(globalVariable) + ""); for (String globalVariable : globalVariables.allVariables()) {
s = s.replace("<global." + globalVariable + ">", getGlobal(globalVariable) + "");
}
} }
return s.split(" "); return s.split(" ");
} }