X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgamedef.h;h=726b9cef4fdccd0d652eee3cb7d75b08aa0dc635;hb=07e61e1155fca38260129bafd5880f050e72ef3d;hp=bc0ee14c31e0f42558f0c73179ac4d394ba79273;hpb=ce873108aa91d19104f46c5acd3350385e7a4541;p=dragonfireclient.git diff --git a/src/gamedef.h b/src/gamedef.h index bc0ee14c3..726b9cef4 100644 --- a/src/gamedef.h +++ b/src/gamedef.h @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes.h" class IItemDefManager; +class IWritableItemDefManager; class NodeDefManager; class ICraftDefManager; class ITextureSource; @@ -34,10 +35,14 @@ class Camera; class ModChannel; class ModMetadata; -namespace irr { namespace scene { - class IAnimatedMesh; - class ISceneManager; -}} +namespace irr +{ +namespace scene +{ +class IAnimatedMesh; +class ISceneManager; +} +} struct ModSpec; /* @@ -50,25 +55,27 @@ class IGameDef public: // These are thread-safe IF they are not edited while running threads. // Thus, first they are set up and then they are only read. - virtual IItemDefManager* getItemDefManager()=0; - virtual const NodeDefManager* getNodeDefManager()=0; - virtual ICraftDefManager* getCraftDefManager()=0; + virtual IItemDefManager *getItemDefManager() = 0; + virtual IWritableItemDefManager *getWritableItemDefManager() = 0; + virtual const NodeDefManager *getNodeDefManager() = 0; + virtual NodeDefManager *getWritableNodeDefManager() = 0; + virtual ICraftDefManager *getCraftDefManager() = 0; // Used for keeping track of names/ids of unknown nodes - virtual u16 allocateUnknownNodeId(const std::string &name)=0; + virtual u16 allocateUnknownNodeId(const std::string &name) = 0; // Only usable on the server, and NOT thread-safe. It is usable from the // environment thread. - virtual IRollbackManager* getRollbackManager() { return NULL; } + virtual IRollbackManager *getRollbackManager() { return NULL; } // Shorthands - IItemDefManager *idef() { return getItemDefManager(); } - const NodeDefManager *ndef() { return getNodeDefManager(); } - ICraftDefManager *cdef() { return getCraftDefManager(); } + IItemDefManager *idef() { return getItemDefManager(); } + const NodeDefManager *ndef() { return getNodeDefManager(); } + ICraftDefManager *cdef() { return getCraftDefManager(); } IRollbackManager *rollback() { return getRollbackManager(); } virtual const std::vector &getMods() const = 0; - virtual const ModSpec* getModSpec(const std::string &modname) const = 0; + virtual const ModSpec *getModSpec(const std::string &modname) const = 0; virtual std::string getWorldPath() const { return ""; } virtual std::string getModStoragePath() const = 0; virtual bool registerModStorage(ModMetadata *storage) = 0; @@ -76,7 +83,7 @@ class IGameDef virtual bool joinModChannel(const std::string &channel) = 0; virtual bool leaveModChannel(const std::string &channel) = 0; - virtual bool sendModChannelMessage(const std::string &channel, - const std::string &message) = 0; + virtual bool sendModChannelMessage( + const std::string &channel, const std::string &message) = 0; virtual ModChannel *getModChannel(const std::string &channel) = 0; };