From bfc68d31510bbd40732c19ada51d4683cb050de2 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 11 Nov 2011 19:33:17 +0200 Subject: Scripting WIP --- src/content_cao.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/content_cao.h') diff --git a/src/content_cao.h b/src/content_cao.h index 963e1a488..c8554e737 100644 --- a/src/content_cao.h +++ b/src/content_cao.h @@ -376,6 +376,46 @@ private: Settings *m_properties; }; +/* + LuaEntityCAO +*/ + +class LuaEntityCAO : public ClientActiveObject +{ +public: + LuaEntityCAO(); + virtual ~LuaEntityCAO(); + + u8 getType() const + { + return ACTIVEOBJECT_TYPE_LUAENTITY; + } + + static ClientActiveObject* create(); + + void addToScene(scene::ISceneManager *smgr); + void removeFromScene(); + void updateLight(u8 light_at_pos); + v3s16 getLightPosition(); + void updateNodePos(); + + void step(float dtime, ClientEnvironment *env); + + void processMessage(const std::string &data); + + void initialize(const std::string &data); + + core::aabbox3d* getSelectionBox() + {return &m_selection_box;} + v3f getPosition() + {return m_position;} + +private: + core::aabbox3d m_selection_box; + scene::IMeshSceneNode *m_node; + v3f m_position; +}; + #endif -- cgit v1.2.3