Ejemplo n.º 1
0
        public override void Start()
        {
            base.Start();
            heatModule = ModuleUtils.FindHeatModule(this.part, systemHeatModuleID);

            if (scalarModuleID != "")
            {
                scalarModule = part.GetComponents <ModuleSystemHeatColorAnimator>().ToList().Find(x => x.moduleID == scalarModuleID);
            }

            if (maxTempAnimation == -1f)
            {
                maxTempAnimation = (float)part.maxTemp;
            }

            maxTempAnimation -= draperPoint;

            Utils.Log("[ModuleSystemHeatRadiator] Setup completed", LogType.Modules);

            if (this.GetComponent <ModuleDeployableRadiator>() != null)
            {
                if (HighLogic.LoadedSceneIsFlight)
                {
                    if (sunTracking)
                    {
                        base._depRad.trackingMode = ModuleDeployablePart.TrackingMode.SUN;
                        base._depRad.isTracking   = true;
                    }
                    else
                    {
                        base._depRad.trackingMode  = ModuleDeployablePart.TrackingMode.NONE;
                        base._depRad.trackingSpeed = 0f;
                        base._depRad.isTracking    = false;
                    }
                }
                else
                {
                    this.Events["ToggleEditorSunTracking"].guiActiveEditor = true;
                }
            }
            else
            {
                if (HighLogic.LoadedSceneIsEditor)
                {
                    this.Events["ToggleEditorSunTracking"].guiActiveEditor = false;
                }
            }
        }
Ejemplo n.º 2
0
        public override void Start()
        {
            base.Start();
            heatModule = ModuleUtils.FindHeatModule(this.part, systemHeatModuleID);

            if (scalarModuleID != "")
            {
                scalarModule = part.GetComponents <ModuleSystemHeatColorAnimator>().ToList().Find(x => x.moduleID == scalarModuleID);
            }

            if (maxTempAnimation == -1f)
            {
                maxTempAnimation = (float)part.maxTemp;
            }

            maxTempAnimation -= draperPoint;

            Utils.Log("[ModuleSystemHeatRadiator] Setup completed", LogType.Modules);
        }