aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-30 20:54:54 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-30 20:54:54 +0200
commitcd563473fa298db3b910009f26ba263bacd84be9 (patch)
tree8997c54845dd9b2e2a9e03ef9937bea75c1b859f /data
parentd26e19a296e049085bf56ca09c5b8ae26d32524d (diff)
downloadminetest-cd563473fa298db3b910009f26ba263bacd84be9.tar.gz
minetest-cd563473fa298db3b910009f26ba263bacd84be9.tar.bz2
minetest-cd563473fa298db3b910009f26ba263bacd84be9.zip
Add ObjectRef:punch and ObjectRef:right_click to Lua API
Diffstat (limited to 'data')
-rw-r--r--data/mods/default/init.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua
index 0e42974ef..5b94a13a0 100644
--- a/data/mods/default/init.lua
+++ b/data/mods/default/init.lua
@@ -81,6 +81,8 @@
-- - getpos(): returns {x=num, y=num, z=num}
-- - setpos(pos); pos={x=num, y=num, z=num}
-- - moveto(pos, continuous=false): interpolated move
+-- - punch(puncher); puncher = an another ObjectRef
+-- - right_click(clicker); clicker = an another ObjectRef
-- - get_wielded_itemstring()
-- - get_wielded_item()
-- - damage_wielded_item(num) (item damage/wear range is 0-65535)
@@ -89,9 +91,9 @@
-- - get_hp(): returns number of hitpoints (2 * number of hearts)
-- - set_hp(hp): set number of hitpoints (2 * number of hearts)
-- LuaEntitySAO-only:
--- - setvelocity(self, {x=num, y=num, z=num})
--- - setacceleration(self, {x=num, y=num, z=num})
--- - getacceleration(self)
+-- - setvelocity({x=num, y=num, z=num})
+-- - setacceleration({x=num, y=num, z=num})
+-- - getacceleration()
-- - settexturemod(mod)
-- - setsprite(p={x=0,y=0}, num_frames=1, framelength=0.2,
-- - select_horiz_by_yawpitch=false)