13.5 #15
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
3
TypeScript/13AddTrader/types/utils/VFS.d.ts
vendored
3
TypeScript/13AddTrader/types/utils/VFS.d.ts
vendored
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
@ -33,6 +33,7 @@ export declare class JsonUtil {
|
|||||||
* @returns The string converted from the JavaScript value
|
* @returns The string converted from the JavaScript value
|
||||||
*/
|
*/
|
||||||
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string;
|
||||||
|
serializeJson5(data: any, filename?: string | null, prettify?: boolean): string;
|
||||||
/**
|
/**
|
||||||
* From string to object
|
* From string to object
|
||||||
* @param jsonString json string to turn into object
|
* @param jsonString json string to turn into object
|
||||||
@ -48,6 +49,7 @@ export declare class JsonUtil {
|
|||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
deserializeJsonC<T>(jsonString: string, filename?: string, options?: IParseOptions): T;
|
||||||
|
deserializeJson5<T>(jsonString: string, filename?: string): T;
|
||||||
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
deserializeWithCacheCheckAsync<T>(jsonString: string, filePath: string): Promise<T>;
|
||||||
/**
|
/**
|
||||||
* From json string to object
|
* From json string to object
|
||||||
|
@ -23,6 +23,7 @@ export declare class VFS {
|
|||||||
}) => Promise<fs.Stats>;
|
}) => Promise<fs.Stats>;
|
||||||
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
unlinkPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
rmdirPromisify: (path: fs.PathLike) => Promise<void>;
|
||||||
|
renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise<void>;
|
||||||
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator);
|
||||||
exists(filepath: fs.PathLike): boolean;
|
exists(filepath: fs.PathLike): boolean;
|
||||||
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
existsAsync(filepath: fs.PathLike): Promise<boolean>;
|
||||||
@ -45,6 +46,8 @@ export declare class VFS {
|
|||||||
removeFileAsync(filepath: string): Promise<void>;
|
removeFileAsync(filepath: string): Promise<void>;
|
||||||
removeDir(filepath: string): void;
|
removeDir(filepath: string): void;
|
||||||
removeDirAsync(filepath: string): Promise<void>;
|
removeDirAsync(filepath: string): Promise<void>;
|
||||||
|
rename(oldPath: string, newPath: string): void;
|
||||||
|
renameAsync(oldPath: string, newPath: string): Promise<void>;
|
||||||
protected lockFileSync(filepath: any): void;
|
protected lockFileSync(filepath: any): void;
|
||||||
protected checkFileSync(filepath: any): any;
|
protected checkFileSync(filepath: any): any;
|
||||||
protected unlockFileSync(filepath: any): void;
|
protected unlockFileSync(filepath: any): void;
|
||||||
|
@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
|
protected serverDependencies: Record<string, string>;
|
||||||
|
protected skippedMods: string[];
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||||
sortModsLoadOrder(): string[];
|
sortModsLoadOrder(): string[];
|
||||||
protected addMod(mod: string): Promise<void>;
|
protected addMod(mod: string): Promise<void>;
|
||||||
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
|
@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig {
|
|||||||
profileSaveIntervalSeconds: number;
|
profileSaveIntervalSeconds: number;
|
||||||
sptFriendNickname: string;
|
sptFriendNickname: string;
|
||||||
fixes: IGameFixes;
|
fixes: IGameFixes;
|
||||||
|
features: IServerFeatures;
|
||||||
commit: string;
|
commit: string;
|
||||||
}
|
}
|
||||||
export interface IGameFixes {
|
export interface IGameFixes {
|
||||||
@ -16,3 +17,6 @@ export interface IGameFixes {
|
|||||||
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
/** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/
|
||||||
removeModItemsFromProfile: boolean;
|
removeModItemsFromProfile: boolean;
|
||||||
}
|
}
|
||||||
|
export interface IServerFeatures {
|
||||||
|
autoInstallModDependencies: boolean;
|
||||||
|
}
|
||||||
|
@ -6,6 +6,7 @@ export declare class ModCompilerService {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashCacheService: HashCacheService;
|
protected hashCacheService: HashCacheService;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
|
protected serverDependencies: string[];
|
||||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||||
/**
|
/**
|
||||||
* Convert a mods TS into JS
|
* Convert a mods TS into JS
|
||||||
|
@ -45,6 +45,12 @@ export declare class SeasonalEventService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
itemIsSeasonalRelated(itemTpl: string): boolean;
|
itemIsSeasonalRelated(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get an array of items that appear during a seasonal event
|
||||||
|
* returns multiple seasonal event items if they are both active
|
||||||
|
* @returns array of tpl strings
|
||||||
|
*/
|
||||||
|
getAllSeasonalEventItems(): string[];
|
||||||
/**
|
/**
|
||||||
* Get an array of seasonal items that should be blocked as season is not currently active
|
* Get an array of seasonal items that should be blocked as season is not currently active
|
||||||
* @returns Array of tpl strings
|
* @returns Array of tpl strings
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user