Commands.tx_spawn: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/commands.bend as Commands Lines 67-75 of bendvy-ecs-core@0.1.0.4/commands.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/commands.bend&start_line=67&end_line=75 import Base import bendvy-ecs-core@0.1.0.4/world.bend as W import bendvy-ecs-core@0.1.0.4/transaction.bend as T # IDs stay reserved on failure, matching the historical allocator policy. # Reserve an entity handle now and stage activation/population for the barrier. # Reserved is not yet live: ordinary component reads cannot observe it. The Type # payload moves into the command; reservation refusal does not return that payload. # Failure drops staged work and clears pending authority but does not rewind the # allocator's reserved-ID progress. See examples/captured-query/schema.bend. def tx_spawn(~S: Data,~C: Type,~R: Type,~E: Data,~P: Type,~populate: W.World -> W.Handle -> P -> W.World,tx: T.Tx,E>,payload: P) -> T.Tx,E> & W.Reservation: match tx: case T.Tx{world,undo,commands,events,trace}: spawn_join(~S,~C,~R,~E,~P,~populate,W.reserve_id(~S,~C,~R,~E,world),undo,commands,events,trace,payload) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/commands.bend&name=spawn_join https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/transaction.bend&name=Tx https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Handle https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=Reservation https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=World https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=reserve_id