Ejemplo n.º 1
0
def init():
    sheet = load('structures/fence.png', unit=TILE_SIZE)
    parts = sheet.chop(FENCE_PARTS)

    s = STRUCTURE.prefixed('fence') \
            .model(models.front(1, 1, 1)) \
            .shape(structure.solid(1, 1, 1)) \
            .layer(1)
    for k in FENCE_PARTS.keys():
        s.new(k).image(parts[k])

    r = RECIPE.prefixed('fence') \
            .station('anvil') \
            .input('wood', 5)
    for (name, display_name, struct_name) in FENCE_ITEMS:
        i = ITEM.from_structure(s[struct_name], name=name).display_name(display_name)
        r.from_item(i)
Ejemplo n.º 2
0
def mk_solid_small(name, image, **kwargs):
    """Make a small, solid structure: a solid structure with size 1x1x1, but
    only a 1x1 tile (for the front, nothing on the top)."""
    return mk_solid_structure(name, image, (1, 1, 1), display_size=(1, 1),
            model=models.front(1, 1, 1), **kwargs)