/** * semanticMapTools.ts — build a map from a mission graph or a mined layout, * materialised against the project's own tileset. * * The difference from createMapV3 is where the art comes from. V3 clones a * bundled RTP map, so the result only looks right on an RTP tileset. This path * keeps the layout abstract until the last moment and then asks a TilesetProfile * which tile plays each role, so the same mission works on a DLC pack, an * itch.io tileset, or anything the project already uses. * * The profile comes from what the project actually does — mined by * templateMiner from the user's existing maps — and falls back to the tileset * scan for any role that has never been used. */ import { type TilesetProfile } from '../knowledge/semantic.js'; export interface SemanticMapParams { name?: string; displayName?: string; width?: number; height?: number; tilesetId?: number; seed?: number; /** Rooms on the critical path. */ rooms?: number; sideRooms?: number; locked?: boolean; loop?: boolean; /** Use a mined layout by its id ("mined-3") instead of generating one. */ templateId?: string; /** Paint the mined props even onto a different tileset. */ keepProps?: boolean; } /** * The profile for a tileset: what the project already does with it, topped up * from the tileset scan for any role it has never used. */ export declare function buildTilesetProfile(projectPath: string, tilesetId: number): Promise; /** * Create a map from a semantic layout. Returns the new map plus the mission * markers, so the caller knows where the entrance, the boss and the treasure * are and can populate them with manage_map_event. */ export declare function createMapSemantic(projectPath: string, params: SemanticMapParams): Promise<{ mapId: number; width: number; height: number; tilesetId: number; source: { kind: string; templateId: string; seed?: undefined; } | { kind: string; seed: number; templateId?: undefined; }; profileUsed: { tiles: Partial>; tilesetName: string | undefined; }; droppedProps: number; /** Where to put events: entrance, key, lock, treasure, boss, exit, doors. */ markers: { x: number; y: number; role: string; note?: string; }[]; }>;