Search in sources :

Example 1 with MapMaster

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));
// }
// }
}
Also used : DC_Obj(eidolons.entity.obj.DC_Obj) MapMaster(main.system.auxiliary.data.MapMaster)

Example 2 with MapMaster

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);
}
Also used : StaticTreeLink(eidolons.client.cc.gui.neo.tree.logic.StaticTreeLink) ObjType(main.entity.type.ObjType) MapMaster(main.system.auxiliary.data.MapMaster)

Aggregations

MapMaster (main.system.auxiliary.data.MapMaster)2 StaticTreeLink (eidolons.client.cc.gui.neo.tree.logic.StaticTreeLink)1 DC_Obj (eidolons.entity.obj.DC_Obj)1 ObjType (main.entity.type.ObjType)1