From 3d1c481f0bdf03b59871237d810685278e87613b Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 22 Nov 2012 21:01:31 +0200 Subject: 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 --- doc/lua_api.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc/lua_api.txt') 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 -- cgit v1.2.3