summaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2018-02-10 22:04:16 +0200
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-02-10 21:04:16 +0100
commit3face01a202040e4feff3b0936b4aa89c051c98d (patch)
treeccdad6773aa9705cc07fdc9f71f28bae395f353e /src/script/common
parent617d94c8038e3ff035eaeef7ccdfa4f442feb873 (diff)
downloadminetest-3face01a202040e4feff3b0936b4aa89c051c98d.tar.gz
minetest-3face01a202040e4feff3b0936b4aa89c051c98d.tar.bz2
minetest-3face01a202040e4feff3b0936b4aa89c051c98d.zip
Node definition manager refactor (#7016)
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp4
-rw-r--r--src/script/common/c_content.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 38e9411af..5229572f1 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -1075,7 +1075,7 @@ NodeBox read_nodebox(lua_State *L, int index)
}
/******************************************************************************/
-MapNode readnode(lua_State *L, int index, INodeDefManager *ndef)
+MapNode readnode(lua_State *L, int index, const NodeDefManager *ndef)
{
lua_getfield(L, index, "name");
if (!lua_isstring(L, -1))
@@ -1099,7 +1099,7 @@ MapNode readnode(lua_State *L, int index, INodeDefManager *ndef)
}
/******************************************************************************/
-void pushnode(lua_State *L, const MapNode &n, INodeDefManager *ndef)
+void pushnode(lua_State *L, const MapNode &n, const NodeDefManager *ndef)
{
lua_newtable(L);
lua_pushstring(L, ndef->get(n).name.c_str());
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h
index d5c375a8f..723253559 100644
--- a/src/script/common/c_content.h
+++ b/src/script/common/c_content.h
@@ -44,7 +44,7 @@ extern "C" {
namespace Json { class Value; }
struct MapNode;
-class INodeDefManager;
+class NodeDefManager;
struct PointedThing;
struct ItemStack;
struct ItemDefinition;
@@ -120,9 +120,9 @@ void read_inventory_list (lua_State *L, int tableindex,
Server *srv, int forcesize=-1);
MapNode readnode (lua_State *L, int index,
- INodeDefManager *ndef);
+ const NodeDefManager *ndef);
void pushnode (lua_State *L, const MapNode &n,
- INodeDefManager *ndef);
+ const NodeDefManager *ndef);
void read_groups (lua_State *L, int index,