summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-18 10:03:51 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-18 14:52:35 +0100
commit467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0 (patch)
treefc0258fd520517b9e490e515414aac57cecdb963 /src/script/lua_api/l_object.h
parent8f2e9bfbc2bba03e4bf3c0fcc4d4a36ac0c9569e (diff)
downloadminetest-467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.tar.gz
minetest-467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.tar.bz2
minetest-467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.zip
Add a Lua call to do damages / heals
Diffstat (limited to 'src/script/lua_api/l_object.h')
-rw-r--r--src/script/lua_api/l_object.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/lua_api/l_object.h b/src/script/lua_api/l_object.h
index d51ca379f..94b07070c 100644
--- a/src/script/lua_api/l_object.h
+++ b/src/script/lua_api/l_object.h
@@ -83,6 +83,12 @@ private:
// 0 if not applicable to this type of object
static int l_get_hp(lua_State *L);
+ // apply_damage(self, damage)
+ // damage = amount of damage to apply
+ // if damage is negative, heal the player
+ // returns: nil
+ static int l_apply_damage(lua_State *L);
+
// get_inventory(self)
static int l_get_inventory(lua_State *L);