def selected_target

bendvy-ecs-core@0.1.0.4 · machine_handler_bundle.bend:156

import bendvy-ecs-core@0.1.0.4/machine_handler_bundle.bend as MachineHandlerBundle
import Base
import world.bend as W
import system.bend as Sys
import machine_handlers.bend as H
import machine.bend as M

156def selected_target(~S:Data,~K:Data,~V:Data,~Q:Data,~C:Type,~R:Type,~E:Data,~runner:W.World<S,C,R,E> -> H.Invocation<V> -> Sys.Outcome<W.World<S,C,R,E>,String,Unit>,~take:W.World<S,C,R,E> -> W.World<S,C,R,E> & M.Slot<S,K,V>,~put:W.World<S,C,R,E> -> M.Slot<S,K,V> -> W.World<S,C,R,E>,~publish:W.World<S,C,R,E> -> M.Transition<V> -> W.World<S,C,R,E>,~same:V -> V -> Bool,namespace:U32,entries:List<&1,Scheduled<S,K,V,Q,C,R,E,runner>>,world:W.World<S,C,R,E>,+slot:M.Slot<S,K,V>,+current:V,pending:M.Pending<V>) -> BundleResult<S,K,V,Q,C,R,E,runner>:
157  match pending:
158    case M.NoPending{}: Returned{Bundle{namespace,entries},put(world,M.clear_changed(~S,~K,~V,slot)),Completed{}}
159    case M.Queued{+value,+skipSame}: partitioned_run(~S,~K,~V,~Q,~C,~R,~E,~runner,~take,~put,~publish,~same,namespace,put(world,slot),M.Scheduled{value,skipSame},partition(~S,~K,~V,~Q,~C,~R,~E,~runner,~same,entries,current,value))

Uses (20)

Used by (1)