1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Scripting WIP

This commit is contained in:
Perttu Ahola 2011-11-11 19:33:17 +02:00
parent ee8b6d3444
commit bfc68d3151
22 changed files with 1212 additions and 187 deletions

View file

@ -51,9 +51,11 @@ public:
NOTE: m_env can be NULL, but step() isn't called if it is.
Prototypes are used that way.
*/
ServerActiveObject(ServerEnvironment *env, u16 id, v3f pos);
ServerActiveObject(ServerEnvironment *env, v3f pos);
virtual ~ServerActiveObject();
virtual void addedToEnvironment(u16 id);
// Create a certain type of ServerActiveObject
static ServerActiveObject* create(u8 type,
ServerEnvironment *env, u16 id, v3f pos,
@ -160,7 +162,7 @@ public:
protected:
// Used for creating objects based on type
typedef ServerActiveObject* (*Factory)
(ServerEnvironment *env, u16 id, v3f pos,
(ServerEnvironment *env, v3f pos,
const std::string &data);
static void registerType(u16 type, Factory f);