bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/BasePropulsion.cs
2024-02-24 22:40:44 -05:00

26 lines
461 B
C#

using System.Collections.Generic;
public abstract class BasePropulsion : BasePart
{
public override bool ValidatePart()
{
if (!WPFMonoBehaviour.levelManager.RequireConnectedContraption)
{
return true;
}
List<BasePart> list = base.contraption.FindNeighbours(m_coordX, m_coordY);
int num = 0;
foreach (BasePart item in list)
{
if (item.IsPartOfChassis())
{
num++;
}
}
if (num < 1)
{
return false;
}
return true;
}
}