minor changes

This commit is contained in:
Stephan Richter
2020-11-06 20:52:55 +01:00
parent 9fed18a517
commit d3ca0a08ef
11 changed files with 34 additions and 17 deletions

View File

@@ -136,6 +136,11 @@ public abstract class Contact extends Tile{
}
@Override
public String title() {
return t("Contact {} @ ({}, {})",addr,x,y);
}
public String trigger() {
if (trigger == null) trigger = getClass().getSimpleName()+"-"+id();
return trigger;

View File

@@ -21,7 +21,7 @@ public class ContactV extends Contact {
default:
return new HashMap<>();
}
}
}
@Override
public List<Direction> possibleDirections() {

View File

@@ -355,6 +355,8 @@ public abstract class Tile extends BaseClass{
default:
}
}
String title = title();
if (isSet(title)) new Tag("title").content(title()).addTo(svg);
} else {
new Tag("title").content(t("No display defined for this tile ({})",getClass().getSimpleName())).addTo(svg);
new Tag("text")
@@ -362,8 +364,6 @@ public abstract class Tile extends BaseClass{
.content("?")
.addTo(svg);
}
String title = title();
if (isSet(title)) new Tag("title").content(title()).addTo(svg);
return svg;
}