arx-level-generator
Version:
A tool for creating Arx Fatalis maps
33 lines (32 loc) • 1.3 kB
TypeScript
import { Settings } from './Settings.js';
import { ScriptCommand } from './scripting/ScriptCommand.js';
import { ScriptProperty } from './scripting/ScriptProperty.js';
import { ScriptSubroutine } from './scripting/ScriptSubroutine.js';
type ScriptHandlerBase = string | string[] | ScriptCommand | ScriptCommand[];
export type ScriptHandler = ScriptHandlerBase | (() => ScriptHandlerBase);
type ScriptConstructorProps = {
filename: string;
};
export declare class Script {
static readonly EOL = "\r\n";
static targetPath: string;
isRoot: boolean;
filename: string;
properties: ScriptProperty<any>[];
subroutines: ScriptSubroutine[];
eventHandlers: Record<string, ScriptHandler[]>;
constructor(props: ScriptConstructorProps);
toArxData(): string;
on(eventName: string, handler: ScriptHandler): this;
exportTextures(settings: Settings): Promise<Record<string, string>>;
makeIntoRoot(): this;
prependRaw(handler: ScriptHandler): void;
appendRaw(handler: ScriptHandler): void;
static handlerToString(handler: ScriptHandler): string;
whenRoot(): {
on: (eventName: string, handler: ScriptHandler) => any;
prependRaw: (handler: ScriptHandler) => any;
appendRaw: (handler: ScriptHandler) => any;
};
}
export {};