(HashMap<Integer, Integer> layerTranslation)
| 371 | } |
| 372 | |
| 373 | @Override |
| 374 | public JSONObject getMeta(HashMap<Integer, Integer> layerTranslation){ |
| 375 | JSONObject root = new JSONObject(); |
| 376 | |
| 377 | MapPainterDefault mapPainter = (MapPainterDefault) getWorldPanel().getMappainter(); |
| 378 | root.put("showPaths", mapPainter.getShowPaths()); |
| 379 | root.put("pathsCurved", mapPainter.getPathsCurved()); |
| 380 | root.put("showCursor", getWorldPanel().isCursorEnabled()); |
| 381 | root.put("showGrid", mapPainter.isGridEnabled()); |
| 382 | root.put("tileSize", getWorldPanel().getTileSize()); |
| 383 | |
| 384 | JSONArray history = new JSONArray(); |
| 385 | root.put("history", history); |
| 386 | |
| 387 | Integer cnt = 0; |
| 388 | for(WorldCoordinate coord: getWorldPanel().getHistory()){ |
| 389 | if(layerTranslation.containsKey(coord.getLayer())){ |
| 390 | JSONObject el = new JSONObject(); |
| 391 | el.put("l", layerTranslation.get(coord.getLayer())); |
| 392 | el.put("x", coord.getX()); |
| 393 | el.put("y", coord.getY()); |
| 394 | history.put(el); |
| 395 | } |
| 396 | if(++cnt >= 25) break; |
| 397 | } |
| 398 | |
| 399 | return root; |
| 400 | } |
| 401 | |
| 402 | public void readMeta(){ |
| 403 | WorldFile worldFile = getWorld().getWorldFile(); |
nothing calls this directly
no test coverage detected