@runejs/filestore
Version:
Tools for managing the RuneJS filestore.
48 lines (47 loc) • 1.64 kB
TypeScript
import type { Filestore } from '../filestore';
import type { FileIndex } from '../file-index';
import type { Archive } from '../archive';
import { NpcStore, ObjectStore, ItemStore, VarbitStore } from './configs';
/**
* String representations of config file/archive ids.
*/
export type ConfigId = 'character' | 'objects' | 'npcs' | 'items' | 'animations' | 'graphics' | 'varbits';
/**
* A map of unique config keys to file/archive ids within the config store.
*/
export declare const configIdMap: {
[key: string]: number;
};
/**
* Finds the corresponding string config key for the given numeric id.
* @param config The numeric config file/archive id to find the name of.
*/
export declare const getConfigId: (config: number) => ConfigId;
/**
* Contains various configuration related Archives.
*/
export declare class ConfigStore {
private fileStore;
/**
* A Store used to access the Item Archive, containing details about every game item.
*/
readonly itemStore: ItemStore;
/**
* A Store used to access the Npc Archive, containing details about every game npc.
*/
readonly npcStore: NpcStore;
/**
* A Store used to access the Object Archive, containing details about every game object.
*/
readonly objectStore: ObjectStore;
/**
* A Store used to access the Varbit Archive, containing details about every game varbit.
*/
readonly varbitStore: VarbitStore;
/**
* The configuration file/archive index.
*/
readonly configIndex: FileIndex;
constructor(fileStore: Filestore);
getArchive(inputConfigId: ConfigId | number): Archive;
}