def allowed

bendvy-ecs-core@0.1.0.4 · captured_schedule_condition.bend:55

import bendvy-ecs-core@0.1.0.4/captured_schedule_condition.bend as CapturedScheduleCondition
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/schedule_provision.bend as SP
import bendvy-ecs-core@0.1.0.4/captured_schedule.bend as Run
import bendvy-ecs-core@0.1.0.4/captured_schedule_composition.bend as Comp
import bendvy-ecs-core@0.1.0.4/ordinary_condition_composition.bend as Cond

55def allowed(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~B:Type,~Error:Data,~catalog:H -> H & List<&2,Comp.Identity>,~dispatch:H -> W.World<S,C,R,E> -> U32 -> Comp.Outcome<W.World<S,C,R,E>,H,Error>,~select:B -> W.World<S,C,R,E> -> U32 -> Cond.Evaluation<W.World<S,C,R,E>,B>,~provision:W.World<S,C,R,E> -> W.World<S,C,R,E> & List<&2,SP.Requirement<S>>,valid:Bool,owners:H,conditions:Cond.Bindings<W.World<S,C,R,E>,B,select>,world:W.World<S,C,R,E>,name:String,plan:SP.Plan<S>) -> Run.Run<W.World<S,C,R,E>,Owned<S,C,R,E,H,B,Error,catalog,dispatch,select>,S,Cond.Error<Error>>:
56  match valid:
57    case False{}:Run.Refused{world,Owned{name,plan,owners,conditions},[]}
58    case True{}:available(~S,~C,~R,~E,~H,~B,~Error,~catalog,~dispatch,~select,owners,conditions,name,plan,provision(world))

Uses (16)

Used by (1)