def tx_despawn

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

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

104# Low-level liveness-only operation retains component storage. Gameplay uses tx_despawn_with.
105# Stage liveness-only deactivation for a live or legitimately pending handle.
106# Foreign/stale/otherwise invalid handles return Rejected(MissingEntity) with Tx.
107# Accepted is queue admission, not applied success; storage cleanup is not included.
108def tx_despawn(~S: Data,~C: Type,~R: Type,~E: Data,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:
109  match tx:
110    case T.Tx{world,undo,commands,events,trace}: despawn_join(~S,~C,~R,~E,W.command_valid(~S,~C,~R,~E,world,handle),undo,commands,events,trace,handle)

Uses (7)

Used by (0)

No other definition uses this definition.