Single module modding
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// screens mods' client scripts make, see docs/modding/gui/index.md: the screens of their menus, and screens with no
|
||||
// screens mods' client phases make, see docs/modding/gui/index.md: the screens of their menus, and screens with no
|
||||
// menu. a mod's screen that throws is closed, with the error in the console
|
||||
import { TICK_DELTA } from "@/common/constants.ts";
|
||||
import type { ClientMenu as ModClientMenu, MenuScreen, Screen } from "@/common/mod_api/client.ts";
|
||||
@@ -98,7 +98,7 @@ export class GuiModMenuScreen extends GuiMenuScreen {
|
||||
}
|
||||
}
|
||||
|
||||
// a screen with no menu, opened by a client script
|
||||
// a screen with no menu, opened by a mod's client phase
|
||||
export class GuiModScreen extends GuiScreen {
|
||||
#mod: string;
|
||||
#screen: Screen;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
// the immediate mode drawing mods' client scripts get (Graphics in common/mod_api/client.ts), on top of the renderer.
|
||||
// the immediate mode drawing mods' client phases get (Graphics in common/mod_api/client.ts), on top of the renderer.
|
||||
// one per screen, so text inputs keep their text and focus while it's open. mods work in gui pixels, GUI_SCALE canvas
|
||||
// pixels each
|
||||
import { EverythingRegistry, type ItemRegistry } from "@/common/everything_registry.ts";
|
||||
|
||||
@@ -31,7 +31,7 @@ const ICON_GAP = 4;
|
||||
// from the mouse, so the cursor doesn't cover it
|
||||
const OFFSET = 16;
|
||||
|
||||
// what client scripts add to every item's tooltip, in load order, see ctx.ui.add_item_tooltip. client/mods.ts fills it,
|
||||
// what client phases add to every item's tooltip, in load order, see ctx.ui.add_item_tooltip. client/mods.ts fills it,
|
||||
// each wrapped so one throwing is logged under its mod
|
||||
export const item_tooltips: ((item: ApiItemStack, lines: TooltipLine[]) => void)[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user