Example #1
0
 public void SetActionGroup(uint group, bool state)
 {
     if (group > 9)
     {
         throw new ArgumentException("Action group must be between 0 and 9 inclusive");
     }
     InternalVessel.ActionGroups.SetGroup(ActionGroupExtensions.GetActionGroup(group), state);
 }
Example #2
0
 public void ToggleActionGroup(uint group)
 {
     if (group > 9)
     {
         throw new ArgumentException("Action group must be between 0 and 9 inclusive");
     }
     InternalVessel.ActionGroups.ToggleGroup(ActionGroupExtensions.GetActionGroup(group));
 }
Example #3
0
 public bool GetActionGroup(uint group)
 {
     if (group > 9)
     {
         throw new ArgumentException("Action group must be between 0 and 9 inclusive");
     }
     return(InternalVessel.ActionGroups.groups [BaseAction.GetGroupIndex(ActionGroupExtensions.GetActionGroup(group))]);
 }
Example #4
0
        public void ToggleActionGroup(uint group)
        {
            var vessel = InternalVessel;

            if (AGX.IsAvailable)
            {
                if (group > 250)
                {
                    throw new ArgumentException("Action group must be between 0 and 250 inclusive");
                }
                AGX.AGX2VslToggleGroup(vessel.rootPart.flightID, (int)group);
            }
            else
            {
                if (group > 9)
                {
                    throw new ArgumentException("Action group must be between 0 and 9 inclusive");
                }
                vessel.ActionGroups.ToggleGroup(ActionGroupExtensions.GetActionGroup(group));
            }
        }
Example #5
0
        public bool GetActionGroup(uint group)
        {
            var vessel = InternalVessel;

            if (AGX.IsAvailable)
            {
                if (group > 250)
                {
                    throw new ArgumentException("Action group must be between 0 and 250 inclusive");
                }
                return(AGX.AGX2VslGroupState(vessel.rootPart.flightID, (int)group));
            }
            else
            {
                if (group > 9)
                {
                    throw new ArgumentException("Action group must be between 0 and 9 inclusive");
                }
                return(vessel.ActionGroups.groups [BaseAction.GetGroupIndex(ActionGroupExtensions.GetActionGroup(group))]);
            }
        }