def transient_component

bendvy-ecs-core@0.1.0.4 · restore_schema.bend:70

import bendvy-ecs-core@0.1.0.4/restore_schema.bend as RestoreSchema
import Base
import bendvy-ecs-core@0.1.0.4/restore_clear.bend as Clear
import bendvy-ecs-core@0.1.0.4/restore_transient.bend as Transient
import bendvy-ecs-core@0.1.0.4/snapshot_schema.bend as Save
import bendvy-ecs-core@0.1.0.4/snapshot_leaf.bend as Leaf
import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity

70# Build an explicitly omitted transient component leaf. Snapshot input does not
71# construct this payload; old entity cleanup still handles its existing storage
72# when restoring the live entity set. No new arbitrary-Type factory is invented.
73def transient_component(~S:Data,~P:Type,~Custom:Data,~identity:Identity.Declaration<S,P>) -> Schema<S,Leaf.TransientComponent<S,P,identity>,Unit,Transient.State<P>,Custom,Transient.stage(~Transient.State<P>,~Custom),Transient.release(~Transient.State<P>),Clear.transient_component(~S,~P,~identity),Transient.insert(~S,~P,~identity),Unit,Transient.commit(~P),Transient.take_recovery(~Transient.State<P>)>:
74  Schema{Save.inventory(~S,~Leaf.TransientComponent<S,P,identity>,~Unit,~True{},~Leaf.transient_component_fields(~S,~P,~identity),~Save.unit_resource,Save.transient_component(~S,~P,~identity))}

Uses (16)

Used by (0)

No other definition uses this definition.