Curios and artifacts !

This commit is contained in:
2026-09-30 15:22:32 -03:00
parent 342b45d593
commit 3af5f6e54b
45 changed files with 729 additions and 43 deletions
+9 -5
View File
@@ -7,7 +7,7 @@ export const AIR_ID = "bworld:air";
// bump when a client and server of different versions can't play together.
// the server rejects a different version before the client downloads anything
export const PROTOCOL_VERSION = 9;
export const PROTOCOL_VERSION = 10;
export interface PlayerInfo {
id: string;
@@ -59,8 +59,8 @@ export interface ScreenLayout {
// height of the screen's own area, in slots
rows: number;
// x and y in slots, can be fractional
// output slots can only be taken from, like the furnace result
slots: { index: number; x: number; y: number; output?: boolean }[];
// output slots can only be taken from, like the furnace result. icon is a texture drawn in the slot while it's empty
slots: { index: number; x: number; y: number; output?: boolean; icon?: string }[];
// progress bars filled from properties[value] / properties[max]
bars: {
x: number;
@@ -103,7 +103,9 @@ export type ClientMessage =
| { type: "close_screen" }
| { type: "chat"; text: string }
// what could come next in a command being typed, answered with suggestions. id matches them up
| { type: "suggest"; id: number; text: string };
| { type: "suggest"; id: number; text: string }
// a mod's client script talking to its server script, see ctx.net
| { type: "mod"; channel: string; data: unknown };
export type ServerMessage =
// what to download before joining, see docs/modding/networking/index.md
@@ -187,7 +189,9 @@ export type ServerMessage =
// answers suggest: start is where in the text the suggestions replace from, up to the caret
| { type: "suggestions"; id: number; start: number; suggestions: { text: string; tooltip?: string }[] }
// the player's own health, hunger and saturation, when they change
| { type: "vitals"; health: number; food: number; saturation: number };
| { type: "vitals"; health: number; food: number; saturation: number }
// a mod's server script talking to its client script, see ctx.net
| { type: "mod"; channel: string; data: unknown };
export const MAX_NAME_LENGTH = 16;
export const MAX_CHAT_LENGTH = 256;