implemented PathFinder, that searches for possible routes to a destinationblock
This commit is contained in:
@@ -293,7 +293,7 @@ public abstract class Block extends StretchableTile{
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName()+"("+name+") @ ("+x+","+y+")";
|
||||
return name + " @ ("+x+","+y+")";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -240,7 +240,7 @@ public abstract class Tile extends BaseClass{
|
||||
Tag routeList = new Tag("ol");
|
||||
for (Route route : routes) {
|
||||
String json = new JSONObject(Map.of(REALM,ROUTE,ID,route.id(),ACTION,ACTION_PROPS,CONTEXT,REALM_PLAN+":"+id())).toString().replace("\"", "'");
|
||||
Tag li = new Tag("span").attr("onclick","return request("+json+");").content(route.name()+(route.isDisabled()?" ["+t("disabled")+"]" : "")+NBSP).addTo(new Tag("li").clazz("link"));
|
||||
Tag li = new Tag("span").attr("onclick","return request("+json+");").content(route.shortName()+(route.isDisabled()?" ["+t("disabled")+"]" : "")+NBSP).addTo(new Tag("li").clazz("link"));
|
||||
Map<String, Object> params = Map.of(REALM,REALM_ROUTE,ID,route.id(),ACTION,ACTION_DROP,Tile.class.getSimpleName(),id());
|
||||
new Button(t("delete route"),params).addTo(li);
|
||||
li.addTo(routeList);
|
||||
|
||||
Reference in New Issue
Block a user