]> git.lizzy.rs Git - minetest.git/blobdiff - src/nodedef.h
Use single box for halo mesh
[minetest.git] / src / nodedef.h
index a4a7b6e41b9d8cd6ee7bb7deadeeacc697d587e5..db36021cfc1fdb6ca09b82626281165e015ed0fe 100644 (file)
@@ -63,6 +63,8 @@ enum ContentParamType2
        CPT2_WALLMOUNTED,
        // Block level like FLOWINGLIQUID
        CPT2_LEVELED,
+       // 2D rotation for things like plants
+       CPT2_DEGROTATE,
 };
 
 enum LiquidType
@@ -102,6 +104,30 @@ struct NodeBox
 struct MapNode;
 class NodeMetadata;
 
+enum NodeDrawType
+{
+       NDT_NORMAL, // A basic solid block
+       NDT_AIRLIKE, // Nothing is drawn
+       NDT_LIQUID, // Do not draw face towards same kind of flowing/source liquid
+       NDT_FLOWINGLIQUID, // A very special kind of thing
+       NDT_GLASSLIKE, // Glass-like, don't draw faces towards other glass
+       NDT_ALLFACES, // Leaves-like, draw all faces no matter what
+       NDT_ALLFACES_OPTIONAL, // Fancy -> allfaces, fast -> normal
+       NDT_TORCHLIKE,
+       NDT_SIGNLIKE,
+       NDT_PLANTLIKE,
+       NDT_FENCELIKE,
+       NDT_RAILLIKE,
+       NDT_NODEBOX,
+       NDT_GLASSLIKE_FRAMED, // Glass-like, draw connected frames and all all
+                             // visible faces
+                                                 // uses 2 textures, one for frames, second for faces
+       NDT_FIRELIKE, // Draw faces slightly rotated and only on connecting nodes,
+       NDT_GLASSLIKE_FRAMED_OPTIONAL,  // enabled -> connected, disabled -> Glass-like
+                                                                       // uses 2 textures, one for frames, second for faces
+       NDT_MESH, // Uses static meshes
+};
+
 /*
        Stand-alone definition of a TileSpec (basically a server-side TileSpec)
 */
@@ -135,31 +161,7 @@ struct TileDef
        }
 
        void serialize(std::ostream &os, u16 protocol_version) const;
-       void deSerialize(std::istream &is);
-};
-
-enum NodeDrawType
-{
-       NDT_NORMAL, // A basic solid block
-       NDT_AIRLIKE, // Nothing is drawn
-       NDT_LIQUID, // Do not draw face towards same kind of flowing/source liquid
-       NDT_FLOWINGLIQUID, // A very special kind of thing
-       NDT_GLASSLIKE, // Glass-like, don't draw faces towards other glass
-       NDT_ALLFACES, // Leaves-like, draw all faces no matter what
-       NDT_ALLFACES_OPTIONAL, // Fancy -> allfaces, fast -> normal
-       NDT_TORCHLIKE,
-       NDT_SIGNLIKE,
-       NDT_PLANTLIKE,
-       NDT_FENCELIKE,
-       NDT_RAILLIKE,
-       NDT_NODEBOX,
-       NDT_GLASSLIKE_FRAMED, // Glass-like, draw connected frames and all all
-                             // visible faces
-                                                 // uses 2 textures, one for frames, second for faces
-       NDT_FIRELIKE, // Draw faces slightly rotated and only on connecting nodes,
-       NDT_GLASSLIKE_FRAMED_OPTIONAL,  // enabled -> connected, disabled -> Glass-like
-                                                                       // uses 2 textures, one for frames, second for faces
-       NDT_MESH, // Uses static meshes
+       void deSerialize(std::istream &is, const u8 contentfeatures_version, const NodeDrawType drawtype);
 };
 
 #define CF_SPECIAL_COUNT 6
@@ -227,6 +229,8 @@ struct ContentFeatures
        bool climbable;
        // Player can build on these
        bool buildable_to;
+       // Liquids flow into and replace node
+       bool floodable;
        // Player cannot build to these (placement prediction disabled)
        bool rightclickable;
        // Flowing liquid or snow, value = default level