mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add ServerActiveObject::removingFromEnvironment()
This commit is contained in:
parent
0e113a4c81
commit
e6e3eef0ef
3 changed files with 17 additions and 6 deletions
|
@ -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){}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue