def resources

bendvy-ecs-core@0.1.0.4 · restore_graph_raw.bend:73

import bendvy-ecs-core@0.1.0.4/restore_graph_raw.bend as RestoreGraphRaw
import Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/snapshot_data.bend as Snapshot
import bendvy-ecs-core@0.1.0.4/restore_raw.bend as Basic
import bendvy-ecs-core@0.1.0.4/restore_graph_data.bend as Graph

73def resources(next:U32,entities:List<&2,Snapshot.Entity>,relations:List<&2,Graph.Relation>,+fields:List<&2,D.Field>,raw:D.Raw) -> Basic.Decoded<Graph.Snapshot>:
74  match raw:
75    case D.Object{values}:machines(Snapshot.Snapshot{1,next,entities,values},relations,D.field("machines",fields))
76    case other:Basic.invalid(~Graph.Snapshot,"$.resources","object",other)

Uses (12)

Used by (1)