Region file format
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import type { ModData, ModListing } from "$/common/mod_loader.ts";
|
||||
import type { WorldSave } from "./saves.ts";
|
||||
|
||||
// messages between server/main.ts (the host) and the game server worker
|
||||
|
||||
export type HostToGame =
|
||||
| {
|
||||
type: "init";
|
||||
save: string | undefined;
|
||||
save: WorldSave;
|
||||
default_seed: string;
|
||||
// in load order, with the scripts' code since the worker can't read files
|
||||
mods: { listing: ModListing; data: ModData; server_code?: string; worldgen_code?: string }[];
|
||||
@@ -23,6 +24,7 @@ export type GameToHost =
|
||||
| { type: "failed"; error: string }
|
||||
| { type: "send"; conn: number; data: string }
|
||||
| { type: "close"; conn: number }
|
||||
| { type: "save"; data: string; final: boolean }
|
||||
// level.json and the chunks that changed
|
||||
| { type: "save"; save: Required<WorldSave>; final: boolean }
|
||||
// the worker can't use the network, so the host fetches urls for it, like skins
|
||||
| { type: "download"; id: number; url: string; max_bytes: number };
|
||||
|
||||
Reference in New Issue
Block a user