1 /* 2 script/cpp_api/s_entity.h 3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com> 4 */ 5 6 /* 7 This file is part of Freeminer. 8 9 Freeminer is free software: you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation, either version 3 of the License, or 12 (at your option) any later version. 13 14 Freeminer is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with Freeminer. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 #ifndef S_ENTITY_H_ 24 #define S_ENTITY_H_ 25 26 #include "cpp_api/s_base.h" 27 #include "irr_v3d.h" 28 29 struct ObjectProperties; 30 struct ToolCapabilities; 31 32 class ScriptApiEntity 33 : virtual public ScriptApiBase 34 { 35 public: 36 bool luaentity_Add(u16 id, const char *name); 37 void luaentity_Activate(u16 id, 38 const std::string &staticdata, u32 dtime_s); 39 void luaentity_Remove(u16 id); 40 std::string luaentity_GetStaticdata(u16 id); 41 void luaentity_GetProperties(u16 id, 42 ObjectProperties *prop); 43 void luaentity_Step(u16 id, float dtime); 44 void luaentity_Punch(u16 id, 45 ServerActiveObject *puncher, float time_from_last_punch, 46 const ToolCapabilities *toolcap, v3f dir); 47 void luaentity_Rightclick(u16 id, 48 ServerActiveObject *clicker); 49 }; 50 51 52 53 #endif /* S_ENTITY_H_ */ 54