~/bend-docscommunity

machine_world.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.6/machine_world.bend as Machine_world

6 imports
import Base
import ./clock_state.bend as Clock
import ./deferred_command.bend as Deferred
import entity_allocator.bend as Alloc
import machine.bend as M
import world.bend as W

Templates

template take_join source · line 10 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @+ns:U32 -> @allocator:0x14a72e1c180a5ab1f8a056d43822425c/entity_allocator.Allocator -> @store:C -> @split:Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V>) -> @+events:List<&2, E> -> @commands:List<&1, 0x14a72e1c180a5ab1f8a056d43822425c/deferred_command.Command<0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>>> -> @+registrations:List<&2, 0x14a72e1c180a5ab1f8a056d43822425c/world.RegistrationMeta> -> @+nextSystem:U32 -> @+clock:0x14a72e1c180a5ab1f8a056d43822425c/clock_state.State -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V>)

Closed resource lenses adapt machine slots to the existing actual ECS world. No component store or affine resource is projected to Data or copied.

template take source · line 18 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-take_resource:(@_:R -> Pair(R, 0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V>)) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> Pair(0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>, 0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V>)

template put source · line 24 · raw

@-S:Data -> @-K:Data -> @-V:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-put_resource:(@_:R -> @_:0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V> -> R) -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> @slot:0x14a72e1c180a5ab1f8a056d43822425c/machine.Slot<S, K, V> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>

template structural_flush source · line 32 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @world:0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E> -> 0x14a72e1c180a5ab1f8a056d43822425c/world.World<S, C, R, E>

ApplyDeferred only drains structural commands. Machine commits require the separate marker; callers must not conflate the two public operations.