void Start()
 {
     foreach (PartModule p in this.part.Modules)
     {
         if (p.moduleName == "WorkshopAnimateGeneric")
         {
             wag = p as WorkshopAnimateGeneric;
             break;
         }
     }
     SetRepairStatus();
     StartCoroutine(DoDamageCheck());
 }
示例#2
0
        public override void OnStart(StartState state)
        {
            //Init the KAC Wrapper. KAC Wrapper courtey of TriggerAu
            KACWrapper.InitKACWrapper();
            if (KACWrapper.APIReady)
            {
                KACWrapper.KAC.onAlarmStateChanged += KAC_onAlarmStateChanged;
            }

            if (HighLogic.LoadedSceneIsFlight && WorkshopSettings.IsKISAvailable)
            {
                WorkshopUtils.Log("KIS is available - Initialize Workshop");
                SetupAnimations();
                LoadMaxVolume();
                LoadFilters();
                if (lastUpdateTime == 0)
                {
                    lastUpdateTime = Planetarium.GetUniversalTime();
                }
                GameEvents.onVesselChange.Add(OnVesselChange);
            }

            foreach (PartModule p in this.part.Modules)
            {
                if (p.moduleName == "WorkshopAnimateGeneric")
                {
                    wag = p as WorkshopAnimateGeneric;
                }
                if (p.moduleName == "WorkshopDamageController")
                {
                    wdc = p as WorkshopDamageController;
                }
            }
            if (wag != null && wag.packed)
            {
                Status = "Packed";
            }

            //this.part.GetComponent<WorkshopAnimateGeneric>()

            base.OnStart(state);
        }
示例#3
0
        public override void OnStart(StartState state)
        {
            //Init the KAC Wrapper. KAC Wrapper courtey of TriggerAu
            KACWrapper.InitKACWrapper();
            if (KACWrapper.APIReady)
            {
                KACWrapper.KAC.onAlarmStateChanged += KAC_onAlarmStateChanged;
            }

            if (HighLogic.LoadedSceneIsFlight && WorkshopSettings.IsKISAvailable)
            {
                GameEvents.onVesselChange.Add(OnVesselChange);
            }
            else
            {
                Fields["RecyclerStatus"].guiActive            = false;
                Events["ContextMenuOnOpenRecycler"].guiActive = false;
            }


            foreach (PartModule p in this.part.Modules)
            {
                if (p.moduleName == "WorkshopAnimateGeneric")
                {
                    wag = p as WorkshopAnimateGeneric;
                }
                if (p.moduleName == "WorkshopDamageController")
                {
                    wdc = p as WorkshopDamageController;
                }
            }


            if (wag != null && wag.packed)
            {
                RecyclerStatus = "Packed";
            }

            base.OnStart(state);
        }