1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Node definition names

This commit is contained in:
Perttu Ahola 2011-11-16 13:03:28 +02:00
parent 50d63e4b0a
commit c0f6395cf0
18 changed files with 972 additions and 549 deletions

View file

@ -253,6 +253,7 @@ public:
// Get node definition
virtual const ContentFeatures& get(content_t c) const=0;
virtual const ContentFeatures& get(const MapNode &n) const=0;
virtual bool getId(const std::string &name, content_t &result) const=0;
virtual void serialize(std::ostream &os)=0;
};
@ -266,10 +267,16 @@ public:
// Get node definition
virtual const ContentFeatures& get(content_t c) const=0;
virtual const ContentFeatures& get(const MapNode &n) const=0;
virtual bool getId(const std::string &name, content_t &result) const=0;
// Register node definition
virtual void set(content_t c, const ContentFeatures &def)=0;
virtual ContentFeatures* getModifiable(content_t c)=0;
// Register node definition by name (allocate an id)
// If returns CONTENT_IGNORE, could not allocate id
virtual content_t set(const std::string &name,
const ContentFeatures &def)=0;
// If returns CONTENT_IGNORE, could not allocate id
virtual content_t allocateDummy(const std::string &name)=0;
/*
Update tile textures to latest return values of TextueSource.