public override void GridInitialising(IMyCubeGrid grid) { if (!grid.IsStatic) { return; } foreach (var remoteControl in grid.GetTerminalBlocksOfType <IMyRemoteControl>()) { if (remoteControl.IsControlledByFaction("GCORP") && remoteControl.CustomName.Contains(DeliverySpawnerPrefix)) // Finds both ground and air spawners { spawningBases.Add(remoteControl); } } }
public override void GridInitialising(IMyCubeGrid grid) { if (!grid.IsStatic) { return; } foreach (var remoteControl in grid.GetTerminalBlocksOfType <IMyRemoteControl>()) { // TODO: need another method to determine ownership (or just ignore it) if ( /*remoteControl.IsControlledByFaction("GCORP") && */ remoteControl.CustomName.Contains(DeliverySpawnerPrefix)) // Finds both ground and air spawners { spawningBases.Add(remoteControl); } } }