diff options
Diffstat (limited to '')
-rw-r--r-- | source/Mobs/Cow.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/source/Mobs/Cow.cpp b/source/Mobs/Cow.cpp index 8e9b87d27..dc59016e7 100644 --- a/source/Mobs/Cow.cpp +++ b/source/Mobs/Cow.cpp @@ -2,15 +2,12 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Cow.h" +#include "../Entities/Player.h" -// TODO: Milk Cow - - - cCow::cCow(void) : @@ -31,3 +28,18 @@ void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer) + +void cCow::OnRightClicked(cPlayer & a_Player) +{ + if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_BUCKET)) + { + if (!a_Player.IsGameModeCreative()) + { + a_Player.GetInventory().RemoveOneEquippedItem(); + a_Player.GetInventory().AddItem(E_ITEM_MILK); + } + } +} + + + |