Skip to content

Commit

Permalink
Commit #55: Improved use of A* to connect caves; turned of dangerous …
Browse files Browse the repository at this point in the history
…debug code
  • Loading branch information
BlackJar72 committed Jul 15, 2015
1 parent 2945c1f commit 8320b4a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion java/jaredbgreat/dldungeons/planner/astar/DoorChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ public static void processDoors3(Dungeon dungeon, Room room) {

public static void caveConnector(Dungeon dungeon, Room cave) {
for(Doorway door : cave.doors) {
new AStar(cave, dungeon, cave.midpoint, dungeon.rooms.get(door.otherside).midpoint).seek();
//new AStar(cave, dungeon, cave.midpoint, dungeon.rooms.get(door.otherside).midpoint).seek();
new AStar2(dungeon, cave, dungeon.rooms.get(door.otherside)).seek();
}
}
}
18 changes: 9 additions & 9 deletions java/jaredbgreat/dldungeons/planner/mapping/MapMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ public void build(Dungeon dungeon) {
//DoomlikeDungeons.profiler.startTask("Building Room " + room[i][j] + " column " + i + ", " +j);
Room theRoom = dungeon.rooms.get(room[i][j]);

if(astared[i][j]) {
DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, lapis);
} else if(isDoor[i][j]) {
DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, slab);
} else if(isWall[i][j]) {
DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, glass);
} else {
DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, glow);
}
// if(astared[i][j]) {
// DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, lapis);
// } else if(isDoor[i][j]) {
// DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, slab);
// } else if(isWall[i][j]) {
// DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, glass);
// } else {
// DBlock.placeBlock(world, shiftX + i, 96, shiftZ +j, glow);
// }

// Lower parts of the room

Expand Down
2 changes: 1 addition & 1 deletion resources/jaredbgreat/dldungeons/res/themes/dank.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Version 1.8
# (BEACH is consider the same as WATER here.)
#
# Biomes types where it should be used
biomes = FOREST, SWAMP, WET, JUNGLE
biomes = SWAMP, WET, JUNGLE
# Biome types where it should never appear, even if the biome also fit one of the above types
NotInBiomes = NETHER, END, DRY

Expand Down

0 comments on commit 8320b4a

Please sign in to comment.