1
0
Fork 0
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:
Perttu Ahola 2011-11-12 17:37:14 +02:00
parent 0b97ad8384
commit 1320d07068
11 changed files with 274 additions and 95 deletions

View file

@ -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:
};