diff options
author | Emmanuel <emmanuel@chthonicsoftware.com> | 2020-09-07 11:59:13 -0600 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-03-05 09:45:58 +0100 |
commit | 6b9057a1f2c0f3fabbf061f5bd49519920dd783b (patch) | |
tree | e44766106e3de04a962be77422ddaf5d77823891 /src/script/lua_api/l_item.cpp | |
parent | ac8ac191691a13162667314358e96f07a65d0d1a (diff) | |
download | minetest-6b9057a1f2c0f3fabbf061f5bd49519920dd783b.tar.xz |
Ability to define and use LUA wield animations
Diffstat (limited to 'src/script/lua_api/l_item.cpp')
-rw-r--r-- | src/script/lua_api/l_item.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index 9e0da4034..a765c96df 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -665,8 +665,19 @@ int ModApiItemMod::l_get_name_from_content_id(lua_State *L) return 1; /* number of results */ } +int ModApiItemMod::l_register_wield_animation(lua_State *L) +{ + NO_MAP_LOCK_REQUIRED; + luaL_checktype(L, 1, LUA_TTABLE); + int table = 1; + + read_wield_animation(L, table); + return 0; /* number of results */ +} + void ModApiItemMod::Initialize(lua_State *L, int top) { + API_FCT(register_wield_animation); API_FCT(register_item_raw); API_FCT(unregister_item_raw); API_FCT(register_alias_raw); |