mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Add ServerActiveObject::removingFromEnvironment()
This commit is contained in:
@@ -54,8 +54,10 @@ public:
|
||||
ServerActiveObject(ServerEnvironment *env, v3f pos);
|
||||
virtual ~ServerActiveObject();
|
||||
|
||||
// Call after id has been set and has been inserted in environment
|
||||
virtual void addedToEnvironment();
|
||||
// Called after id has been set and has been inserted in environment
|
||||
virtual void addedToEnvironment(){};
|
||||
// Called before removing from environment
|
||||
virtual void removingFromEnvironment(){};
|
||||
|
||||
// Create a certain type of ServerActiveObject
|
||||
static ServerActiveObject* create(u8 type,
|
||||
@@ -111,6 +113,11 @@ public:
|
||||
the data is the static form)
|
||||
*/
|
||||
virtual std::string getStaticData(){return "";}
|
||||
/*
|
||||
Return false in here to never save and instead remove object
|
||||
on unload. getStaticData() will not be called in that case.
|
||||
*/
|
||||
virtual bool isStaticAllowed(){return true;}
|
||||
|
||||
virtual void punch(ServerActiveObject *puncher){}
|
||||
virtual void rightClick(ServerActiveObject *clicker){}
|
||||
|
Reference in New Issue
Block a user