arx-convert
Version:
Converts various Arx Fatalis formats to JSON or YAML and back
24 lines (23 loc) • 1.09 kB
TypeScript
import type { SetOptional, Simplify } from 'type-fest';
import { type ArxDlfHeader } from './DlfHeader.js';
import { type ArxFog } from './Fog.js';
import { type ArxInteractiveObject } from './InteractiveObject.js';
import { type ArxScene } from './Scene.js';
import { type ArxZoneAndPathHeader } from './ZoneAndPathHeader.js';
import { type ArxZoneAndPathPoint } from './ZoneAndPathPoint.js';
export type ArxZone = Simplify<SetOptional<Omit<ArxZoneAndPathHeader, 'numberOfPoints' | 'position' | 'flags'>, 'backgroundColor' | 'ambience' | 'ambienceMaxVolume' | 'drawDistance'> & {
points: ArxZoneAndPathPoint[];
}>;
export type ArxPath = Pick<ArxZone, 'name' | 'points'>;
export type ArxDLF = {
$schema?: string;
header: Simplify<Omit<ArxDlfHeader, 'numberOfInteractiveObjects' | 'numberOfFogs' | 'numberOfZonesAndPaths'> & ArxScene>;
interactiveObjects: ArxInteractiveObject[];
fogs: ArxFog[];
paths: ArxPath[];
zones: ArxZone[];
};
export declare class DLF {
static load(decompressedFile: ArrayBufferLike): ArxDLF;
static save(json: ArxDLF): ArrayBuffer;
}