def publication_gate

bendvy-ecs-core@0.1.0.3 · execution_command_system.bend:104

import bendvy-ecs-core@0.1.0.3/execution_command_system.bend as ExecutionCommandSystem
import Base

104# These gates consume the closed action once and preserve each affine owner.
105def publication_gate(-World:Type,-Owner:Type,allowed:Bool,world:World,owner:Owner,apply:World -> Owner -> World & Owner) -> World & Owner:
106  match allowed:
107    case False{}:(world,owner)
108    case True{}:apply(world,owner)

Uses (3)

Used by (3)