Single module modding

This commit is contained in:
2026-11-14 12:18:41 -03:00
parent 605008f584
commit 313098892e
134 changed files with 919 additions and 924 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ const out = Deno.args[1] ?? ".";
const [center_x, center_z] = [Number(Deno.args[2] ?? 0), Number(Deno.args[3] ?? 0)];
Deno.mkdirSync(out, { recursive: true });
// the base game, from mods/bworld: its data registered like the game does, and its worldgen script for trees and the
// the base game, from mods/bworld: its data registered like the game does, and its worldgen phase for trees and the
// rest of its features
const bworld = (await load_and_check()).find((mod) => mod.id === "bworld")!;
const jsons = <T>(list: { json: T }[]) => list.map((entry) => entry.json);
@@ -50,7 +50,7 @@ const dimension = jsons(bworld.dimensions).find((json) => json.default)!;
const shape = dimension_shape(dimension);
const worldgen = await load_worldgen({
mods: ["bworld"],
scripts: [{ mod: "bworld", url: new URL("../mods/bworld/scripts/worldgen.ts", import.meta.url).href }],
scripts: [{ mod: "bworld", url: new URL("../mods/bworld/scripts/main.ts", import.meta.url).href }],
ores: [jsons(bworld.ores)],
generator: dimension.generator,
shape,