From 22ade2858c4d2f3cb3014367baf800665bf2d47e Mon Sep 17 00:00:00 2001 From: Vanic Date: Fri, 17 Apr 2026 16:54:37 +0300 Subject: [PATCH] `core_namespace`: clarification of annotations for `core.register_allow_player_inventory_action` & `core.register_on_player_inventory_action` --- core_namespace.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core_namespace.lua b/core_namespace.lua index 00ca607..6bc749c 100644 --- a/core_namespace.lua +++ b/core_namespace.lua @@ -571,14 +571,14 @@ function core.register_craft_predict(callback) end --- moved. A value of `-1` for `take` will make the source stack infinite. --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4720-L4731) ---- @param callback fun(player, action, inventory, inventory_info) +--- @param callback fun(player:ObjectRef, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table) function core.register_allow_player_inventory_action(callback) end --- * Called after a take, put or move event from/to/in a player inventory --- * Function arguments: see `core.register_allow_player_inventory_action` --- * Does not accept or handle any return value. --- --- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4732-L4735) ---- @param callback fun(player, action, inventory, inventory_info) +--- @param callback fun(player:ObjectRef, action:"move"|"put"|"take", inventory:InvRef, inventory_info:table) function core.register_on_player_inventory_action(callback) end --- * Called by `builtin` and mods when a player violates protection at a --- position (eg, digs a node or punches a protected entity).