diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java index 785c042b..25b29147 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/ScriptExecutor.java @@ -191,30 +191,6 @@ public final class ScriptExecutor { private String[] replaceExpressions(String s) { s = s.replaceAll(" +", " "); - // TODO: Remove this code as the Expression System below will replace it! - Set 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("", getConstant(constVariable)); - s = s.replace("", Constants.getConstant(constVariable, player).type()); - } - for (String localVariable : localVariables.allVariables()) { - s = s.replace("", getLocal(localVariable)); - s = s.replace("", getLocalVariables().getValue(localVariable).type()); - } - for (String globalVariable : globalVariables.allVariables()) { - s = s.replace("", getGlobal(globalVariable)); - s = s.replace("", globalVariables.getValue(globalVariable).type()); - } - } - StringBuilder result = new StringBuilder(); int depth = 0; StringBuilder st = new StringBuilder();