Esempio n. 1
0
        public override void OnUpdate()
        {
            Events["DeployRadiator"].active  = !radiatorIsEnabled && isDeployable;
            Events["RetractRadiator"].active = radiatorIsEnabled && isDeployable;
            //if (ResearchAndDevelopment.Instance != null)
            //{
            //    Events["RetrofitRadiator"].active = !isupgraded && ResearchAndDevelopment.Instance.Science >= upgradeCost && hasrequiredupgrade;
            //}
            //else
            //{
            //    Events["RetrofitRadiator"].active = false;
            //}
            //Fields["upgradeCostStr"].guiActive = !isupgraded && hasrequiredupgrade;

            //if (ResearchAndDevelopment.Instance != null)
            //{
            //    upgradeCostStr = ResearchAndDevelopment.Instance.Science + "/" + upgradeCost.ToString("0") + " Science";
            //}


            if (update_count - last_draw_update > 8)
            {
                thermalPowerDissipStr = radiatedThermalPower.ToString("0.000") + "MW";
                thermalPowerConvStr   = convectedThermalPower.ToString("0.000") + "MW";
                radiatorTempStr       = current_rad_temp.ToString("0.0") + "K / " + radiatorTemp.ToString("0.0") + "K";

                last_draw_update = update_count;
            }


            if (!PluginHelper.isRadiatorEmissiveGlowDisabled())
            {
                colorHeat();
            }

            update_count++;
        }