Single module modding
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user