Initial release for SPT 3.9
This commit is contained in:
35
types/loaders/BundleLoader.d.ts
vendored
Normal file
35
types/loaders/BundleLoader.d.ts
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { BundleHashCacheService } from "@spt/services/cache/BundleHashCacheService";
|
||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||
import { JsonUtil } from "@spt/utils/JsonUtil";
|
||||
import { VFS } from "@spt/utils/VFS";
|
||||
export declare class BundleInfo {
|
||||
modpath: string;
|
||||
filename: string;
|
||||
crc: number;
|
||||
dependencies: string[];
|
||||
constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number);
|
||||
}
|
||||
export declare class BundleLoader {
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected bundleHashCacheService: BundleHashCacheService;
|
||||
protected cloner: ICloner;
|
||||
protected bundles: Record<string, BundleInfo>;
|
||||
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner);
|
||||
/**
|
||||
* Handle singleplayer/bundles
|
||||
*/
|
||||
getBundles(): BundleInfo[];
|
||||
getBundle(key: string): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: BundleManifestEntry[];
|
||||
}
|
||||
export interface BundleManifestEntry {
|
||||
key: string;
|
||||
dependencyKeys: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user