working on saving and loading of route actions
This commit is contained in:
@@ -147,6 +147,7 @@ public abstract class Tile {
|
||||
JSONObject pos = json.getJSONObject(POS);
|
||||
x = pos.getInt(X);
|
||||
y = pos.getInt(Y);
|
||||
if (json.has(ONEW_WAY)) oneWay = Direction.valueOf(json.getString(ONEW_WAY));
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -155,6 +156,10 @@ public abstract class Tile {
|
||||
plan.place(this);
|
||||
}
|
||||
|
||||
public Plan plan() {
|
||||
return plan;
|
||||
}
|
||||
|
||||
public Tile plan(Plan plan) {
|
||||
this.plan = plan;
|
||||
return this;
|
||||
@@ -173,8 +178,7 @@ public abstract class Tile {
|
||||
public Tag propForm() {
|
||||
Form form = new Form();
|
||||
new Tag("input").attr("type", "hidden").attr("name","action").attr("value", "update").addTo(form);
|
||||
new Tag("input").attr("type", "hidden").attr("name","x").attr("value", x).addTo(form);
|
||||
new Tag("input").attr("type", "hidden").attr("name","y").attr("value", y).addTo(form);
|
||||
new Tag("input").attr("type", "hidden").attr("name",ID).attr("value", id()).addTo(form);
|
||||
|
||||
List<Direction> pd = possibleDirections();
|
||||
if (!pd.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user