mwg API
    Preparing search index...

    Interface PlacementFilter

    Filters over terrain and occupancy for a placement pool - the seam a dungeon's feature/content hooks use to ask "which cells could this go on" without FeatureLayer or a game's own item/monster classes ever entering the picture. Every field is optional and narrows the pool further; omitting all of them is every cell on the level.

    interface PlacementFilter {
        occupied?: ReadonlySet<number>;
        terrain?: ReadonlySet<number>;
        within?: Iterable<number, any, any>;
    }
    Index
    occupied?: ReadonlySet<number>

    cells to exclude - already taken by another feature, a monster, an item

    terrain?: ReadonlySet<number>

    raw terrain kind ids eligible (indices into the Level's own kinds); omit for any kind

    within?: Iterable<number, any, any>

    restrict the search to these cells (a room's interior, a hand-picked region); omit for the whole level