Allow hill cost and hill cutoff in way context

This removes the limitation that `downhillcutoff` and `uphillcutoff` as well as `downhillcost` and `uphillcost` cannot be used in the way context.
This commit is contained in:
quaelnix 2023-01-15 17:41:30 +01:00 committed by ulteq
parent 2b9a9d5bdd
commit 829baba037
6 changed files with 56 additions and 33 deletions

View file

@ -12,7 +12,7 @@ public final class BExpressionContextWay extends BExpressionContext implements T
private boolean decodeForbidden = true;
private static String[] buildInVariables =
{"costfactor", "turncost", "uphillcostfactor", "downhillcostfactor", "initialcost", "nodeaccessgranted", "initialclassifier", "trafficsourcedensity", "istrafficbackbone", "priorityclassifier", "classifiermask", "maxspeed"};
{"costfactor", "turncost", "uphillcostfactor", "downhillcostfactor", "initialcost", "nodeaccessgranted", "initialclassifier", "trafficsourcedensity", "istrafficbackbone", "priorityclassifier", "classifiermask", "maxspeed", "uphillcost", "downhillcost", "uphillcutoff", "downhillcutoff"};
protected String[] getBuildInVariableNames() {
return buildInVariables;
@ -66,6 +66,22 @@ public final class BExpressionContextWay extends BExpressionContext implements T
return getBuildInVariable(11);
}
public float getUphillcost() {
return getBuildInVariable(12);
}
public float getDownhillcost() {
return getBuildInVariable(13);
}
public float getUphillcutoff() {
return getBuildInVariable(14);
}
public float getDownhillcutoff() {
return getBuildInVariable(15);
}
public BExpressionContextWay(BExpressionMetaData meta) {
super("way", meta);
}