summaryrefslogtreecommitdiff
path: root/doc/client_lua_api.txt
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-04-11 00:09:11 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2020-04-11 13:12:51 +0200
commit1292bdbbcec45613c95aff9f2ea88aa49af25011 (patch)
tree382e24bba4da9699809e1fd8088dcd4ad92de0fa /doc/client_lua_api.txt
parent5f3a17eb65c1ad9259f03bde346a8d69fe0c1069 (diff)
downloadminetest-1292bdbbcec45613c95aff9f2ea88aa49af25011.tar.gz
minetest-1292bdbbcec45613c95aff9f2ea88aa49af25011.tar.bz2
minetest-1292bdbbcec45613c95aff9f2ea88aa49af25011.zip
Various features and fixes
Diffstat (limited to 'doc/client_lua_api.txt')
-rw-r--r--doc/client_lua_api.txt31
1 files changed, 26 insertions, 5 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt
index 2c8ffd4d4..71df91c68 100644
--- a/doc/client_lua_api.txt
+++ b/doc/client_lua_api.txt
@@ -804,8 +804,6 @@ Call these functions only at load time!
* get max available level for leveled node
### Player
-* `minetest.get_wielded_item()`
- * Returns the itemstack the local player is holding
* `minetest.send_chat_message(message)`
* Act as if `message` was typed by the player into the terminal.
* `minetest.run_server_chatcommand(cmd, param)`
@@ -1006,6 +1004,10 @@ Methods:
* returns player HP
* `get_name()`
* returns player name
+* `get_wield_index()`
+ * returns the index of the wielded item
+* `get_wielded_item()`
+ * returns the itemstack the player is holding
* `is_attached()`
* returns true if player is attached
* `is_touching_ground()`
@@ -1029,7 +1031,8 @@ Methods:
jump = float,
gravity = float,
sneak = boolean,
- sneak_glitch = boolean
+ sneak_glitch = boolean,
+ new_move = boolean,
}
```
@@ -1081,8 +1084,26 @@ Methods:
* returns last look horizontal angle
* `get_last_look_vertical()`:
* returns last look vertical angle
-* `get_key_pressed()`:
- * returns last key typed by the player
+* `get_control()`:
+ * returns pressed player controls
+
+```lua
+ {
+ up = boolean,
+ down = boolean,
+ left = boolean,
+ right = boolean,
+ jump = boolean,
+ aux1 = boolean,
+ sneak = boolean,
+ zoom = boolean,
+ LMB = boolean,
+ RMB = boolean,
+ }
+```
+
+* `get_armor_groups()`
+ * returns a table with the armor group ratings
* `hud_add(definition)`
* add a HUD element described by HUD def, returns ID number on success and `nil` on failure.
* See [`HUD definition`](#hud-definition-hud_add-hud_get)