diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-01-07 12:09:09 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-01-07 12:09:09 +0100 |
commit | 4fedc3a31ee20813e4c81377b3bd2af05a26b858 (patch) | |
tree | 11aa9dd914ce1c1c48f2dc6b096fbb5e14e3588f /doc/client_lua_api.txt | |
parent | dc67f669e9c85df7b54bc1e8775ca4a45cd7cc09 (diff) | |
download | dragonfireclient-4fedc3a31ee20813e4c81377b3bd2af05a26b858.tar.xz |
Add minetest.interact
Diffstat (limited to 'doc/client_lua_api.txt')
-rw-r--r-- | doc/client_lua_api.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index 3ee2cfba3..c7bbe1609 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -793,6 +793,16 @@ Call these functions only at load time! * Returns the time of day: `0` for midnight, `0.5` for midday ### Map +* `minetest.interact(action, pointed_thing)` + * Sends an interaction to the server + * `pointed_thing` is a pointed_thing + * `action` is one of + * "start_digging": Use to punch nodes / objects + * "stop_digging": Use to abort digging a "start_digging" command + * "digging_completed": Use to finish a "start_digging" command or dig a node instantly + * "place": Use to rightclick nodes and objects + * "use": Use to leftclick an item in air (pointed_thing.type is usually "nothing") + * "activate": Same as "use", but rightclick * `minetest.place_node(pos)` * Places the wielded node/item of the player at pos. * `minetest.dig_node(pos)` |