@runejs/filestore
Version:
Tools for managing the RuneJS filestore.
71 lines (70 loc) • 1.88 kB
TypeScript
import type { Archive } from '../../archive';
import type { ConfigStore } from '../config-store';
import type { FileData } from '../../file-data';
/**
* Contains game client need-to-know level information about a single game npc.
*/
export declare class NpcConfig {
gameId: number;
name: string | null;
animations: {
stand: number;
walk: number;
turnAround: number;
turnRight: number;
turnLeft: number;
};
options?: string[];
minimapVisible: boolean;
combatLevel: number;
headIcon: number;
clickable: boolean;
turnDegrees: number;
varbitId: number;
settingId: number;
parentId?: number;
childrenIds?: number[];
/**
* 3d modelling information for this npc.
*/
model: {
models?: number[];
headModels?: number[];
};
/**
* Additional rendering details.
*/
rendering: {
boundary: number;
sizeX: number;
sizeY: number;
renderPriority: boolean;
};
}
/**
* Controls files within the NPC Archive of the configuration index.
*/
export declare class NpcStore {
private configStore;
/**
* The NPC Archive, containing details about every game NPC.
*/
readonly npcArchive: Archive;
private readonly children;
constructor(configStore: ConfigStore);
/**
* Fetches the NpcConfig object for the specified npc game id.
* @param npcId The game id of the npc to find.
*/
getNpc(npcId: number): NpcConfig | null;
/**
* Parses a raw npc data file into a readable NpcConfig object.
* @param npcFile The raw file-store npc data.
*/
decodeNpcFile(npcFile: FileData): NpcConfig;
/**
* Decodes every npc file within the npc archive and returns
* the resulting NpcConfig array.
*/
decodeNpcStore(): NpcConfig[];
}