diff --git a/game/scenes/terra_2d_world/levelgen.gd b/game/scenes/terra_2d_world/levelgen.gd index 17a137b..fa403fd 100644 --- a/game/scenes/terra_2d_world/levelgen.gd +++ b/game/scenes/terra_2d_world/levelgen.gd @@ -20,6 +20,39 @@ func _generate_chunk(chunk : Terrain2DChunk): chunk.set_voxel(3, 4, 6, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) chunk.set_voxel(def_flag, 4, 6, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + for x in range(8, 11): + for y in range(8, 11): + chunk.set_voxel(3, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + + if x == 8 && y == 8: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_NORTH | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + chunk.set_voxel(3, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + + elif x == 10 && y == 10: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + chunk.set_voxel(3, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + + elif x == 8 && y == 10: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + elif x == 8: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + elif y == 8 && x == 10: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_NORTH | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + elif y == 8: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_NORTH, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + elif x == 10: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + elif y == 10: + chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + else: + chunk.set_voxel(0, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + +# chunk.set_voxel(def_flag, x, y, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + #chunk.set_voxel(1, 3, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) #chunk.set_voxel(def_flag, 3, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS)