def publication_gate
import bendvy-ecs-core@0.1.0.3/execution_command_system.bend as ExecutionCommandSystemimport 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)