bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/BasePropulsion.cs

27 lines
461 B
C#
Raw Normal View History

2024-02-24 22:40:44 -05:00
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;
}
}