def taken

bendvy-ecs-core@0.1.0.3 · execution_relation_resource_publication.bend:20

import bendvy-ecs-core@0.1.0.3/execution_relation_resource_publication.bend as ExecutionRelationResourcePublication
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_relation_operation.bend as O
import bendvy-ecs-core@0.1.0.3/execution_relation_publication.bend as Publication
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as Allocator
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick

20def taken(~S:Data,~WR:Type,~resources:Layout.Layout,~same:{WR == Layout.resources(~S,resources) : Type},~route:Layout.Route,~descriptor:T.Descriptor<S>,~payload:{Layout.payload(resources,route) == Store.Store<S,descriptor> : Type},~view:{Layout.view(resources,route) == Store.View<S,descriptor> : Data},namespace:U32,allocator:Allocator.Allocator,operation:O.Operation<S>,tick:Tick.Tick,result:Layout.resource_rest(~S,resources,route) & Layout.ResourceSlot<S,Layout.stored(resources,route),Layout.key(resources,route),Layout.origin(resources,route)>) -> Allocator.Allocator & (WR & Store.Receipt<S>):
21  match result:
22    case (rest,selected):restored(~S,~WR,~resources,~same,~route,~descriptor,~payload,~view,rest,Publication.apply(~S,~descriptor,~Layout.key(resources,route),~Layout.origin(resources,route),namespace,allocator,slot(~S,~Layout.key(resources,route),~Layout.origin(resources,route),~Layout.payload(resources,route),~Store.Store<S,descriptor>,~Layout.view(resources,route),~Store.View<S,descriptor>,payload,view,selected),operation,tick))

Uses (23)

Used by (1)