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); }
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)); }
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))]); }
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)); } }
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))]); } }