Actually implement mod code into server
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
import { Container, Cursor, ItemData, ItemStack } from "$/common/inventory.ts";
|
||||
import { PlayerInfo, ScreenLayout } from "$/common/protocol.ts";
|
||||
import { Tile } from "./world.ts";
|
||||
|
||||
export const INVENTORY_SIZE = 9 * 4;
|
||||
export const CRAFTING_SIZE = 10;
|
||||
|
||||
// a screen the server opened for this player, showing a tile's container
|
||||
// a container screen a mod opened for this player, see ctx.ui.open_container
|
||||
export interface OpenScreen {
|
||||
tile: Tile;
|
||||
container: Container;
|
||||
layout: ScreenLayout;
|
||||
properties(): Record<string, number>;
|
||||
// what the bars show, synced when they change
|
||||
properties: Record<string, number>;
|
||||
// what can go into each slot, checked when the player clicks
|
||||
filters: Map<number, (item: ItemStack) => boolean>;
|
||||
on_close: (() => void)[];
|
||||
}
|
||||
|
||||
// what's saved about a player between sessions, by name
|
||||
|
||||
Reference in New Issue
Block a user