mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Scripting WIP: dynamic object stuff
This commit is contained in:
parent
0b97ad8384
commit
1320d07068
11 changed files with 274 additions and 95 deletions
14
src/player.h
14
src/player.h
|
@ -215,12 +215,20 @@ public:
|
|||
Player::setPosition(position);
|
||||
ServerActiveObject::setBasePosition(position);
|
||||
}
|
||||
|
||||
/* ServerActiveObject interface */
|
||||
|
||||
/*
|
||||
ServerActiveObject interface
|
||||
*/
|
||||
u8 getType() const
|
||||
{return ACTIVEOBJECT_TYPE_PLAYER;}
|
||||
virtual std::string getDescription(){return getName();}
|
||||
// Returns a reference
|
||||
virtual InventoryItem* getWieldedItem();
|
||||
virtual void damageWieldedItem(u16 amount);
|
||||
// If all fits, eats item and returns true. Otherwise returns false.
|
||||
virtual bool addToInventory(InventoryItem *item);
|
||||
virtual void setHP(s16 hp_);
|
||||
virtual s16 getHP();
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue