Prop injection
import { Aside } from ‘@astrojs/starlight/components’;
Problem
Section titled “Problem”A merchant arrives at the tavern tile with three crates of trade goods. You want the crates rendered on the tile, queryable by AI, and removable when the merchant leaves.
Snippet
Section titled “Snippet”import { spawnGameboardPlacement } from 'declarative-hex-worlds/koota';
const crateA = spawnGameboardPlacement(world, { tileKey: '2,4', assetId: 'crate_A_big', kind: 'prop', layer: 'prop', metadata: { ownerActorId: 'merchant:trader-7' },});What the library handles
Section titled “What the library handles”- Placement spawn. Adds the koota entity with
IsGameboardPlacement+PlacementOnTile+PlacementStatetraits. - Footprint check. Asserts the prop fits within the tile’s available footprint slots.
- Query surface. Consumer can later
findGameboardActor(world, ...)to locate the merchant + iterate their placements.