Mod config
This commit is contained in:
+4
-1
@@ -24,6 +24,9 @@ export interface HostOptions {
|
||||
build_dir: string;
|
||||
// the .bmod files to load
|
||||
server_mods_dir: string;
|
||||
// <mod id>.json files that change mods' settings, see docs/modding/misc/config.md. without it every mod uses its
|
||||
// own config.json
|
||||
config_dir?: string;
|
||||
// where DESKTOP_DOWNLOADS are, served at /dist/. without it there's nothing to download
|
||||
dist_dir?: string;
|
||||
// the world's folder: level.json, and the blocks in region/
|
||||
@@ -44,7 +47,7 @@ export interface Host {
|
||||
|
||||
// throws when the mods have problems, saying what they are
|
||||
export async function start_host(options: HostOptions): Promise<Host> {
|
||||
const mods = await load_bmods(options.server_mods_dir, engine_texture_ids(options.build_dir));
|
||||
const mods = await load_bmods(options.server_mods_dir, engine_texture_ids(options.build_dir), options.config_dir);
|
||||
console.log(`Mods: ${mods.map((mod) => `${mod.listing.id} ${mod.listing.version}`).join(", ") || "none"}`);
|
||||
// what players download, by path
|
||||
const downloads = new Map(mods.map((mod) => [`/${mod.listing.file}`, mod.client_bytes]));
|
||||
|
||||
Reference in New Issue
Block a user