/** * Macro Integration * * Provides helper functions and macro definitions for integrating game systems * with the @writewhisker/macros package. * * This allows game systems to be used directly in template strings: * - {{inventory.has "health_potion"}} * - {{stats.get "health"}} * - {{quest.progress "main_quest"}} */ import type { InventorySystem } from './InventorySystem'; import type { StatsSystem } from './StatsSystem'; import type { QuestSystem } from './QuestSystem'; import type { AchievementSystem } from './AchievementSystem'; /** * Game systems container for macro context */ export interface GameSystemsContext { inventory?: InventorySystem; stats?: StatsSystem; quests?: QuestSystem; achievements?: AchievementSystem; } /** * Create macro helper functions for game systems * These functions can be registered in the macro context.functions map */ export declare function createGameSystemMacros(systems: GameSystemsContext): Record any>; /** * Register game system macros with a macro context * * Example usage: * ```typescript * import { MacroProcessor } from '@writewhisker/macros'; * import { InventorySystem, StatsSystem } from '@writewhisker/game-systems'; * * const inventory = new InventorySystem(); * const stats = new StatsSystem(); * * const context = { * variables: new Map(), * functions: new Map(), * customMacros: new Map(), * }; * * // Register game system macros * registerGameSystemMacros(context, { inventory, stats }); * * // Now you can use them in templates * const template = '{{if call(stats.get, "health") > 50}}Healthy{{end}}'; * const result = await processor.process(template, context); * ``` */ export declare function registerGameSystemMacros(context: { functions: Map any>; }, systems: GameSystemsContext): void; /** * Create a complete game systems state object for saving/loading */ export declare function exportGameSystems(systems: GameSystemsContext): { inventory: import("./types").Item[] | undefined; stats: Record | undefined; quests: import("./types").Quest[] | undefined; achievements: import("./types").Achievement[] | undefined; timestamp: number; }; /** * Import game systems state */ export declare function importGameSystems(systems: GameSystemsContext, data: { inventory?: any[]; stats?: any; quests?: any[]; achievements?: any[]; }): void; //# sourceMappingURL=macroIntegration.d.ts.map