Initial release for SPT 3.9

This commit is contained in:
2024-07-20 18:08:38 +02:00
parent 7df25ba694
commit c83da69a3e
713 changed files with 34110 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { HashUtil } from "@spt/utils/HashUtil";
import { JsonUtil } from "@spt/utils/JsonUtil";
import { VFS } from "@spt/utils/VFS";
export declare class BundleHashCacheService {
protected vfs: VFS;
protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil;
protected logger: ILogger;
protected bundleHashes: Record<string, number>;
protected readonly bundleHashCachePath = "./user/cache/bundleHashCache.json";
constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger);
getStoredValue(key: string): number;
storeValue(key: string, value: number): void;
matchWithStoredHash(bundlePath: string, hash: number): boolean;
calculateAndMatchHash(bundlePath: string): boolean;
calculateAndStoreHash(bundlePath: string): void;
}

View File

@@ -0,0 +1,18 @@
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { HashUtil } from "@spt/utils/HashUtil";
import { JsonUtil } from "@spt/utils/JsonUtil";
import { VFS } from "@spt/utils/VFS";
export declare class ModHashCacheService {
protected vfs: VFS;
protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil;
protected logger: ILogger;
protected modHashes: Record<string, string>;
protected readonly modCachePath = "./user/cache/modCache.json";
constructor(vfs: VFS, hashUtil: HashUtil, jsonUtil: JsonUtil, logger: ILogger);
getStoredValue(key: string): string;
storeValue(key: string, value: string): void;
matchWithStoredHash(modName: string, hash: string): boolean;
calculateAndCompareHash(modName: string, modContent: string): boolean;
calculateAndStoreHash(modName: string, modContent: string): void;
}