LILY/ambient.d.ts
Mute ef8e2cb3ed 0.0.2
small changes
* hopefully fixes the deafening
* spelling
* new monkey matches
* official mod-sdk download
* R108 stubs
2024-09-18 20:32:34 +00:00

46 lines
1.3 KiB
TypeScript

declare namespace LILY {
interface Utils {
remove_hook: undefined | (() => void)
true(callback: () => unknown): true // stops eslint from complaining about constant bool expressions
with<V, R>(value: V, callback: (v: V) => R): R // A silly helper to kinda curry values
send(callback: () => boolean): boolean // updates the player if the function succeeds
}
interface Box {
enable(item: Item | undefined): boolean
disable(item: Item | undefined): boolean
on(): boolean
off(): boolean
get item(): Item | undefined
get enabled(): boolean
}
interface Eyes {
zones: AssetGroupName[]
craft: CraftingItem
rgb: string[]
timeout: NodeJS.Timeout | undefined
set_rgb(item: Item, index: number): boolean
next_rgb(): boolean
roll_rgb(): void
start(): boolean
stop(): boolean
dim(): boolean
clear(): boolean
check(zone: AssetGroupName): Item | undefined
get item(): Item | undefined
}
type CommandCB = (...arguments: string[]) => unknown
type Command<T> = Record<string, T | CommandCB>
interface Commands extends Command<Commands> {}
interface Belt {
admins: number[]
users: number[]
cli: Commands
is_cb(subject: Commands | CommandCB): subject is CommandCB
run(tokens: string[]): string
receive(data: ServerChatRoomMessage): undefined
}
}