Example #1
0
def init():
    tiles = loader('tiles', unit=TILE_SIZE)

    terrain2.terrain_blocks('grass', tiles('lpc-base-tiles/grass.png'), shape='floor')
    terrain2.terrain_blocks('water_grass', tiles('lpc-base-tiles/watergrass.png'))
    terrain2.terrain_cross_blocks('water_grass', tiles('lpc-watergrass-cross.png'))

    terrain2.interior_blocks('farmland', tiles('farmland-interior-parts.png'), shape='floor')

    structures = loader('structures', unit=TILE_SIZE)
    s = STRUCTURE.prefixed('tree') \
            .shape(TREE_SHAPE) \
            .layer(1)

    s.new('v0') \
            .part(models.TREE['shadow'], structures('tree-shadow-round.png')) \
            .part(models.TREE['trunk'], structures('tree-trunk.png')) \
            .part(models.TREE['top'], structures('tree-top-round.png'))

    s.new('v1') \
            .part(models.TREE['shadow'], structures('tree-shadow-cone.png')) \
            .part(models.TREE['trunk'], structures('tree-trunk.png')) \
            .part(models.TREE['top'], structures('tree-top-cone.png'))

    STRUCTURE.new('stump') \
            .shape(STUMP_SHAPE) \
            .layer(1) \
            .part(models.TREE['stump'], structures('tree-stump.png'))