New modding system
This commit is contained in:
+4
-5
@@ -19,9 +19,9 @@ export function mod_sources(mods_dir: string): ServerModSource[] {
|
||||
id: mod.id,
|
||||
name: String(mod.manifest?.name),
|
||||
version: String(mod.manifest?.version),
|
||||
hash: "source",
|
||||
data: `mods/${mod.id}/source/data.json`,
|
||||
sha256: { data: "" },
|
||||
sha256: "source",
|
||||
file: `mods/${mod.id}.bmod`,
|
||||
size: 0,
|
||||
},
|
||||
data: {
|
||||
blocks: mod.blocks.map((b) => b.json),
|
||||
@@ -50,8 +50,7 @@ export async function test_game(mods_dir: string, save?: string, seed = "test-se
|
||||
closed.add(conn);
|
||||
},
|
||||
};
|
||||
const atlas = { png: "atlas.png", json: "atlas.json", sha256: { png: "", json: "" } };
|
||||
const game: GameServer = await start_game(host, save, seed, atlas, mod_sources(mods_dir));
|
||||
const game: GameServer = await start_game(host, save, seed, mod_sources(mods_dir));
|
||||
// deno-lint-ignore no-explicit-any
|
||||
const take = (conn: number): any[] => {
|
||||
const messages = outbox.get(conn) ?? [];
|
||||
|
||||
Reference in New Issue
Block a user