]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/cpp_api/s_node.h
Fix wrong code comment (#8061)
[dragonfireclient.git] / src / script / cpp_api / s_node.h
index bff6072b9df9c813d3443265cfdf700031c9ce10..e7c0c01d18ada7f34f8d96686771dcae33bcb5af 100644 (file)
@@ -17,16 +17,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef S_NODE_H_
-#define S_NODE_H_
-
-#include <map>
+#pragma once
 
 #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
@@ -34,20 +32,21 @@ class ScriptApiNode
                  public ScriptApiNodemeta
 {
 public:
-       ScriptApiNode();
-       virtual ~ScriptApiNode();
+       ScriptApiNode() = default;
+       virtual ~ScriptApiNode() = default;
 
        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);
 public:
        static struct EnumString es_DrawType[];
@@ -56,7 +55,3 @@ class ScriptApiNode
        static struct EnumString es_LiquidType[];
        static struct EnumString es_NodeBoxType[];
 };
-
-
-
-#endif /* S_NODE_H_ */