Extract core_namespace/registration/gameplay.lua; actualize & fix annotations for it.

This commit is contained in:
Alexander Chibrikin
2026-01-22 15:13:25 +03:00
parent 3eb0f97115
commit a8a2da4059
2 changed files with 73 additions and 47 deletions

View File

@@ -311,54 +311,9 @@ function core.translate(textdomain, str, ...) end
-- Registration functions:
-- Environment:
-- see ./core_namespace/registration/environment.lua
-- Gameplay:
--- * Check recipe table syntax for different types below.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4531-L4532)
function core.register_craft(recipe) end
--- * Will erase existing craft based either on output item or on input recipe.
--- * Specify either output or input only. If you specify both, input will be
--- ignored. For input use the same recipe table syntax as for
--- `core.register_craft(recipe)`. For output specify only the item,
--- without a quantity.
--- * Returns false if no erase candidate could be found, otherwise returns true.
--- * **Warning**! The type field ("shaped", "cooking" or any other) will be
--- ignored if the recipe contains output. Erasing is then done independently
--- from the crafting method.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4533-L4542)
function core.clear_craft(recipe) end
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4543-L4543)
--- @param cmd string
--- @param chatcommand_definition ChatCommandDefinition
function core.register_chatcommand(cmd, chatcommand_definition) end
--- * Overrides fields of a chatcommand registered with `register_chatcommand`.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4544-L4545)
function core.override_chatcommand(name, redefinition) end
--- * Unregisters a chatcommands registered with `register_chatcommand`.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4546-L4547)
function core.unregister_chatcommand(name) end
--- * `definition` can be a description or a definition table (see [Privilege
--- definition]).
--- * If it is a description, the priv will be granted to singleplayer and admin
--- by default.
--- * To allow players with `basic_privs` to grant, see the `basic_privs`
--- minetest.conf setting.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4548-L4554)
--- @param name string
--- @param definition string|PrivilegeDefinition
function core.register_privilege(name, definition) end
--- * Registers an auth handler that overrides the builtin one.
--- * This function can be called by a single mod once only.
---
--- [View in lua_api.txt](https://github.com/minetest/minetest/blob/5.4.1/doc/lua_api.txt#L4555-L4557)
function core.register_authentication_handler(authentication_handler_definition) end
-- see ./core_namespace/registration/gameplay.lua
-- Global callback registration functions:
--- * Called every server step, usually interval of 0.1s