]> git.lizzy.rs Git - minetest.git/blobdiff - src/nodedef.h
Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid nodes...
[minetest.git] / src / nodedef.h
index f99f7f3219be6097982cb029e7c3dd0fd9e32725..1a12aae939580f66e041a9748c24f85d046191c0 100644 (file)
@@ -35,6 +35,9 @@ class Client;
 #include "constants.h" // BS
 #include "tileanimation.h"
 
+// PROTOCOL_VERSION >= 37
+static const u8 CONTENTFEATURES_VERSION = 13;
+
 class IItemDefManager;
 class ITextureSource;
 class IShaderSource;
@@ -405,8 +408,6 @@ struct ContentFeatures
        void reset();
        void serialize(std::ostream &os, u16 protocol_version) const;
        void deSerialize(std::istream &is);
-       void serializeOld(std::ostream &os, u16 protocol_version) const;
-       void deSerializeOld(std::istream &is, int version);
        /*!
         * Since vertex alpha is no longer supported, this method
         * adds opacity directly to the texture pixels.
@@ -667,6 +668,14 @@ class NodeDefManager {
         */
        void addNameIdMapping(content_t i, std::string name);
 
+       /*!
+        * Removes a content ID from all groups.
+        * Erases content IDs from vectors in \ref m_group_to_items and
+        * removes empty vectors.
+        * @param id Content ID
+        */
+       void eraseIdFromGroups(content_t id);
+
        /*!
         * Recalculates m_selection_box_int_union based on
         * m_selection_box_union.
@@ -733,9 +742,10 @@ class NodeResolver {
        virtual void resolveNodeNames() = 0;
 
        bool getIdFromNrBacklog(content_t *result_out,
-               const std::string &node_alt, content_t c_fallback);
+               const std::string &node_alt, content_t c_fallback,
+               bool error_on_fallback = true);
        bool getIdsFromNrBacklog(std::vector<content_t> *result_out,
-               bool all_required=false, content_t c_fallback=CONTENT_IGNORE);
+               bool all_required = false, content_t c_fallback = CONTENT_IGNORE);
 
        void nodeResolveInternal();