예제 #1
0
        public void ButtonExtDoor(bool state)
        {
            if (Freezer == null)
            {
                Freezer = part.FindModuleImplementing<DeepFreezer>();
                Utilities.Log_Debug("DFExtDoorMgr buttonExtDoorState set part " + part.name);
            }
            if (Freezer == null) return; // If freezer is still null just return
            if (!Freezer.ExternalDoorActive) return;  // if freezer doesn't have an external door just return.

            if (Freezer._externaldoorstate == DoorState.OPEN)
            {
                //Door is open so we trigger a closedoor.
                Freezer.eventCloseDoors();
                Utilities.Log_Debug("DFExtDoorMgr ButtonExtDoor fired triggerred eventCloseDoors");
            }
            else
            {
                if (Freezer._externaldoorstate == DoorState.CLOSED)
                {
                    //Door is closed so we trigger a opendoor.
                    Freezer.eventOpenDoors();
                    Utilities.Log_Debug("DFExtDoorMgr ButtonExtDoor fired triggerred eventOpenDoors");
                }
                else
                {
                    // door already opening or closing...
                    Utilities.Log_Debug("DFExtDoorMgr ButtonExtDoor fired but door state is opening, closing or unknown");
                }
            }
        }
예제 #2
0
 public bool ButtonExtDoorState()
 {
     // Utilities.Log_Debug("DFExtDoorMgr ButtonExtDoorState fired");
     if (Freezer == null)
     {
         Freezer = part.FindModuleImplementing<DeepFreezer>();
         Utilities.Log_Debug("DFExtDoorMgr buttonExtDoorState set part " + part.name);
     }
     if (Freezer == null) return false; // if freezer still null return false
     if (!Freezer.ExternalDoorActive) return false; // if freezer doesn't have an external door just return.
     if (Freezer._externaldoorstate == DoorState.CLOSED || Freezer._externaldoorstate == DoorState.CLOSING || Freezer._externaldoorstate == DoorState.UNKNOWN)
     {
         Utilities.Log_Debug("DFExtDoorMgr Door is closed or closing or unknown return state false");
         return false;
     }
     Utilities.Log_Debug("DFExtDoorMgr Door is open or opening return state true");
     return true;
 }
예제 #3
0
 public override void OnUpdate()
 {
     base.OnUpdate();
     if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready && FlightGlobals.ActiveVessel != null)
     {
         if (Freezer == null)
         {
             Freezer = this.part.FindModuleImplementing<DeepFreezer>();
             Utilities.Log_Debug("DFExtDoorMgr OnUpdate Set part " + this.part.name);
         }
     }
 }
예제 #4
0
 public VslFrzrCams(Transform frzrcamTransform, InternalModel frzrcamModel, int frzrcamSeatIndex, string frzrcamPartName, DeepFreezer frzrcamPart)
 {
     FrzrCamTransform = frzrcamTransform;
     FrzrCamModel = frzrcamModel;
     FrzrCamSeatIndex = frzrcamSeatIndex;
     FrzrCamPartName = frzrcamPartName;
     FrzrCamPart = frzrcamPart;
 }