示例#1
0
 public static bool isTechUnlocked(String techName)
 {
     if (HighLogic.CurrentGame == null)
     {
         return(true);
     }
     else if (HighLogic.CurrentGame.Mode == Game.Modes.CAREER || HighLogic.CurrentGame.Mode == Game.Modes.SCIENCE_SANDBOX)
     {
         if (ResearchAndDevelopment.Instance == null)
         {
             MonoBehaviour.print("ERROR: R&D instance is null, no tech data available"); return(true);
         }
         RDTech.State techState = ResearchAndDevelopment.GetTechnologyState(techName);
         return(techState == RDTech.State.Available);
     }
     return(false);
 }
示例#2
0
 /// <summary>
 /// Stub to call into <see cref="RnDOverhaul.PerstistantInstance"/>.
 /// See <see cref="GetTechnologyStatePatch"/> info about the patched method.
 /// </summary>
 static bool Prefix(ref RDTech.State __result, string techID)
 {
     return(true);
 }