Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
BaseAction Class Reference

A part action More...

Public Member Functions

 BaseAction (BaseActionList listParent, string name, BaseActionDelegate onEvent, KSPAction actionAttr)
 Create a new action More...
 
bool ContainsNonDefaultActions ()
 Check if the default group is not the default action group or the override groups have any action groups More...
 
virtual void CopyAction (BaseAction action)
 Copy user editable settings More...
 
KSPActionGroup GetActionGroup (int groupOverride)
 Get the action group bindings for the specified override group More...
 
void Invoke (KSPActionParam param)
 
void OnLoad (ConfigNode node)
 
void OnSave (ConfigNode node)
 

Static Public Member Functions

static void AddAction (List< BaseAction > actionList, Expansions.Serenity.ModuleRoboticController controller, Part part, bool include, BaseAction action)
 Add an Actions to a Actions list More...
 
static bool ContainsNonDefaultActions (Part p)
 
static List< BaseActionCreateActionList (List< Part > parts, KSPActionGroup group, int overrideGroup, bool overrideDefault, bool include)
 
static List< BaseActionCreateActionList (Part p, KSPActionGroup group, int overrideGroup, bool overrideDefault, bool include)
 
static List< BaseActionCreateActionList (List< Part > parts, Expansions.Serenity.ModuleRoboticController controller, bool include)
 Create a list of actions that are applicable to this controller More...
 
static List< BaseActionCreateActionList (Part part, Expansions.Serenity.ModuleRoboticController controller, bool include)
 Create a list of actions that are applicable to this controller More...
 
static List< bool > CreateGroupList (Part p)
 
static List< bool > CreateGroupList (Part p, int overrideGroup)
 
static List< bool > CreateGroupList (List< Part > parts)
 
static List< bool > CreateGroupList (List< Part > parts, int groupOverride)
 
static void FireAction (List< Part > parts, KSPActionGroup group, int overrideGroup, KSPActionType type)
 
static string[] GetActionGroups (int maxlevel)
 
static int GetActionGroupsLength (float facilityLevel, bool isVAB=true)
 
static int GetGroupIndex (KSPActionGroup group)
 

Public Attributes

KSPActionGroup actionGroup
 Added to action groups here the event will fire on activate More...
 
bool active
 Set to false to remove visibilty from editor and stop this action from firing More...
 
bool activeEditor
 Set this false to prevent action being able to fire in editor More...
 
bool advancedTweakable
 Does the action require advanced tweakables? More...
 
KSPActionGroup defaultActionGroup
 Added to action groups here the event will fire on activate More...
 
bool isPersistent
 Does this action get its active field serialized? More...
 
BaseActionList listParent
 
string name
 The exposed name of this action method More...
 
bool noLongerAssignable
 The KSPAction is no longer assignable, but can be excecuted. More...
 
KSPActionGroup[] overrideGroups
 Additional action groups More...
 
bool requireFullControl
 Does this require full, not just partial, control? More...
 
bool wasActiveBeforePartWasAdjusted
 Was this action active before the part was adjusted? More...
 

Properties

static int ActionGroupsLength [get]
 
string guiName [get, set]
 The name of this action presented in the gui (user readable name) More...
 
BaseActionDelegate onEvent [get, set]
 The delegate method this action fires More...
 

Detailed Description

A part action

Constructor & Destructor Documentation

BaseAction.BaseAction ( BaseActionList  listParent,
string  name,
BaseActionDelegate  onEvent,
KSPAction  actionAttr 
)
inline

Create a new action

Parameters
nameExposed action name
onEventReflected method delegate
actionAttrAction's attribute data

Member Function Documentation

static void BaseAction.AddAction ( List< BaseAction actionList,
Expansions.Serenity.ModuleRoboticController  controller,
Part  part,
bool  include,
BaseAction  action 
)
inlinestatic

Add an Actions to a Actions list

