summaryrefslogtreecommitdiff
path: root/src/server.h
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/server.h
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/server.h')
-rw-r--r--src/server.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server.h b/src/server.h
index ae7511bdf..b5db04c8a 100644
--- a/src/server.h
+++ b/src/server.h
@@ -45,7 +45,7 @@ class ChatEvent;
struct ChatEventChat;
struct ChatInterface;
class IWritableItemDefManager;
-class IWritableNodeDefManager;
+class NodeDefManager;
class IWritableCraftDefManager;
class BanManager;
class EventManager;
@@ -256,7 +256,7 @@ public:
// IGameDef interface
// Under envlock
virtual IItemDefManager* getItemDefManager();
- virtual INodeDefManager* getNodeDefManager();
+ virtual const NodeDefManager* getNodeDefManager();
virtual ICraftDefManager* getCraftDefManager();
virtual u16 allocateUnknownNodeId(const std::string &name);
virtual MtEventManager* getEventManager();
@@ -264,7 +264,7 @@ public:
virtual EmergeManager *getEmergeManager() { return m_emerge; }
IWritableItemDefManager* getWritableItemDefManager();
- IWritableNodeDefManager* getWritableNodeDefManager();
+ NodeDefManager* getWritableNodeDefManager();
IWritableCraftDefManager* getWritableCraftDefManager();
virtual const std::vector<ModSpec> &getMods() const { return m_mods; }
@@ -366,7 +366,8 @@ private:
void SendDeathscreen(session_t peer_id, bool set_camera_point_target,
v3f camera_point_target);
void SendItemDef(session_t peer_id, IItemDefManager *itemdef, u16 protocol_version);
- void SendNodeDef(session_t peer_id, INodeDefManager *nodedef, u16 protocol_version);
+ void SendNodeDef(session_t peer_id, const NodeDefManager *nodedef,
+ u16 protocol_version);
/* mark blocks not sent for all clients */
void SetBlocksNotSent(std::map<v3s16, MapBlock *>& block);
@@ -544,7 +545,7 @@ private:
IWritableItemDefManager *m_itemdef;
// Node definition manager
- IWritableNodeDefManager *m_nodedef;
+ NodeDefManager *m_nodedef;
// Craft definition manager
IWritableCraftDefManager *m_craftdef;