mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-04-30 05:01:41 -04:00
Move things from LDoc to game_api.txt
This commit is contained in:
parent
b5c297c1b7
commit
5dafdeea48
2 changed files with 8 additions and 5 deletions
|
@ -1215,3 +1215,11 @@ These can be influenced using this API.
|
|||
* `player`: ObjectRef of the relevant player
|
||||
* You can override this function to change the weather effects by simply returning different values.
|
||||
Setting `clouds` or `lighting` in the result table to `nil` will *prevent* those from changing.
|
||||
|
||||
Utilities
|
||||
---------
|
||||
|
||||
`default.dig_up(pos, node, digger, max_height)`
|
||||
|
||||
* Find all nodes above `pos` that is the same, then dig them all
|
||||
* `max_height` Maximum number of nodes to iterate. Default: 100
|
||||
|
|
|
@ -295,11 +295,6 @@ minetest.register_abm({
|
|||
|
||||
local in_dig_up = false
|
||||
|
||||
---Find all nodes above this one that is the same, then dig them all
|
||||
---@param pos vector The position of the base node
|
||||
---@param node { name: string, param1: integer, param2: integer } Node table of the base node
|
||||
---@param digger ObjectRef The object (e.g. player) digging the node
|
||||
---@param max_height The maximum height to search for, excluding the base node
|
||||
function default.dig_up(pos, node, digger, max_height)
|
||||
if in_dig_up then return end -- Do not recurse
|
||||
if digger == nil then return end
|
||||
|
|
Loading…
Add table
Reference in a new issue