summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-29 21:56:07 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-05-29 21:56:07 +0200
commit322ba59c3a0500226e1b934c3390cffe4360ddb4 (patch)
tree0f5d1917a78bc71f03de16f31bad4b0d58a22cf5 /source/cPlayer.h
parentAdded code for the chunks to manipulate their neighbors while ticking. Also added some basic farming support - melon and pumpkin growing code. Untested and untestable so far, will test and fix later. (diff)
downloadcuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar.gz
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar.bz2
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar.lz
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar.xz
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.tar.zst
cuberite-322ba59c3a0500226e1b934c3390cffe4360ddb4.zip
Diffstat (limited to '')
-rw-r--r--source/cPlayer.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/cPlayer.h b/source/cPlayer.h
index 830289046..815c31316 100644
--- a/source/cPlayer.h
+++ b/source/cPlayer.h
@@ -81,7 +81,10 @@ public:
void TossItem( bool a_bDraggingItem, int a_Amount = 1 ); //tolua_export
void Heal( int a_Health ); //tolua_export
- void Feed( short a_Food );
+
+ /// Returns true if any food has been consumed, false if player "full"
+ bool Feed(short a_Food);
+
void TakeDamage( int a_Damage, cEntity* a_Instigator ); //tolua_export
void KilledBy( cEntity* a_Killer ); //tolua_export
void Respawn(); //tolua_export
@@ -97,8 +100,10 @@ public:
const AString & GetLoadedWorldName() { return m_LoadedWorldName; }
- void UseEquippedItem();
+ void UseEquippedItem(void);
+ /// Returns true if the item type is edible && it has been consumed, false otherwise
+ bool EatItem(int a_ItemType);
protected:
virtual void Destroyed();