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.
26 #include "cpp_api/s_base.h"
27 #include "cpp_api/s_nodemeta.h"
30 class ServerActiveObject;
33 : virtual public ScriptApiBase,
34 public ScriptApiNodemeta
38 virtual ~ScriptApiNode();
40 bool node_on_punch(v3s16 p, MapNode node,
41 ServerActiveObject *puncher, PointedThing pointed);
42 bool node_on_dig(v3s16 p, MapNode node,
43 ServerActiveObject *digger);
44 void node_on_construct(v3s16 p, MapNode node);
45 void node_on_destruct(v3s16 p, MapNode node);
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 std::map<std::string, std::string> &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_ */