Update modding docs
This commit is contained in:
@@ -615,7 +615,7 @@ export class GameServer {
|
||||
// containers.main. the components keep those fields and put the items in a ctx.containers container
|
||||
// messages
|
||||
|
||||
// hello -> welcome, then ready -> join. see "Delivery to clients" in MODS.md
|
||||
// hello -> welcome, then ready -> join. see docs/modding/networking/index.md
|
||||
#handshake(conn: number, message: ClientMessage) {
|
||||
if (message.type === "hello") {
|
||||
if (this.#pending.has(conn)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// runs mods' server scripts: builds each one's ServerContext and keeps what they register.
|
||||
// see "Server scripts" in MODS.md. parts not built yet throw when used, saying so
|
||||
// see docs/modding/. parts not built yet throw when used, saying so
|
||||
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
|
||||
import { Container as EngineContainer, ItemStack as EngineItemStack } from "$/common/inventory.ts";
|
||||
import { get_state_value, set_state_value } from "$/common/utils.ts";
|
||||
@@ -530,12 +530,12 @@ export class ModRuntime {
|
||||
},
|
||||
ui: {
|
||||
open_container: (player, options) => this.#open_container(mod, player, options),
|
||||
message_form: not_yet(mod, "ui.message_form", "step 7 in MODS.md"),
|
||||
action_form: not_yet(mod, "ui.action_form", "step 7 in MODS.md"),
|
||||
modal_form: not_yet(mod, "ui.modal_form", "step 7 in MODS.md"),
|
||||
open_screen: not_yet(mod, "ui.open_screen", "step 7 in MODS.md"),
|
||||
message_form: not_yet(mod, "ui.message_form", "see docs/modding_plan.md"),
|
||||
action_form: not_yet(mod, "ui.action_form", "see docs/modding_plan.md"),
|
||||
modal_form: not_yet(mod, "ui.modal_form", "see docs/modding_plan.md"),
|
||||
open_screen: not_yet(mod, "ui.open_screen", "see docs/modding_plan.md"),
|
||||
},
|
||||
net: not_yet_object(mod, "net", "step 8 in MODS.md"),
|
||||
net: not_yet_object(mod, "net", "see docs/modding_plan.md"),
|
||||
storage: {
|
||||
get: (key) => structuredClone(this.storage[mod]?.[key]) as never,
|
||||
set: (key, value) => {
|
||||
@@ -621,7 +621,7 @@ export class ModRuntime {
|
||||
}
|
||||
screen.properties[id] = value;
|
||||
},
|
||||
update: not_yet(mod, "update", "custom screens are step 7 in MODS.md"),
|
||||
update: not_yet(mod, "update", "custom screens, see docs/modding_plan.md"),
|
||||
close() {
|
||||
if (server_player.screen === screen) game.close_screen(server_player);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user