Ejemplo n.º 1
0
 public static void Init(ConfigNode config)
 {
     Debug.LogFormat($"{ModTag} Init()");
     All.Clear();
     foreach (ConfigNode node in config.GetNodes("TechLevelInfo"))
     {
         TechLevelInfo obj = ConfigNode.CreateObjectFromConfig <TechLevelInfo>(node);
         Debug.LogFormat($"{ModTag} Adding TL {obj}");
         All.Add(obj.Level, obj);
     }
     initialized = true;
 }
Ejemplo n.º 2
0
        private void Initialize()
        {
            if (!staticInit && GameDatabase.Instance.GetConfigNode("RealAntennas/RealAntennasCommNetParams/RealAntennasCommNetParams") is ConfigNode RAParamNode)
            {
                Antenna.BandInfo.Init(RAParamNode);
                Antenna.Encoder.Init(RAParamNode);
                TechLevelInfo.Init(RAParamNode);
                staticInit = true;
            }

            float fTSLvl = ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.TrackingStation);

            GroundStationTechLevel = Mathf.RoundToInt(MaxTL * (HighLogic.CurrentGame.Mode == Game.Modes.CAREER ? fTSLvl : 1));
        }
Ejemplo n.º 3
0
        public static void Init(ConfigNode config)
        {
            string res = $"{ModTag} Init()";

            All.Clear();
            foreach (ConfigNode node in config.GetNodes("TechLevelInfo"))
            {
                TechLevelInfo obj = ConfigNode.CreateObjectFromConfig <TechLevelInfo>(node);
                res += $"\n{ModTag} Adding TL {obj}";
                All.Add(obj.Level, obj);
                MaxTL = Math.Max(MaxTL, obj.Level);
            }
            Debug.Log(res);
            initialized = true;
        }