void FindAntenna()
 {
     baseAntenna  = part.GetComponent <ModuleDataTransmitterFeedeable>();
     deployModule = part.GetComponent <ModuleDeployableAntenna>();
     if (baseAntenna != null)
     {
         baseAntennaRange = baseAntenna.antennaPower;
     }
     else
     {
         RTAntennaPartModule = part.Modules.Contains("ModuleRTAntenna") ? part.Modules["ModuleRTAntenna"] : null;
         if (RTAntennaPartModule != null)
         {
             try
             {
                 FieldInfo fi = RTAntennaPartModule.GetType().GetField("Mode1DishRange");
                 baseAntennaRange = (float)(fi.GetValue(RTAntennaPartModule));
             }
             catch (Exception e)
             {
                 Debug.LogError("[NearFutureExploration] [ModuleAntennaFeed]: Mismatched RemoteTech antenna module");
             }
         }
         else
         {
             Debug.LogError("[NearFutureExploration] [ModuleAntennaFeed]: Could not find an antenna module for use as feeder");
         }
     }
     if (deployModule != null)
     {
         Debug.Log("[NearFutureExploration] [ModuleAntennaFeed]: Feed is deployable");
         deployable = true;
     }
 }
Exemple #2
0
        void FindAntenna()
        {
            baseAntenna  = part.GetComponent <ModuleDataTransmitterFeedeable>();
            deployModule = part.GetComponent <ModuleDeployableAntenna>();
            if (baseAntenna == null)
            {
                Debug.LogError("[NearFutureExploration] [ModuleAntennaFeed]: Could not find an antenna module for use as feeder");
            }
            else
            {
                if (deployModule != null)
                {
                    Debug.Log("[NearFutureExploration] [ModuleAntennaFeed]: Feed is deployable");
                    deployable = true;
                }
            }


            baseAntennaRange = baseAntenna.antennaPower;
        }