mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] add on_item_use
(#5544)
This commit is contained in:
parent
6658ad3d94
commit
5ebf8f9450
6 changed files with 34 additions and 1 deletions
|
@ -669,6 +669,10 @@ Call these functions only at load time!
|
|||
* If any function returns true, the punch is ignored
|
||||
* `minetest.register_on_placenode(function(pointed_thing, node))`
|
||||
* Called when a node has been placed
|
||||
* `minetest.register_on_item_use(func(item, pointed_thing))`
|
||||
* Called when the local player uses an item.
|
||||
* Newest functions are called first.
|
||||
* If any function returns true, the item use is not sent to server.
|
||||
### Sounds
|
||||
* `minetest.sound_play(spec, parameters)`: returns a handle
|
||||
* `spec` is a `SimpleSoundSpec`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue