def remove_offset

bendvy-ecs-core@0.1.0.3 · execution_command_publication.bend:59

import bendvy-ecs-core@0.1.0.3/execution_command_publication.bend as ExecutionCommandPublication
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/chunk_column.bend as Column
import bendvy-ecs-core@0.1.0.3/execution_command_buffer.bend as Buffer

59def remove_offset(~S:Data,~layout:Layout.Layout,~route:Layout.Route,allocator:A.Allocator,column:Column.Column<S,Layout.stored(layout,route)>,+handle:W.Handle<S>,tick:Tick.Tick,offset:Maybe<&2,U32>) -> Applied<S,layout,route>:
60  match offset:
61    case None{}:Applied{allocator,column,Buffer.Refused{handle,None{}},False{}}
62    case Some{offset}:swapped(~S,~layout,~route,allocator,handle,Column.swap_at(~S,~(Layout.stored(layout,route)),column,offset,None{},tick),True{})

Uses (14)

Used by (1)