Bugfix: Errors in UnitTest upon destruction of the pipe

liquid_container
Mark 2016-02-06 09:06:50 +01:00
parent d6f600bbd2
commit 06f3e26ad5
2 changed files with 8 additions and 3 deletions

View File

@ -91,9 +91,6 @@ public func GetPipeKit()
}
else
{
if (GetActionTarget(0)->GetID() == Pipe) return GetActionTarget(0);
if (GetActionTarget(1)->GetID() == Pipe) return GetActionTarget(1);
FatalError("Unexpected error: This pipe has lost its pipe kit!");
}
}

View File

@ -45,6 +45,14 @@ protected func Hit()
Sound("Hits::GeneralHit?");
}
private func Destruction()
{
// remove the line first, so that it does not provoke errors on destruction
var line = GetConnectedLine();
if (line) line->RemoveObject();
}
public func IsToolProduct() { return true;}
public func CanBeStackedWith(object other)