]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/cpp_api/s_node.h
Fix CSM crash (#5779)
[dragonfireclient.git] / src / script / cpp_api / s_node.h
index bff6072b9df9c813d3443265cfdf700031c9ce10..eb127909d724e36145fb40d01767faa68fc1b7a6 100644 (file)
@@ -20,13 +20,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef S_NODE_H_
 #define S_NODE_H_
 
-#include <map>
-
 #include "irr_v3d.h"
 #include "cpp_api/s_base.h"
 #include "cpp_api/s_nodemeta.h"
+#include "util/string.h"
 
-class MapNode;
+struct MapNode;
 class ServerActiveObject;
 
 class ScriptApiNode
@@ -38,17 +37,20 @@ class ScriptApiNode
        virtual ~ScriptApiNode();
 
        bool node_on_punch(v3s16 p, MapNode node,
-                       ServerActiveObject *puncher);
+                       ServerActiveObject *puncher, PointedThing pointed);
        bool node_on_dig(v3s16 p, MapNode node,
                        ServerActiveObject *digger);
        void node_on_construct(v3s16 p, MapNode node);
        void node_on_destruct(v3s16 p, MapNode node);
+       bool node_on_flood(v3s16 p, MapNode node, MapNode newnode);
        void node_after_destruct(v3s16 p, MapNode node);
        bool node_on_timer(v3s16 p, MapNode node, f32 dtime);
        void node_on_receive_fields(v3s16 p,
                        const std::string &formname,
-                       const std::map<std::string, std::string> &fields,
+                       const StringMap &fields,
                        ServerActiveObject *sender);
+       void node_falling_update(v3s16 p);
+       void node_falling_update_single(v3s16 p);
 public:
        static struct EnumString es_DrawType[];
        static struct EnumString es_ContentParamType[];