mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 14:30:24 +00:00
79 lines
2.3 KiB
TypeScript
79 lines
2.3 KiB
TypeScript
export type PathLineStyle = "solid" | "dashed" | "dotted";
|
||
export type PathRouting = "through" | "meander" | "edge";
|
||
|
||
export interface PathType {
|
||
name: string;
|
||
color: string;
|
||
width: number; // 1–10, direct SVG stroke-width
|
||
lineStyle: PathLineStyle;
|
||
routing: PathRouting; // "through" = hex centers; "meander" = edge midpoints (curved); "edge" = along hex boundary lines
|
||
}
|
||
|
||
export interface PathChain {
|
||
typeName: string; // references PathType.name
|
||
hexes: string[]; // "x_y" keys
|
||
}
|
||
|
||
export interface MapData {
|
||
name: string;
|
||
paletteName: string;
|
||
gridSize: { cols: number; rows: number };
|
||
gridOffset: { x: number; y: number };
|
||
pathChains: PathChain[];
|
||
showCoords?: boolean; // undefined = true (backwards-compatible)
|
||
showTerrainIcons?: boolean; // undefined = true
|
||
showIconOverrides?: boolean; // undefined = true
|
||
showFactionOverlay?: boolean; // undefined = false (opt-in)
|
||
}
|
||
|
||
export interface TerrainPalette {
|
||
name: string;
|
||
terrains: TerrainColor[];
|
||
}
|
||
|
||
export interface TerrainColor {
|
||
name: string;
|
||
color: string;
|
||
icon?: string;
|
||
iconColor?: string; // CSS colour to tint the icon; undefined = no tint (render as-is)
|
||
category?: string;
|
||
}
|
||
|
||
export interface HexmakerPluginSettings {
|
||
mySetting: string;
|
||
worldFolder: string;
|
||
hexFolder: string;
|
||
townsFolder: string;
|
||
dungeonsFolder: string;
|
||
questsFolder: string;
|
||
featuresFolder: string;
|
||
iconsFolder: string;
|
||
templatePath: string;
|
||
hexGap: string;
|
||
terrainPalettes: TerrainPalette[];
|
||
maps: MapData[];
|
||
zoomLevel: number;
|
||
pathTypes: PathType[];
|
||
hexOrientation: "pointy" | "flat";
|
||
tablesFolder: string;
|
||
factionsFolder: string;
|
||
defaultTableDice: number;
|
||
hexEditorTerrainCollapsed: boolean;
|
||
hexEditorFeaturesCollapsed: boolean;
|
||
hexEditorNotesCollapsed: boolean;
|
||
rollTableExcludedFolders: string[];
|
||
encounterTableExcludedFolders: string[];
|
||
defaultMap: string;
|
||
workflowsFolder: string;
|
||
hiddenIcons: string[];
|
||
}
|
||
|
||
export const LINK_SECTIONS = ["Towns", "Dungeons", "Features", "Quests", "Factions", "Encounters Table"] as const;
|
||
export type LinkSection = typeof LINK_SECTIONS[number];
|
||
|
||
export const TEXT_SECTIONS = [
|
||
{ key: "description", label: "Description" },
|
||
{ key: "landmark", label: "Landmark" },
|
||
{ key: "hidden", label: "Hidden" },
|
||
{ key: "secret", label: "Secret" },
|
||
] as const;
|