OrdinaryLifetimeScope.count_store: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScope Lines 29-34 of bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend&start_line=29&end_line=34 import Base import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A # Trusted provisioning adapter: run the original component counter through the # scope/relation wrappers. Returns the wrapped store with its membership and # graph owners threaded back; counting does not assign scopes or delete entities. def count_store(~S:Data,~C:Type,~count:C -> List<&2,W.Handle> -> C & List<&2,Maybe<&2,U32>>,store:A.Store>,handles:List<&2,W.Handle>) -> A.Store> & List<&2,Maybe<&2,U32>>: match store: case A.Store{Sc.Store{components,members},graph}:counted(~S,~C,members,graph,count(components,handles)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/lifetime_scope.bend&name=Store https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend&name=counted https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/relation_commands.bend&name=Store https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Handle