mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Make ToolItem and MaterialItem to convert names by aliases at creation time too (necessary for eg. crafting)
This commit is contained in:
parent
97c3bc408b
commit
6145a135bd
6 changed files with 37 additions and 24 deletions
|
@ -253,6 +253,7 @@ public:
|
|||
virtual bool getId(const std::string &name, content_t &result) const=0;
|
||||
virtual content_t getId(const std::string &name) const=0;
|
||||
virtual const ContentFeatures& get(const std::string &name) const=0;
|
||||
virtual std::string getAlias(const std::string &name) const =0;
|
||||
|
||||
virtual void serialize(std::ostream &os)=0;
|
||||
};
|
||||
|
@ -270,6 +271,7 @@ public:
|
|||
virtual content_t getId(const std::string &name) const=0;
|
||||
// If not found, returns the features of CONTENT_IGNORE
|
||||
virtual const ContentFeatures& get(const std::string &name) const=0;
|
||||
virtual std::string getAlias(const std::string &name) const =0;
|
||||
|
||||
// Register node definition
|
||||
virtual void set(content_t c, const ContentFeatures &def)=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue