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,6 +106,7 @@ public final class ScriptExecutor {
variables.addAll(Constants.allVariables()); variables.addAll(Constants.allVariables());
variables.addAll(globalVariables.allVariables()); variables.addAll(globalVariables.allVariables());
for (int i = 0; i < 2; i++) {
for (String variable : variables) { for (String variable : variables) {
s = s.replace("<" + variable + ">", getValue(variable) + ""); s = s.replace("<" + variable + ">", getValue(variable) + "");
} }
@ -118,6 +119,7 @@ public final class ScriptExecutor {
for (String globalVariable : globalVariables.allVariables()) { for (String globalVariable : globalVariables.allVariables()) {
s = s.replace("<global." + globalVariable + ">", getGlobal(globalVariable) + ""); s = s.replace("<global." + globalVariable + ">", getGlobal(globalVariable) + "");
} }
}
return s.split(" "); return s.split(" ");
} }