1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add ObjectRef:punch and ObjectRef:right_click to Lua API

This commit is contained in:
Perttu Ahola 2011-11-30 20:54:54 +02:00
parent d26e19a296
commit cd563473fa
2 changed files with 35 additions and 3 deletions

View file

@ -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)