]> git.lizzy.rs Git - minetest.git/blobdiff - src/nodedef.h
Don't use msvc libs for mingw build
[minetest.git] / src / nodedef.h
index 7505cc12d1353ad2a7afe05240e935c6e28e4f9d..c0322d9199d18d7048dde3ed993b97f023e8606b 100644 (file)
@@ -90,7 +90,7 @@ struct NodeBox
        { reset(); }
 
        void reset();
-       void serialize(std::ostream &os) const;
+       void serialize(std::ostream &os, u16 protocol_version) const;
        void deSerialize(std::istream &is);
 };
 
@@ -224,7 +224,11 @@ struct ContentFeatures
        u8 liquid_viscosity;
        // Is liquid renewable (new liquid source will be created between 2 existing)
        bool liquid_renewable;
-       bool drowning;
+       // Ice for water, water for ice
+       std::string freezemelt;
+       // Number of flowing liquids surrounding source
+       u8 liquid_range;
+       u8 drowning;
        // Amount of light the node emits
        u8 light_source;
        u32 damage_per_second;
@@ -293,15 +297,14 @@ class IWritableNodeDefManager : public INodeDefManager
        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;
+       // 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)
                        const=0;
-       // If not found, returns the features of CONTENT_IGNORE
+       // If not found, returns the features of CONTENT_UNKNOWN
        virtual const ContentFeatures& get(const std::string &name) const=0;
 
-       // Register node definition
-       virtual void set(content_t c, const ContentFeatures &def)=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,