use of main.system.auxiliary.data.MapMaster in project Eidolons by IDemiurge.
the class DC_BattleFieldManager method resetVisibleWallMap.
private void resetVisibleWallMap() {
visibleWallMap = new MapMaster().cloneHashMap(wallMap);
visibleWallMap.keySet().removeIf((sub) -> {
DC_Obj obj = (DC_Obj) game.getObjectByCoordinate(sub);
if (obj == null) {
return false;
}
// return !VisionManager.checkVisible(obj, false);
return !VisionManager.getMaster().getDetectionMaster().checkKnownForPlayer(obj);
});
visibleDiagonalJoints = new MapMaster().cloneHashMap(diagonalJoints);
visibleDiagonalJoints.keySet().removeIf((sub) -> !visibleWallMap.containsKey(sub));
// for (Coordinates sub: wallMap.keySet()){
// DC_Obj obj = (DC_Obj) game.getObjectByCoordinate(sub);
// if (VisionManager.checkVisible(obj, false)){
// visibleWallMap.put(sub, wallMap.get(sub));
// }
// }
}
use of main.system.auxiliary.data.MapMaster in project Eidolons by IDemiurge.
the class HC_Tree method sortLinksForZ.
private void sortLinksForZ(Map<StaticTreeLink, Point> staticLinkMap) {
List<StaticTreeLink> list = new ArrayList<>(staticLinkMap.keySet());
Collections.sort(list, new Comparator<StaticTreeLink>() {
@Override
public int compare(StaticTreeLink o1, StaticTreeLink o2) {
for (ObjType c : o1.getChildren()) {
if (map.getNodeForType(c).isSelected()) {
break;
}
}
return 0;
}
});
List<Point> values = new ArrayList<>();
for (StaticTreeLink l : list) {
values.add(staticLinkMap.get(l));
}
staticLinkMap = new MapMaster<StaticTreeLink, Point>().constructMap(list, values);
map.setStaticLinkMap(staticLinkMap);
}
Aggregations