]> git.lizzy.rs Git - minetest.git/blobdiff - src/nodedef.h
WoW-style Autorun
[minetest.git] / src / nodedef.h
index 42b345059db219b14021ff3546ad0aa685033f93..7a84b0316c1df4dbaab48fe7a50043935aefc091 100644 (file)
@@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <iostream>
 #include <map>
 #include <list>
+#include "util/numeric.h"
 #include "mapnode.h"
 #ifndef SERVER
 #include "client/tile.h"
@@ -62,6 +63,8 @@ enum ContentParamType2
        CPT2_WALLMOUNTED,
        // Block level like FLOWINGLIQUID
        CPT2_LEVELED,
+       // 2D rotation for things like plants
+       CPT2_DEGROTATE,
 };
 
 enum LiquidType
@@ -112,6 +115,8 @@ struct TileDef
 {
        std::string name;
        bool backface_culling; // Takes effect only in special cases
+       bool tileable_horizontal;
+       bool tileable_vertical;
        struct{
                enum TileAnimationType type;
                int aspect_w; // width for aspect ratio
@@ -123,6 +128,8 @@ struct TileDef
        {
                name = "";
                backface_culling = true;
+               tileable_horizontal = true;
+               tileable_vertical = true;
                animation.type = TAT_NONE;
                animation.aspect_w = 1;
                animation.aspect_h = 1;
@@ -193,6 +200,7 @@ struct ContentFeatures
        std::string mesh;
 #ifndef SERVER
        scene::IMesh *mesh_ptr[24];
+       video::SColor minimap_color;
 #endif
        float visual_scale; // Misc. scale parameter
        TileDef tiledef[6];
@@ -201,6 +209,7 @@ struct ContentFeatures
 
        // Post effect color, drawn when the camera is inside the node.
        video::SColor post_effect_color;
+
        // Type of MapNode::param1
        ContentParamType param_type;
        // Type of MapNode::param2
@@ -282,12 +291,6 @@ struct ContentFeatures
        }
 };
 
-enum NodeResolveMethod {
-       NODE_RESOLVE_NONE,
-       NODE_RESOLVE_DIRECT,
-       NODE_RESOLVE_DEFERRED,
-};
-
 class INodeDefManager {
 public:
        INodeDefManager(){}
@@ -306,7 +309,7 @@ class INodeDefManager {
 
        virtual bool getNodeRegistrationStatus() const=0;
 
-       virtual void pendNodeResolve(NodeResolver *nr, NodeResolveMethod how)=0;
+       virtual void pendNodeResolve(NodeResolver *nr)=0;
        virtual bool cancelNodeResolveCallback(NodeResolver *nr)=0;
 };
 
@@ -340,6 +343,11 @@ class IWritableNodeDefManager : public INodeDefManager {
        */
        virtual void updateAliases(IItemDefManager *idef)=0;
 
+       /*
+               Override textures from servers with ones specified in texturepack/override.txt
+       */
+       virtual void applyTextureOverrides(const std::string &override_filepath)=0;
+
        /*
                Update tile textures to latest return values of TextueSource.
        */
@@ -353,7 +361,7 @@ class IWritableNodeDefManager : public INodeDefManager {
        virtual bool getNodeRegistrationStatus() const=0;
        virtual void setNodeRegistrationStatus(bool completed)=0;
 
-       virtual void pendNodeResolve(NodeResolver *nr, NodeResolveMethod how)=0;
+       virtual void pendNodeResolve(NodeResolver *nr)=0;
        virtual bool cancelNodeResolveCallback(NodeResolver *nr)=0;
        virtual void runNodeResolveCallbacks()=0;
        virtual void resetNodeResolveState()=0;
@@ -371,7 +379,6 @@ class NodeResolver {
                const std::string &node_alt, content_t c_fallback);
        bool getIdsFromNrBacklog(std::vector<content_t> *result_out,
                bool all_required=false, content_t c_fallback=CONTENT_IGNORE);
-       const std::string &getNodeName(content_t c) const;
 
        void nodeResolveInternal();
 
@@ -384,4 +391,3 @@ class NodeResolver {
 };
 
 #endif
-