OrdinaryBindingProvision.with_resource: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend as OrdinaryBindingProvision Lines 105-110 of bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend&start_line=105&end_line=110 import Base import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema import bendvy-ecs-core@0.1.0.4/schema_fragments.bend as Fragment import bendvy-ecs-core@0.1.0.4/ordinary_schema_provision.bend as Ordinary import bendvy-ecs-core@0.1.0.4/ordinary_schema_dump.bend as Dump # Extend component provisioning with one ordinary resource declaration and # owner-preserving renderer. Adds None component/count slots for that resource; # it is not counted as a component. Does not construct R or inspect World. def with_resource(~S:Data,~C:Type,~R:Type,~empty:Unit -> C,~count:C -> List<&2,W.Handle> -> C & List<&2,Maybe<&2,U32>>,~read:C -> U32 -> C & List<&2,Maybe<&2,String>>,~before:Unit -> Unit & List<&2,Maybe<&2,String>>,~show:R -> R & String,resource:Schema.Resource,base:Dump.Provision) -> Dump.Provision: match resource base: case Schema.Resource{+key} Dump.Provision{Ordinary.Provision{Schema.Schema{entries}}}:Dump.Provision{Ordinary.Provision{Schema.Schema{List.append(&2,Fragment.Entry,entries,[Fragment.Entry{Fragment.Resource{},key,key}])}}} Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend&name=resource_count https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend&name=resource_values https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_binding_provision.bend&name=resources https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema.bend&name=Resource https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema.bend&name=Schema https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema_dump.bend&name=Provision https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/ordinary_schema_provision.bend&name=Provision https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schema_fragments.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/schema_fragments.bend&name=RegistryKind https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Handle