def register

bendvy-ecs-core@0.1.0.4 · world.bend:292

import bendvy-ecs-core@0.1.0.4/world.bend as World
import Base

292# Allocate a system metadata id/name/access entry, returning World and Registration.
293# System-id exhaustion preserves World. Metadata alone does not install a runner
294# or validate a gameplay body; ordinary registered-system setup performs that join.
295def register(~S: Data,~C: Type,~R: Type,~E: Data,world: World<S,C,R,E>,+name: String,+access: List<&2,String>) -> World<S,C,R,E> & Registration:
296  match world:
297    case World{+namespace,allocator,store,resource,+events,pending,+registrations,+nextSystemId,+clock}: register_checked(~S,~C,~R,~E,U32.is_lt(nextSystemId,4294967295),World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock},name,access)

Uses (7)

Used by (4)