Single module modding

This commit is contained in:
2026-11-14 12:18:41 -03:00
parent 605008f584
commit 313098892e
134 changed files with 919 additions and 924 deletions
+3 -3
View File
@@ -7,12 +7,12 @@ above them.
## Layers
A client script registers layers during `setup`, with ids in its namespace:
The client phase registers layers while it runs, with ids in its namespace:
```ts
import type { ClientContext } from "cubi/client";
export function setup(ctx: ClientContext) {
export function client(ctx: ClientContext) {
ctx.hud.register("thirst:water", {
on_render(g, hud) {
// a row of drops above the hunger, on the right
@@ -48,7 +48,7 @@ side without raising it, and chat goes above that.
## Overlay Messages
A server script's message with `{ overlay: true }` (see `Player.send_message`) isn't chat: it goes to the client scripts
The server phase's message with `{ overlay: true }` (see `Player.send_message`) isn't chat: it goes to the client phases
that listen for it, and the base game shows it above the hotbar for a few seconds:
```ts