diff options
Diffstat (limited to 'src/gamedef.h')
-rw-r--r-- | src/gamedef.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/gamedef.h b/src/gamedef.h index 793d85b39..a5f6b5968 100644 --- a/src/gamedef.h +++ b/src/gamedef.h @@ -31,6 +31,7 @@ class ISoundManager; class IShaderSource; class MtEventManager; class IRollbackManager; +class EmergeManager; namespace irr { namespace scene { class IAnimatedMesh; class ISceneManager; @@ -55,10 +56,10 @@ public: virtual ITextureSource* getTextureSource()=0; virtual IShaderSource* getShaderSource()=0; - + // Used for keeping track of names/ids of unknown nodes virtual u16 allocateUnknownNodeId(const std::string &name)=0; - + // Only usable on the client virtual ISoundManager* getSoundManager()=0; virtual MtEventManager* getEventManager()=0; @@ -69,20 +70,24 @@ public: // Only usable on the server, and NOT thread-safe. It is usable from the // environment thread. virtual IRollbackManager* getRollbackManager(){return NULL;} - + + // Only usable on the server. Thread safe if not written while running threads. + virtual EmergeManager *getEmergeManager() { return NULL; } + // Used on the client virtual bool checkLocalPrivilege(const std::string &priv) { return false; } - + // Shorthands - IItemDefManager* idef(){return getItemDefManager();} - INodeDefManager* ndef(){return getNodeDefManager();} - ICraftDefManager* cdef(){return getCraftDefManager();} - ITextureSource* tsrc(){return getTextureSource();} - ISoundManager* sound(){return getSoundManager();} - IShaderSource* shsrc(){return getShaderSource();} - MtEventManager* event(){return getEventManager();} - IRollbackManager* rollback(){return getRollbackManager();} + IItemDefManager *idef() { return getItemDefManager(); } + INodeDefManager *ndef() { return getNodeDefManager(); } + ICraftDefManager *cdef() { return getCraftDefManager(); } + ITextureSource *tsrc() { return getTextureSource(); } + ISoundManager *sound() { return getSoundManager(); } + IShaderSource *shsrc() { return getShaderSource(); } + MtEventManager *event() { return getEventManager(); } + IRollbackManager *rollback() { return getRollbackManager();} + EmergeManager *emerge() { return getEmergeManager(); } }; #endif |