]> git.lizzy.rs Git - dragonfireclient.git/blob - src/scriptapi_node.h
split scriptapi.cpp
[dragonfireclient.git] / src / scriptapi_node.h
1 /*
2 Minetest-c55
3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
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.
9
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.
14
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.
18 */
19
20 #ifndef LUA_NODE_H_
21 #define LUA_NODE_H_
22
23 #include <irr_v3d.h>
24 #include <iostream>
25 #include <map>
26
27 extern "C" {
28 #include <lua.h>
29 }
30
31 #include "content_sao.h"
32 #include "map.h"
33
34 /*****************************************************************************/
35 /* Minetest interface                                                        */
36 /*****************************************************************************/
37 bool scriptapi_node_on_punch(lua_State *L, v3s16 p, MapNode node,
38                 ServerActiveObject *puncher);
39 bool scriptapi_node_on_dig(lua_State *L, v3s16 p, MapNode node,
40                 ServerActiveObject *digger);
41 void scriptapi_node_on_construct(lua_State *L, v3s16 p, MapNode node);
42 void scriptapi_node_on_destruct(lua_State *L, v3s16 p, MapNode node);
43 void scriptapi_node_after_destruct(lua_State *L, v3s16 p, MapNode node);
44 bool scriptapi_node_on_timer(lua_State *L, v3s16 p, MapNode node, f32 dtime);
45 void scriptapi_node_on_receive_fields(lua_State *L, v3s16 p,
46                 const std::string &formname,
47                 const std::map<std::string, std::string> &fields,
48                 ServerActiveObject *sender);
49
50 extern struct EnumString es_DrawType[];
51 extern struct EnumString es_ContentParamType[];
52 extern struct EnumString es_ContentParamType2[];
53 extern struct EnumString es_LiquidType[];
54 extern struct EnumString es_NodeBoxType[];
55
56 #endif /* LUA_NODE_H_ */