def undo_present

bendvy-ecs-core@0.1.0.4 · bundle_component_install.bend:18

import bendvy-ecs-core@0.1.0.4/bundle_component_install.bend as BundleComponentInstall
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import world.bend as W
import component.bend as C
import column.bend as Col
import lifecycle.bend as L
import bundle_install.bend as F

18def undo_present(~S:Data,~Store:Type,~R:Type,~E:Data,~Rest:Type,~C:Type,~V:Data,~Token:Data,~take:Store -> Rest & Col.Column<S,C>,~put:Rest -> Col.Column<S,C> -> Store,~project:C -> C & V,+handle:W.Handle<S>,+id:U32,stamp:L.Stamp,world:W.World<S,Store,R,E>,observed:Maybe<&1,C> & Bool) -> F.Restore<W.World<S,Store,R,E>,Entry<S,C>,Recovery<S,C>>:
19  (previous,present)=observed
20  undone(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,handle,stamp,C.swap_world(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,id,previous,present,Tick.zero(),world))

Uses (15)

Used by (1)