Move all annotation files into library/ folder (for LuaLS/LLS-Addons).

This commit is contained in:
Alexander Chibrikin
2025-10-07 22:31:30 +03:00
parent f354d6bd0c
commit 61337d5f3d
43 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
--- @class DetachedInventoryCallbacksDef
local DetachedInventoryCallbacksDef = {
--- Called when a player wants to move items inside the inventory.
--- Return value: number of items allowed to move.
--- @type nil|fun(inv:InvRef, from_list:string, from_index:number, to_list:string, to_index:number, count:number, player:Player):number
allow_move = nil,
--- Called when a player wants to put something into the inventory.
--- Return value: number of items allowed to put.
--- Return value -1: Allow and don't modify item count in inventory.
--- @type nil|fun(inv:InvRef, list_name:string, index:number, stack:ItemStack, player:Player):number
allow_put = nil,
--- Called when a player wants to take something out of the inventory.
--- Return value: number of items allowed to take.
--- Return value -1: Allow and don't modify item count in inventory.
--- @type nil|fun(inv:InvRef, list_name:string, index:number, stack:ItemStack, player:Player):number
allow_take = nil,
--- Called after the actual action has happened, according to what was allowed (see `allow_move()`).
--- No return value.
--- @type nil|fun(inv:InvRef, from_list:string, from_index:number, to_list:string, to_index:number, count:number, player:Player):void
on_move = nil,
--- Called after the actual action has happened, according to what was allowed (see `allow_put()`).
--- No return value.
--- @type nil|fun(inv:InvRef, list_name:string, index:number, stack:ItemStack, player:Player)
on_put = nil,
--- Called after the actual action has happened, according to what was allowed (see `allow_take()`).
--- No return value.
--- @type nil|fun(inv:InvRef, list_name:string, index:number, stack:ItemStack, player:Player)
on_take = nil,
}