Export schematics
This commit is contained in:
@@ -33,7 +33,9 @@ export type HostToGame =
|
||||
// save now and say when it's done, for shutting down
|
||||
| { type: "shutdown" }
|
||||
// answers download, with the bytes or why it failed
|
||||
| { type: "downloaded"; id: number; bytes?: Uint8Array; error?: string };
|
||||
| { type: "downloaded"; id: number; bytes?: Uint8Array; error?: string }
|
||||
// answers write_schematic, with where the file is or why it couldn't be written
|
||||
| { type: "wrote_schematic"; id: number; path?: string; error?: string };
|
||||
|
||||
export type GameToHost =
|
||||
| { type: "ready"; seed: string }
|
||||
@@ -46,4 +48,6 @@ export type GameToHost =
|
||||
// the game waits on buffer for a saved chunk, see READ_WAITING
|
||||
| { type: "read_chunk"; x: number; z: number; buffer: SharedArrayBuffer }
|
||||
// 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 };
|
||||
| { type: "download"; id: number; url: string; max_bytes: number }
|
||||
// an exported schematic, which the host writes to a new file in a temporary directory, see ctx.schematics.export
|
||||
| { type: "write_schematic"; id: number; bytes: Uint8Array<ArrayBuffer> };
|
||||
|
||||
Reference in New Issue
Block a user