various foodstuff: handle ControlUse properly

Otherwise other things might happen after consumption. Like, collecting rocks.
shapetextures
David Dormagen 2015-11-22 11:18:59 +01:00
parent 0fc114c075
commit fb32270106
5 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ protected func Hit()
protected func ControlUse(object clonk, int iX, int iY)
{
clonk->Eat(this);
return true;
}
public func NutritionalValue() { return 50; }

View File

@ -16,6 +16,7 @@ func Hit()
protected func ControlUse(object clonk)
{
clonk->Eat(this);
return true;
}
public func NutritionalValue() { return 25; }

View File

@ -15,6 +15,7 @@ public func Construction()
protected func ControlUse(object clonk, int iX, int iY)
{
clonk->Eat(this);
return true;
}
public func NutritionalValue() { return 5; }

View File

@ -179,6 +179,7 @@ func IsPlant(){return true;}
protected func ControlUse(object clonk, int iX, int iY)
{
clonk->Eat(this);
return true;
}
func NutritionalValue_() { return 5; }

View File

@ -41,6 +41,7 @@ public func RootSurface()
protected func ControlUse(object clonk)
{
clonk->Eat(this);
return true;
}
// Nutritional value depends on the completion of the mushroom.