Change curios to always show on inventory
This commit is contained in:
@@ -119,6 +119,8 @@ export interface InventoryOverlay {
|
||||
}
|
||||
|
||||
export interface InventoryScreenView {
|
||||
// the open menu's type, like "bworld:furnace". undefined on the player's own inventory
|
||||
readonly menu_type: Id | undefined;
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
readonly width: number;
|
||||
|
||||
@@ -388,7 +388,17 @@ export interface MenuType<Args> {
|
||||
open(player: Player, args: Args): MenuHandle;
|
||||
}
|
||||
|
||||
// the player's own inventory menu, see MenuRegistry.extend_player_menu
|
||||
export interface PlayerMenuBuilder {
|
||||
// x and y are from the inventory screen's top left, and can be outside it, like left of it with a negative x. the
|
||||
// engine draws a panel behind slots outside its own. returns the menu slot index, from 46 on
|
||||
add_slot(container: Container, slot: number, options: SlotOptions): number;
|
||||
}
|
||||
|
||||
export interface MenuRegistry {
|
||||
// adds slots to every player's own inventory menu, always there while they play, like curios' slots next to the
|
||||
// inventory. build runs when each player joins. only during setup
|
||||
extend_player_menu(build: (menu: PlayerMenuBuilder, player: Player) => void): void;
|
||||
// like registering a MenuType. the client script gives it a screen with ctx.ui.register_menu_screen
|
||||
register<Args = undefined>(
|
||||
id: Id,
|
||||
|
||||
Reference in New Issue
Block a user