Hunger
#1
Hi, I've created a patch for rudimentary hunger management.
Eating food will saturate the food bar, but healing from the food bar isn't implemented yet.

Patch made against latest svn rev 154
(Had to add .txt for the forum)


Attached Files
.txt   hunger.patch.txt (Size: 6.82 KB / Downloads: 226)
Reply
Thanks given by:
#2
Added, good start, thanks.
Reply
Thanks given by:
#3
I think it should be outsourced a bit.
The clienthandle is already very overloadedBig Grin

For example:

if(SomeClass::IsFood(Item->m_ItemID))
{
if(m_Player->GetInventory().RemoveItem( Item )
m_Player->Feed(SomeClass::GetSaturation(Item->m_ItemID));
break;
}

This would make the cClientHandle a bit clearer Smile
Reply
Thanks given by:
#4
It could probably do with some refactoring later on. I was in fact a tad confused about how things were organized.
Reply
Thanks given by:
#5
Yes I also realized this.
Therefore I mentioned this point because we should try to clean up the code bit by bit.

Wink
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)