def tx_despawn_with

bendvy-ecs-core@0.1.0.4 · commands.bend:137

import bendvy-ecs-core@0.1.0.4/commands.bend as Commands
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

137# Stage schema-owned cleanup after command-valid handle admission. Return Tx and
138# Status now; liveness/components change at the barrier after successful finish.
139# Failure drops the staged closure. clear is trusted complete-schema provisioning.
140def tx_despawn_with(~S: Data,~C: Type,~R: Type,~E: Data,~clear: C -> W.Handle<S> -> C,tx: T.Tx<W.World<S,C,R,E>,E>,+handle: W.Handle<S>) -> T.Tx<W.World<S,C,R,E>,E> & W.Status:
141  match tx:
142    case T.Tx{world,undo,commands,events,trace}: despawn_join_with(~S,~C,~R,~E,~clear,W.command_valid(~S,~C,~R,~E,world,handle),undo,commands,events,trace,handle)

Uses (7)

Used by (2)