]> git.lizzy.rs Git - minetest.git/blobdiff - src/nodedef.h
Vary ore sheet y position by noise
[minetest.git] / src / nodedef.h
index 4ff6c6b48a10b69811453575994300a71be1a418..4f07565d1ad2073ded8fd09d44f3ec1e115a4ac9 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Minetest-c55
-Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -119,7 +119,7 @@ struct TileDef
                animation.length = 1.0;
        }
 
-       void serialize(std::ostream &os) const;
+       void serialize(std::ostream &os, u16 protocol_version) const;
        void deSerialize(std::istream &is);
 };
 
@@ -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.
@@ -234,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
@@ -264,7 +268,7 @@ class INodeDefManager
                        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
@@ -305,7 +309,7 @@ class IWritableNodeDefManager : public INodeDefManager
        */
        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;
 };