コード例 #1
0
ファイル: test_chunk.py プロジェクト: PiyoPiyo/bravo
    def test_boring_skylight_values(self):
        chunk = bravo.chunk.Chunk(0, 0)

        # Fill it as if we were the boring generator.
        chunk.blocks[:, :, 0].fill(1)
        chunk.regenerate()

        # Make sure that all of the blocks at the bottom of the ambient
        # lightmap are set to 15 (fully illuminated).
        for x, z in bravo.compat.product(xrange(16), repeat=2):
            self.assertEqual(chunk.skylight[x, z, 0], 15,
                "Coordinate (%d, 0, %d) is bad!" % (x, z))
コード例 #2
0
ファイル: test_chunk.py プロジェクト: iamjagman/bravo
    def test_boring_skylight_values(self):
        chunk = bravo.chunk.Chunk(0, 0)

        # Fill it as if we were the boring generator.
        chunk.blocks[:, :, 0].fill(1)
        chunk.regenerate()

        # Make sure that all of the blocks at the bottom of the ambient
        # lightmap are set to 15 (fully illuminated).
        # Note that skylight of a solid block is 0, the important value
        # is the skylight of the transluscent (usually air) block above it.
        for x, z in bravo.compat.product(xrange(16), repeat=2):
            self.assertEqual(chunk.skylight[x, z, 1], 15,
                "Coordinate (%d, 0, %d) is bad!" % (x, z))