mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
The huge item definition and item namespace unification patch (itemdef), see http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
This commit is contained in:
parent
569156b013
commit
6a76c226e1
65 changed files with 7232 additions and 7282 deletions
|
@ -21,11 +21,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#define GAMEDEF_HEADER
|
||||
|
||||
#include <string>
|
||||
#include "irrlichttypes.h"
|
||||
|
||||
class IToolDefManager;
|
||||
class IItemDefManager;
|
||||
class INodeDefManager;
|
||||
class ICraftDefManager;
|
||||
class ICraftItemDefManager;
|
||||
// Mineral too?
|
||||
class ITextureSource;
|
||||
|
||||
|
@ -39,10 +39,9 @@ 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 IToolDefManager* getToolDefManager()=0;
|
||||
virtual IItemDefManager* getItemDefManager()=0;
|
||||
virtual INodeDefManager* getNodeDefManager()=0;
|
||||
virtual ICraftDefManager* getCraftDefManager()=0;
|
||||
virtual ICraftItemDefManager* getCraftItemDefManager()=0;
|
||||
|
||||
// This is always thread-safe, but referencing the irrlicht texture
|
||||
// pointers in other threads than main thread will make things explode.
|
||||
|
@ -52,10 +51,9 @@ public:
|
|||
virtual u16 allocateUnknownNodeId(const std::string &name)=0;
|
||||
|
||||
// Shorthands
|
||||
IToolDefManager* tdef(){return getToolDefManager();}
|
||||
IItemDefManager* idef(){return getItemDefManager();}
|
||||
INodeDefManager* ndef(){return getNodeDefManager();}
|
||||
ICraftDefManager* cdef(){return getCraftDefManager();}
|
||||
ICraftItemDefManager* cidef(){return getCraftItemDefManager();}
|
||||
ITextureSource* tsrc(){return getTextureSource();}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue