summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>2012-11-22 21:01:31 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-11-25 19:14:24 +0200
commit3d1c481f0bdf03b59871237d810685278e87613b (patch)
treefe49c10e926b1e452e4f98561a148e2f145c27e9 /doc/lua_api.txt
parent756db8174aa6a05eb998cfcec8eb5127053c5ea9 (diff)
downloadminetest-3d1c481f0bdf03b59871237d810685278e87613b.tar.gz
minetest-3d1c481f0bdf03b59871237d810685278e87613b.tar.bz2
minetest-3d1c481f0bdf03b59871237d810685278e87613b.zip
RealBadAngel's patch which allows the lua api to read pressed player keys. This should make it possible to change the player's animation based on what he is doing
Correct lua api version number Always update animations and attachments after the entity is added to scene client side. Fixes animations not being applied in client initialization for some reason. Attachments should be re-tested now just to be safe. Fix a segmentation fault caused by reaching materials that didn't exist in a loop for setting texture
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index fc51cb2f7..0c093b7ee 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1,4 +1,4 @@
-Minetest Lua Modding API Reference 0.4.0
+Minetest Lua Modding API Reference 0.4.3
==========================================
More information at http://c55.me/minetest/
@@ -1132,7 +1132,11 @@ Player-only: (no-op for other objects)
^ Redefine player's inventory form
^ Should usually be called in on_joinplayer
- get_inventory_formspec() -> formspec string
-
+- get_player_control(): returns table with player pressed keys
+ {jump=bool,right=bool,left=bool,LMB=bool,RMB=bool,sneak=bool,aux1=bool,down=bool,up=bool}
+- get_player_control_bits(): returns integer with bit packed player pressed keys
+ bit nr/meaning: 0/up ,1/down ,2/left ,3/right ,4/jump ,5/aux1 ,6/sneak ,7/LMB ,8/RMB
+
InvRef: Reference to an inventory
methods:
- is_empty(listname): return true if list is empty