1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Add minetest.register_lbm() to run code on block load only

This commit is contained in:
est31 2016-02-09 07:08:31 +01:00
parent 88fbe7ca1e
commit d494733839
12 changed files with 493 additions and 25 deletions

View file

@ -303,7 +303,8 @@ public:
virtual bool getId(const std::string &name, content_t &result) const=0;
virtual content_t getId(const std::string &name) const=0;
// Allows "group:name" in addition to regular node names
virtual void getIds(const std::string &name, std::set<content_t> &result)
// returns false if node name not found, true otherwise
virtual bool getIds(const std::string &name, std::set<content_t> &result)
const=0;
virtual const ContentFeatures &get(const std::string &name) const=0;
@ -327,7 +328,7 @@ public:
// If not found, returns CONTENT_IGNORE
virtual content_t getId(const std::string &name) const=0;
// Allows "group:name" in addition to regular node names
virtual void getIds(const std::string &name, std::set<content_t> &result)
virtual bool getIds(const std::string &name, std::set<content_t> &result)
const=0;
// If not found, returns the features of CONTENT_UNKNOWN
virtual const ContentFeatures &get(const std::string &name) const=0;