3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include "cpp_api/s_base.h"
25 #include "cpp_api/s_nodemeta.h"
26 #include "util/string.h"
29 class ServerActiveObject;
32 : virtual public ScriptApiBase,
33 public ScriptApiNodemeta
37 virtual ~ScriptApiNode();
39 bool node_on_punch(v3s16 p, MapNode node,
40 ServerActiveObject *puncher, PointedThing pointed);
41 bool node_on_dig(v3s16 p, MapNode node,
42 ServerActiveObject *digger);
43 void node_on_construct(v3s16 p, MapNode node);
44 void node_on_destruct(v3s16 p, MapNode node);
45 bool node_on_flood(v3s16 p, MapNode node, MapNode newnode);
46 void node_after_destruct(v3s16 p, MapNode node);
47 bool node_on_timer(v3s16 p, MapNode node, f32 dtime);
48 void node_on_receive_fields(v3s16 p,
49 const std::string &formname,
50 const StringMap &fields,
51 ServerActiveObject *sender);
52 void node_falling_update(v3s16 p);
53 void node_falling_update_single(v3s16 p);
55 static struct EnumString es_DrawType[];
56 static struct EnumString es_ContentParamType[];
57 static struct EnumString es_ContentParamType2[];
58 static struct EnumString es_LiquidType[];
59 static struct EnumString es_NodeBoxType[];
64 #endif /* S_NODE_H_ */