Files
ai.interactive.fiction/dist/config/game-config.d.ts
T

40 lines
1.1 KiB
TypeScript

export type EngineName = 'yaml' | 'ink' | 'zcode' | string;
export interface GameMetadata {
title: string;
author?: string;
subtitle?: string;
version?: string;
copyright?: string;
language?: string;
}
export interface GamePaths {
mainGameFile: string;
inkSource?: string;
inkCompiled?: string;
promptDir?: string;
music?: string;
sfx?: string;
images?: string;
[key: string]: string | undefined;
}
export interface GameEngineConfig {
engine: EngineName;
locale: 'en_US' | 'de_DE' | string;
paths: GamePaths;
metadata: GameMetadata;
}
export declare function projectPath(relativeOrAbsolutePath: string): string;
export declare function loadGameConfig(configPath: string, engine: EngineName): GameEngineConfig;
export declare function ensureConfiguredAssetDirectories(config: GameEngineConfig): void;
export declare function clientGameConfig(config: GameEngineConfig): {
engine: string;
locale: string;
metadata: GameMetadata;
assets: {
music: string;
sfx: string;
sounds: string;
images: string;
};
};