Initial commit
This commit is contained in:
Vendored
+71
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* YAML World Model Parser
|
||||
* Loads and validates world definitions from YAML files
|
||||
*/
|
||||
import { WorldModel } from '../interfaces/world-model';
|
||||
export declare class YamlWorldParser {
|
||||
/**
|
||||
* Load a world model from a YAML file
|
||||
*/
|
||||
static loadFromFile(filePath: string): Promise<WorldModel>;
|
||||
/**
|
||||
* Validate the loaded YAML data and transform it into a WorldModel
|
||||
*/
|
||||
private static validateAndTransform;
|
||||
/**
|
||||
* Validate that an object has all required fields
|
||||
*/
|
||||
private static validateRequiredFields;
|
||||
/**
|
||||
* Validate that a value is a string
|
||||
*/
|
||||
private static validateString;
|
||||
/**
|
||||
* Validate room definitions
|
||||
*/
|
||||
private static validateRooms;
|
||||
/**
|
||||
* Validate exit definitions
|
||||
*/
|
||||
private static validateExits;
|
||||
/**
|
||||
* Validate object definitions
|
||||
*/
|
||||
private static validateObjects;
|
||||
/**
|
||||
* Validate character definitions
|
||||
*/
|
||||
private static validateCharacters;
|
||||
/**
|
||||
* Validate action definitions
|
||||
*/
|
||||
private static validateActions;
|
||||
/**
|
||||
* Validate initial game state
|
||||
*/
|
||||
private static validateInitialState;
|
||||
/**
|
||||
* Validate object states (record of boolean values)
|
||||
*/
|
||||
private static validateObjectStates;
|
||||
/**
|
||||
* Validate dialogue (record of string values)
|
||||
*/
|
||||
private static validateDialogue;
|
||||
/**
|
||||
* Validate flags (record of boolean values)
|
||||
*/
|
||||
private static validateFlags;
|
||||
/**
|
||||
* Validate counters (record of number values)
|
||||
*/
|
||||
private static validateCounters;
|
||||
/**
|
||||
* Validate that an array of strings is valid
|
||||
*/
|
||||
private static validateStringArray;
|
||||
/**
|
||||
* Validate references between entities
|
||||
*/
|
||||
private static validateReferences;
|
||||
}
|
||||
Reference in New Issue
Block a user