Added more test walls.

This commit is contained in:
Relintai 2022-03-03 18:00:51 +01:00
parent 23f3fb46ca
commit 556f6b2e2c

View File

@ -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)