Rename bmod to just mod
This commit is contained in:
+8
-8
@@ -6,7 +6,7 @@
|
||||
import { serveDir, serveFile } from "@std/http/file-server";
|
||||
import { join } from "@std/path";
|
||||
import { GameToHost, HostToGame, READ_DONE, READ_HEADER, READ_TOO_SMALL } from "./game/host_protocol.ts";
|
||||
import { load_bmods } from "./load_bmods.ts";
|
||||
import { load_mods } from "./load_mods.ts";
|
||||
import { list_chunks, read_chunk, write_chunks } from "./regions.ts";
|
||||
import { default_worldgen_workers, start_worldgen_workers } from "./worldgen_workers.ts";
|
||||
import type { SavedChunk } from "./game/saves.ts";
|
||||
@@ -22,7 +22,7 @@ export const DESKTOP_DOWNLOADS = ["windows.zip", "linux.zip"];
|
||||
export interface HostOptions {
|
||||
// what deno task build made: the client and the engine's assets
|
||||
build_dir: string;
|
||||
// the .bmod files to load
|
||||
// the .cubi 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
|
||||
@@ -47,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), options.config_dir);
|
||||
const mods = await load_mods(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]));
|
||||
@@ -148,12 +148,12 @@ export async function start_host(options: HostOptions): Promise<Host> {
|
||||
type: "init",
|
||||
save,
|
||||
default_seed: options.seed ?? crypto.randomUUID(),
|
||||
mods: mods.map(({ listing, bmod }) => ({
|
||||
mods: mods.map(({ listing, mod }) => ({
|
||||
listing,
|
||||
data: bmod.data,
|
||||
server_code: bmod.scripts.server,
|
||||
worldgen_code: bmod.scripts.worldgen,
|
||||
shared_code: bmod.scripts.shared,
|
||||
data: mod.data,
|
||||
server_code: mod.scripts.server,
|
||||
worldgen_code: mod.scripts.worldgen,
|
||||
shared_code: mod.scripts.shared,
|
||||
})),
|
||||
worldgen_ports: worldgen.ports,
|
||||
} satisfies HostToGame,
|
||||
|
||||
Reference in New Issue
Block a user