def automatic_inventory

bendvy-ecs-core@0.1.0.4 · relation_cleanup.bend:106

import bendvy-ecs-core@0.1.0.4/relation_cleanup.bend as RelationCleanup
import Base
import entity_key.bend as Key
import entity_allocator.bend as Alloc
import relation_types.bend as G
import relation_commands.bend as A
import world.bend as W

106def automatic_inventory(~S:Data,~C:Type,~R:Type,~E:Data,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,observed:W.World<S,A.Store<S,C>,R,A.Notice<S,E>> & List<&2,G.Edge<S>>,namespace:U32,id:Key.Key,descriptors:List<&2,G.Descriptor<S>>) -> CleanupResult<S,C,R,E>:
107  match observed:
108    case (W.World{+ns,Alloc.Allocator{+next,+highWater,slots,+capacity,+depth,+free,+order},store,resource,+events,pending,+registrations,+nextSystemId,+clock},edges): automatic_start(~S,~C,~R,~E,~clear,~record,W.World{ns,Alloc.Allocator{next,highWater,slots,capacity,depth,free,order},store,resource,events,pending,registrations,nextSystemId,clock},U32.to_nat(highWater),edges,namespace,id,descriptors)

Uses (15)

Used by (1)