Make it possible to dynamically add bundles. (!87)

I'm experimenting around with this to allow for loading bundles from ZIP files to help with texture pack distribution, wanted to get it out in front of folks for review.

Co-authored-by: Ari <a@silversupre.me>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/87
Co-authored-by: Aria Adair <gaylatea@noreply.dev.sp-tarkov.com>
Co-committed-by: Aria Adair <gaylatea@noreply.dev.sp-tarkov.com>
This commit is contained in:
Aria Adair 2023-04-23 09:50:52 +00:00 committed by chomp
parent 7974e4531b
commit eb9af28c1b

View File

@ -67,9 +67,13 @@ export class BundleLoader
{
const bundlePath = `${this.httpServerHelper.getBackendUrl()}/files/bundle/${bundle.key}`;
const bundleFilepath = bundle.path || `${modpath}bundles/${bundle.key}`.replace(/\\/g, "/");
this.bundles[bundle.key] = new BundleInfo(modpath, bundle, bundlePath, bundleFilepath);
this.addBundle(bundle.key, new BundleInfo(modpath, bundle, bundlePath, bundleFilepath));
}
}
public addBundle(key: string, b: BundleInfo): void {
this.bundles[key] = b;
}
}
export interface BundleManifest