def copy(world: "World", dimension: Dimension, selection: SelectionGroup): if selection: structure = Structure.from_world(world, selection, dimension) structure_cache.add_structure(structure) raise OperationSilentAbort else: raise OperationError( "At least one selection is required for the copy operation.")
def cut(world: "World", dimension: Dimension, selection: SelectionGroup) -> OperationReturnType: structure = Structure.from_world(world, selection, dimension) structure_cache.add_structure(structure) yield from delete( world, dimension, selection, )
def copy(world: "BaseLevel", dimension: Dimension, selection: SelectionGroup) -> OperationReturnType: if selection: yield 0, "Copying" structure = yield from world.extract_structure_iter( selection, dimension) structure_cache.add_structure(structure, structure.dimensions[0]) raise OperationSilentAbort else: raise OperationError( "At least one selection is required for the copy operation.")
def cut(world: "BaseLevel", dimension: Dimension, selection: SelectionGroup) -> OperationReturnType: if selection: structure = world.extract_structure(selection, dimension) structure_cache.add_structure(structure, structure.dimensions[0]) yield from delete( world, dimension, selection, ) else: raise OperationError( "At least one selection is required for the copy operation.")
def cut(world: "World", dimension: Dimension, selection: SelectionGroup) -> OperationReturnType: if selection: structure = Structure.from_world(world, selection, dimension) structure_cache.add_structure(structure) yield from delete( world, dimension, selection, ) else: raise OperationError( "At least one selection is required for the copy operation.")
def copy(world: "World", dimension: Dimension, selection: SelectionGroup): structure = Structure.from_world(world, selection, dimension) structure_cache.add_structure(structure) raise OperationSilentAbort