def undo_offset
bendvy-ecs-core@0.1.0.3 · execution_recoverable_component.bend:62
import bendvy-ecs-core@0.1.0.3/execution_recoverable_component.bend as ExecutionRecoverableComponent
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_query_identity.bend as Identity
import bendvy-ecs-core@0.1.0.3/recoverable_component.bend as RC
import bendvy-ecs-core@0.1.0.3/lifecycle.bend as Life
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
62def undo_offset(~S:Data,~C:Type,~R:Type,~E:Data,~layout:Layout.Layout,~route:Layout.Route,~same:{C == Layout.columns(~S,layout) : Type},+stamp:Life.Stamp,payload:Maybe<Layout.payload(layout,route)>,result:W.World<S,C,R,E> & Identity.Offset<S>) -> W.World<S,C,R,E> & RC.Record<S,Layout.payload(layout,route)>:
63 match result:
64 case (world,Identity.Physical{+handle,index}):undone(~S,~C,~R,~E,~Layout.payload(layout,route),handle,stamp,W.with_store(~S,~C,~R,~E,~Exchange<Layout.payload(layout,route)>,exchange(~S,~C,~layout,~route,~same,index,payload,Tick.zero(),Some{stamp}),world))
65 case (world,Identity.MissingEntity{handle}):(world,RC.Record{handle,stamp,payload})
66 case (world,Identity.OutsideStorage{handle,_}):(world,RC.Record{handle,stamp,payload})