X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fnodedef.h;h=fa0c1f2e848bf7d3b5fcf5e80c9ef57e96dd504d;hb=6b9906687b85fcefa28df572d92a3dea3118c0a3;hp=7c6931834b98d99dccb6ab5b980a10b5c2801edf;hpb=1575448b1a71dd029a8d135d2aff9096483a9953;p=oweals%2Fminetest.git diff --git a/src/nodedef.h b/src/nodedef.h index 7c6931834..fa0c1f2e8 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -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; };