aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_item.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-04-09 14:47:59 +0200
committersfan5 <sfan5@live.de>2022-05-02 20:54:55 +0200
commit56a558baf8ef43810014347ae624cb4ef70b6aa3 (patch)
tree071640a50dba48bc5a28d07d782b56923aa690c3 /src/script/lua_api/l_item.cpp
parente6385e2ab74af7b01163ea91d4e3cfd5dfe6552e (diff)
downloadminetest-56a558baf8ef43810014347ae624cb4ef70b6aa3.tar.gz
minetest-56a558baf8ef43810014347ae624cb4ef70b6aa3.tar.bz2
minetest-56a558baf8ef43810014347ae624cb4ef70b6aa3.zip
Refactor some Lua API functions in preparation for async env
Diffstat (limited to 'src/script/lua_api/l_item.cpp')
-rw-r--r--src/script/lua_api/l_item.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp
index 794d8a6e5..fc97a1736 100644
--- a/src/script/lua_api/l_item.cpp
+++ b/src/script/lua_api/l_item.cpp
@@ -632,8 +632,8 @@ int ModApiItemMod::l_get_content_id(lua_State *L)
NO_MAP_LOCK_REQUIRED;
std::string name = luaL_checkstring(L, 1);
- const IItemDefManager *idef = getGameDef(L)->getItemDefManager();
- const NodeDefManager *ndef = getGameDef(L)->getNodeDefManager();
+ const IItemDefManager *idef = getGameDef(L)->idef();
+ const NodeDefManager *ndef = getGameDef(L)->ndef();
// If this is called at mod load time, NodeDefManager isn't aware of
// aliases yet, so we need to handle them manually
@@ -658,7 +658,7 @@ int ModApiItemMod::l_get_name_from_content_id(lua_State *L)
NO_MAP_LOCK_REQUIRED;
content_t c = luaL_checkint(L, 1);
- const NodeDefManager *ndef = getGameDef(L)->getNodeDefManager();
+ const NodeDefManager *ndef = getGameDef(L)->ndef();
const char *name = ndef->get(c).name.c_str();
lua_pushstring(L, name);