Search in sources :

Example 6 with DungeonPlan

use of eidolons.game.battlecraft.logic.dungeon.location.building.DungeonPlan in project Eidolons by IDemiurge.

the class LocationBuilder method buildDungeon.

@Override
public Location buildDungeon(String data, List<Node> nodeList) {
    this.nodeList = nodeList;
    location = (super.buildDungeon(data, nodeList));
    DUNGEON_TEMPLATES template = null;
    DungeonPlan plan = new DungeonPlan(template, (location));
    plan.setLoaded(true);
    for (Node n : nodeList) {
        processNode(n, getDungeon(), plan);
    }
    location.initEntrances();
    plan.setStringData(data);
    initDynamicObjData(location, plan);
    return location;
}
Also used : DungeonPlan(eidolons.game.battlecraft.logic.dungeon.location.building.DungeonPlan) Node(org.w3c.dom.Node)

Example 7 with DungeonPlan

use of eidolons.game.battlecraft.logic.dungeon.location.building.DungeonPlan in project Eidolons by IDemiurge.

the class Location method newSublevel.

private Dungeon newSublevel(Dungeon dungeon, ObjType type, int z, int level, ENTRANCE_LAYOUT entranceLayout) {
    ObjType dungeonType = new ObjType(type);
    if (level != 0) {
        dungeonType.setName(type.getName() + ", Level " + level);
    }
    String group = type.getSubGroupingKey();
    String path = PathFinder.getDungeonLevelFolder() + group + "\\";
    File file = FileManager.getRandomFile(path);
    String data = FileManager.readFile(file);
    DungeonPlan plan = new LocationBuilder().loadDungeonMap(data);
    adjustPlanToEntrance(plan, entranceLayout, file.getName());
    new LocationBuilder().transformDungeonPlan(plan);
    Dungeon sublevel = new Dungeon(dungeonType);
    // dungeon.getSubLevels().add(sublevel);
    return sublevel;
}
Also used : ObjType(main.entity.type.ObjType) LocationBuilder(eidolons.game.battlecraft.logic.dungeon.location.LocationBuilder) DungeonPlan(eidolons.game.battlecraft.logic.dungeon.location.building.DungeonPlan) Dungeon(eidolons.game.battlecraft.logic.dungeon.universal.Dungeon) File(java.io.File)

Aggregations

DungeonPlan (eidolons.game.battlecraft.logic.dungeon.location.building.DungeonPlan)7 LocationBuilder (eidolons.game.battlecraft.logic.dungeon.location.LocationBuilder)5 ObjType (main.entity.type.ObjType)5 Dungeon (eidolons.game.battlecraft.logic.dungeon.universal.Dungeon)4 File (java.io.File)3 Location (eidolons.game.battlecraft.logic.dungeon.location.Location)1 BuildHelper (eidolons.game.battlecraft.logic.dungeon.location.building.BuildHelper)1 MapBlock (eidolons.game.battlecraft.logic.dungeon.location.building.MapBlock)1 MapZone (eidolons.game.battlecraft.logic.dungeon.location.building.MapZone)1 ENTRANCE_LAYOUT (eidolons.game.module.dungeoncrawl.dungeon.DungeonLevelMaster.ENTRANCE_LAYOUT)1 ArrayList (java.util.ArrayList)1 SUBDUNGEON_TYPE (main.content.enums.DungeonEnums.SUBDUNGEON_TYPE)1 Coordinates (main.game.bf.Coordinates)1 Node (org.w3c.dom.Node)1