Awesome menu and saves
This commit is contained in:
+8
-1
@@ -24,6 +24,8 @@ export interface HostOptions {
|
||||
build_dir: string;
|
||||
// the .cubi files to load
|
||||
server_mods_dir: string;
|
||||
// which of server_mods_dir's files to load, by file name. every one when left out
|
||||
mod_files?: 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;
|
||||
@@ -47,7 +49,12 @@ 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_mods(options.server_mods_dir, engine_texture_ids(options.build_dir), options.config_dir);
|
||||
const mods = await load_mods(
|
||||
options.server_mods_dir,
|
||||
engine_texture_ids(options.build_dir),
|
||||
options.config_dir,
|
||||
options.mod_files,
|
||||
);
|
||||
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