add IsAnimal to animals for finding them

directional-lights
Maikel de Vries 2016-10-01 11:31:40 +02:00
parent 9299ec4223
commit df43ab86f2
6 changed files with 12 additions and 0 deletions

View File

@ -55,6 +55,8 @@ func Place(int amount, proplist rectangle, proplist settings)
return f; // return last created fish
}
public func IsAnimal() { return true; }
func Construction()
{
// general stuff

View File

@ -49,6 +49,8 @@ public func Place(int amount, proplist rectangle, proplist settings)
return animal;
}
public func IsAnimal() { return true; }
func Construction()
{
turn_angle = -60;

View File

@ -57,6 +57,8 @@ public func Place(int amount, proplist rectangle, proplist settings)
return animal;
}
public func IsAnimal() { return true; }
public func Construction()
{
turn_angle = 0;

View File

@ -22,6 +22,8 @@ private func Construction()
return _inherited(...);
}
public func IsAnimal() { return true; }
private func Attack(object target, int x, int y)
{
if (!attacking || (target->GetAction() != "Swim" && target->GetAction() != "Jump") || !target->GetAlive() || !PathFree(GetX(), GetY(), target->GetX(), target->GetY()))

View File

@ -71,6 +71,8 @@ public func Place(int amount, proplist rectangle, proplist settings)
return f; // return last created fish
}
public func IsAnimal() { return true; }
public func Construction()
{
current_orientation = [0, -2, 1];

View File

@ -16,6 +16,8 @@ public func Initialize()
return;
}
public func IsAnimal() { return true; }
public func Place(int amount, proplist area)
{
if (this != Wipf)