Parameters
axisFieldListlist to add to
controllerController to build against
includeTrue to include action already in the controller, false to include ones not
axisFieldActions to add
Returns
List of Actions
bool BaseAction.ContainsNonDefaultActions ( )
inline

Check if the default group is not the default action group or the override groups have any action groups

static bool BaseAction.ContainsNonDefaultActions ( Part  p)
inlinestatic
virtual void BaseAction.CopyAction ( BaseAction  action)
inlinevirtual

Copy user editable settings

static List<BaseAction> BaseAction.CreateActionList ( List< Part parts,
KSPActionGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include 
)
inlinestatic
static List<BaseAction> BaseAction.CreateActionList ( Part  p,
KSPActionGroup  group,
int  overrideGroup,
bool  overrideDefault,
bool  include 
)
inlinestatic
static List<BaseAction> BaseAction.CreateActionList ( List< Part parts,
Expansions.Serenity.ModuleRoboticController  controller,
bool  include 
)
inlinestatic

Create a list of actions that are applicable to this controller

Parameters
partsParts to build the list from
controllerController to build against
includeTrue to include actions already in the controller, false to include ones not
Returns
List of Actions
static List<BaseAction> BaseAction.CreateActionList ( Part  part,
Expansions.Serenity.ModuleRoboticController  controller,
bool  include 
)
inlinestatic

Create a list of actions that are applicable to this controller

Parameters
partsParts to build the list from
controllerController to build against
includeTrue to include actions already in the controller, false to include ones not
Returns
List of Actions
static List<bool> BaseAction.CreateGroupList ( Part  p)
inlinestatic
static List<bool> BaseAction.CreateGroupList ( Part  p,
int  overrideGroup 
)
inlinestatic
static List<bool> BaseAction.CreateGroupList ( List< Part parts)
inlinestatic
static List<bool> BaseAction.CreateGroupList ( List< Part parts,
int  groupOverride 
)
inlinestatic
static void BaseAction.FireAction ( List< Part parts,
KSPActionGroup  group,
int  overrideGroup,
KSPActionType  type 
)
inlinestatic
KSPActionGroup BaseAction.GetActionGroup ( int  groupOverride)
inline

Get the action group bindings for the specified override group

static string [] BaseAction.GetActionGroups ( int  maxlevel)
inlinestatic
static int BaseAction.GetActionGroupsLength ( float  facilityLevel,
bool  isVAB = true 
)
inlinestatic
static int BaseAction.GetGroupIndex ( KSPActionGroup  group)
inlinestatic
void BaseAction.Invoke ( KSPActionParam  param)
inline
void BaseAction.OnLoad ( ConfigNode  node)
inline
void BaseAction.OnSave ( ConfigNode  node)
inline

Member Data Documentation

KSPActionGroup BaseAction.actionGroup

Added to action groups here the event will fire on activate

bool BaseAction.active

Set to false to remove visibilty from editor and stop this action from firing

bool BaseAction.activeEditor

Set this false to prevent action being able to fire in editor

bool BaseAction.advancedTweakable

Does the action require advanced tweakables?

KSPActionGroup BaseAction.defaultActionGroup

Added to action groups here the event will fire on activate

bool BaseAction.isPersistent

Does this action get its active field serialized?

BaseActionList BaseAction.listParent
string BaseAction.name

The exposed name of this action method

bool BaseAction.noLongerAssignable

The KSPAction is no longer assignable, but can be excecuted.

KSPActionGroup [] BaseAction.overrideGroups

Additional action groups

bool BaseAction.requireFullControl

Does this require full, not just partial, control?

bool BaseAction.wasActiveBeforePartWasAdjusted

Was this action active before the part was adjusted?

Property Documentation

int BaseAction.ActionGroupsLength
staticget
string BaseAction.guiName
getset

The name of this action presented in the gui (user readable name)

BaseActionDelegate BaseAction.onEvent
getsetprotected

The delegate method this action fires


The documentation for this class was generated from the following file: