Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
s_node.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include "irr_v3d.h"
8#include "cpp_api/s_base.h"
10#include "util/string.h"
11
12struct MapNode;
14
16 : virtual public ScriptApiBase,
18{
19public:
20 ScriptApiNode() = default;
21 virtual ~ScriptApiNode() = default;
22
23 bool node_on_punch(v3s16 p, MapNode node,
24 ServerActiveObject *puncher, const PointedThing &pointed);
25 bool node_on_dig(v3s16 p, MapNode node,
26 ServerActiveObject *digger);
27 void node_on_construct(v3s16 p, MapNode node);
28 void node_on_destruct(v3s16 p, MapNode node);
29 bool node_on_flood(v3s16 p, MapNode node, MapNode newnode);
31 bool node_on_timer(v3s16 p, MapNode node, f32 dtime);
33 const std::string &formname,
34 const StringMap &fields,
35 ServerActiveObject *sender);
36public:
37 static struct EnumString es_DrawType[];
38 static struct EnumString es_ContentParamType[];
40 static struct EnumString es_LiquidType[];
42 static struct EnumString es_NodeBoxType[];
43 static struct EnumString es_TextureAlphaMode[];
44};
Definition s_base.h:64
Definition s_node.h:18
static struct EnumString es_LiquidType[]
Definition s_node.h:59
bool node_on_flood(v3s16 p, MapNode node, MapNode newnode)
Definition s_node.cpp:178
bool node_on_dig(v3s16 p, MapNode node, ServerActiveObject *digger)
Definition s_node.cpp:115
static struct EnumString es_LiquidMoveType[]
Definition s_node.h:41
bool node_on_timer(v3s16 p, MapNode node, f32 dtime)
Definition s_node.cpp:218
static struct EnumString es_TextureAlphaMode[]
Definition s_node.h:84
static struct EnumString es_DrawType[]
Definition s_node.h:16
static struct EnumString es_ContentParamType[]
Definition s_node.h:67
void node_on_receive_fields(v3s16 p, const std::string &formname, const StringMap &fields, ServerActiveObject *sender)
Definition s_node.cpp:238
void node_after_destruct(v3s16 p, MapNode node)
Definition s_node.cpp:199
virtual ~ScriptApiNode()=default
bool node_on_punch(v3s16 p, MapNode node, ServerActiveObject *puncher, const PointedThing &pointed)
Definition s_node.cpp:92
static struct EnumString es_NodeBoxType[]
Definition s_node.h:74
void node_on_construct(v3s16 p, MapNode node)
Definition s_node.cpp:142
static struct EnumString es_ContentParamType2[]
Definition s_node.h:39
void node_on_destruct(v3s16 p, MapNode node)
Definition s_node.cpp:160
ScriptApiNode()=default
Definition s_nodemeta.h:17
Definition serveractiveobject.h:41
core::vector3d< s16 > v3s16
Definition irr_v3d.h:13
std::unordered_map< std::string, std::string > StringMap
Definition string.h:65
Definition c_types.h:16
Definition mapnode.h:124
An active object or node which is selected by a ray on the map.
Definition pointedthing.h:22
static std::string p(std::string path)
Definition test_filesys.cpp:53