@runejs/filestore
Version:
Tools for managing the RuneJS filestore.
39 lines (38 loc) • 1.26 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 varbit.
*/
export declare class VarbitConfig {
gameId: number;
index: number;
leastSignificantBit: number;
mostSignificantBit: number;
}
/**
* Controls files within the Varbit Archive of the configuration index.
*/
export declare class VarbitStore {
private configStore;
/**
* The Varbit Archive, containing details about every game varbit.
*/
readonly varbitArchive: Archive;
constructor(configStore: ConfigStore);
/**
* Fetches the VarbitConfig object for the specified varbit game id.
* @param varbitId The game id of the varbit to find.
*/
getVarbit(varbitId: number): VarbitConfig | null;
/**
* Parses a raw varbit data file into a readable VarbitConfig object.
* @param varbitFile The raw file-store varbit data.
*/
decodeVarbitFile(varbitFile: FileData): VarbitConfig;
/**
* Decodes every varbit file within the varbit archive and returns
* the resulting VarbitConfig array.
*/
decodeVarbitStore(): VarbitConfig[];
}