def resource_taken

bendvy-ecs-core@0.1.0.4 · restore_graph_runtime_state.bend:39

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/world.bend as W
import bendvy-ecs-core@0.1.0.4/world_resource_owner.bend as WR
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
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

39def resource_taken(~S:Data,~C:Type,~User:Type,~Logs:Type,~Machines:Type,~P:Data,~F:Type,~Owners:Type,~Receipt:Type,~drain:Logs -> Logs & Receipt,~clear:F -> F,metadata:Mixed.State<S,P,F,Owners> & Nat,result:WR.Rest<S,C,Product.Owner<Product.Owner<User,Logs>,Machines>,Notice.Notice<S,P>> & Product.Owner<Product.Owner<User,Logs>,Machines>) -> W.World<S,C,Product.Owner<Product.Owner<User,Logs>,Machines>,Notice.Notice<S,P>> & ((Mixed.State<S,P,F,Owners> & Nat) & Receipt):
40  match result:
41    case (rest,Product.Owner{Product.Owner{user,logs},machines}):drained(~S,~C,~User,~Logs,~Machines,~P,~F,~Owners,~Receipt,~clear,rest,user,machines,metadata,drain(logs))

Uses (9)

Used by (1)