Merge pull request #503 from RealBadAngel/master
[oweals/minetest.git] / src / nodedef.h
index 7c6931834b98d99dccb6ab5b980a10b5c2801edf..fa0c1f2e848bf7d3b5fcf5e80c9ef57e96dd504d 100644 (file)
@@ -199,6 +199,8 @@ struct ContentFeatures
        bool climbable;
        // Player can build on these
        bool buildable_to;
+       // Player cannot build to these (placement prediction disabled)
+       bool rightclickable;
        // Whether the node is non-liquid, source liquid or flowing liquid
        enum LiquidType liquid_type;
        // If the content is liquid, this is the flowing version of the liquid.
@@ -209,6 +211,8 @@ struct ContentFeatures
        // 1 giving almost instantaneous propagation and 7 being
        // the slowest possible
        u8 liquid_viscosity;
+       // Is liquid renewable (new liquid source will be created between 2 existing)
+       bool liquid_renewable;
        // Amount of light the node emits
        u8 light_source;
        u32 damage_per_second;
@@ -232,8 +236,10 @@ struct ContentFeatures
        ContentFeatures();
        ~ContentFeatures();
        void reset();
-       void serialize(std::ostream &os);
+       void serialize(std::ostream &os, u16 protocol_version);
        void deSerialize(std::istream &is);
+       void serializeOld(std::ostream &os, u16 protocol_version);
+       void deSerializeOld(std::istream &is, int version);
 
        /*
                Some handy methods
@@ -262,7 +268,7 @@ public:
                        const=0;
        virtual const ContentFeatures& get(const std::string &name) const=0;
        
-       virtual void serialize(std::ostream &os)=0;
+       virtual void serialize(std::ostream &os, u16 protocol_version)=0;
 };
 
 class IWritableNodeDefManager : public INodeDefManager
@@ -303,7 +309,7 @@ public:
        */
        virtual void updateTextures(ITextureSource *tsrc)=0;
 
-       virtual void serialize(std::ostream &os)=0;
+       virtual void serialize(std::ostream &os, u16 protocol_version)=0;
        virtual void deSerialize(std::istream &is)=0;
 };