26 lines
461 B
C#
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;
|
|
}
|
|
}
|