Shared state between client and server
This commit is contained in:
+7
-2
@@ -6,8 +6,13 @@ import { type Bmod, BMOD_EXTENSION, SCRIPT_SIDES, type ScriptSide, write_bmod }
|
||||
import type { ManifestJson } from "$/common/mod_data.ts";
|
||||
import { load_and_check, type LoadedMod } from "./check_mods.ts";
|
||||
|
||||
// what each script is bundled for: the server runs in deno, clients in browsers, worldgen in both
|
||||
const PLATFORMS: Record<ScriptSide, "deno" | "browser"> = { server: "deno", client: "browser", worldgen: "browser" };
|
||||
// what each script is bundled for: the server runs in deno, clients in browsers, worldgen and shared in both
|
||||
const PLATFORMS: Record<ScriptSide, "deno" | "browser"> = {
|
||||
server: "deno",
|
||||
client: "browser",
|
||||
worldgen: "browser",
|
||||
shared: "browser",
|
||||
};
|
||||
|
||||
// a mod that passed check-mods, as .bmod bytes
|
||||
export async function pack_mod(mod: LoadedMod): Promise<Uint8Array<ArrayBuffer>> {
|
||||
|
||||
Reference in New Issue
Block a user