def forget_routes

bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_cleanup.bend:68

import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_cleanup.bend as ExecutionLifetimeScopeCleanup
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_command_buffer.bend as Buffer
import bendvy-ecs-core@0.1.0.3/execution_command_permission.bend as Permission
import bendvy-ecs-core@0.1.0.3/execution_relation_context.bend as Context
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_world_access.bend as Access
import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_store.bend as Store
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick

68def forget_routes(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~D:Type,~resources:Layout.Layout,~same:{R == Layout.resources(~S,resources) : Type},~selection:Permission.Selection<S,resources>,+namespace:U32,+after:AfterDespawn,+tick:Tick.Tick,+handle:W.Handle<S>,+frames:List<&2,T.CleanupFrame<S>>,routes:List<&2,Layout.Route>,receipts:List<Buffer.Receipt<S,P,D>>,world:W.World<S,C,R,E>) -> State<S,C,R,E,P,D> & List<&2,T.CleanupFrame<S>>:
69  match routes:
70    case []:(State{world,receipts,after,tick,False{}},frames)
71    case +route <> rest:forgotten(S,C,R,E,P,D,route,handle,receipts,world => receipts => forget_routes(~S,~C,~R,~E,~P,~D,~resources,~same,~selection,namespace,after,tick,handle,frames,rest,receipts,world),Access.apply(~S,~C,~R,~E,~resources,~same,~selection,Context.Context{namespace},route,Store.Forget{handle},world,tick))

Uses (20)

Used by (1)