def publish_clocked
bendvy-ecs-core@0.1.0.4 · restore_graph_runtime_state.bend:19
import bendvy-ecs-core@0.1.0.4/restore_graph_runtime_state.bend as RestoreGraphRuntimeState
import Base
import bendvy-ecs-core@0.1.0.4/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/event_family_routing.bend as Route
import bendvy-ecs-core@0.1.0.4/event_notice_runtime.bend as Mixed
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as Notice
19def publish_clocked(~S:Data,~C:Type,~Resources:Type,~P:Data,~F:Type,~Owners:Type,~sync:F -> Nat -> List<&2,P> -> F,metadata:Mixed.State<S,P,F,Owners> & Nat,result:W.World<S,C,Resources,Notice.Notice<S,P>> & Tick.Tick) -> Route.Runtime<S,C,Resources,Notice.Notice<S,P>,Mixed.State<S,P,F,Owners>>:
20 match metadata result:
21 case (Mixed.State{typed,Mixed.Failures{domains,positions,+failureTick,start,boundary,capacity,nextReader}},+tick),(world,clock):Mixed.ingest(~S,~C,~Resources,~P,~F,~Owners,~sync,~classify(~S,~P),1n+Nat.max(1n,Nat.max(tick,Nat.max(failureTick,Tick.total(clock)))),Route.Runtime{world,Mixed.State{typed,Mixed.Failures{domains,positions,failureTick,start,boundary,capacity,nextReader}},tick})