mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
[CSM] Add on_punchnode
callback
This commit is contained in:
parent
37df9cb7d7
commit
0727bb3ddd
6 changed files with 48 additions and 13 deletions
|
@ -694,19 +694,23 @@ Call these functions only at load time!
|
|||
* `minetest.register_chatcommand(cmd, chatcommand definition)`
|
||||
* Adds definition to minetest.registered_chatcommands
|
||||
* `minetest.register_on_death(func())`
|
||||
* Called when player die
|
||||
* Called when the local player dies
|
||||
* `minetest.register_on_hp_modification(func(hp))`
|
||||
* Called when server modified player's HP
|
||||
* `minetest.register_on_damage_taken(func(hp))`
|
||||
* Called when player take damages
|
||||
* Called when the local player take damages
|
||||
* `minetest.register_on_formspec_input(func(formname, fields))`
|
||||
* Called when a button is pressed in player's inventory form
|
||||
* Called when a button is pressed in the local player's inventory form
|
||||
* Newest functions are called first
|
||||
* If function returns `true`, remaining functions are not called
|
||||
* `minetest.register_on_dignode(func(pos, node))`
|
||||
* Called when a player digs a node
|
||||
* Called when the local player digs a node
|
||||
* Newest functions are called first
|
||||
* If any function returns true, the node isn't dug
|
||||
* `minetest.register_on_punchnode(func(pos, node))`
|
||||
* Called when the local player punches a node
|
||||
* Newest functions are called first
|
||||
* If any function returns true, the punch is ignored
|
||||
### Sounds
|
||||
* `minetest.sound_play(spec, parameters)`: returns a handle
|
||||
* `spec` is a `SimpleSoundSpec`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue