space_ex v0.3.0 SpaceEx.SpaceCenter.Module

This can be used to interact with a specific part module.

This includes part modules in stock KSP, and those added by mods.

In KSP, each part has zero or more PartModules associated with it. Each one contains some of the functionality of the part. For example, an engine has a "ModuleEngines" part module that contains all the functionality of an engine.

Link to this section Summary

Functions

A list of all the names of the modules actions

A list of the names of all of the modules events

Returns the value of a field

The modules field names and their associated values, as a dictionary

true if the part has an action with the given name

true if the module has an event with the given name

Returns true if the module has a field with the given name

Name of the PartModule

The part that contains this module

Set the value of a field to its original value

Set the value of an action with the given name

Set the value of a field to the given floating point number

Set the value of a field to the given integer number

Set the value of a field to the given string

Trigger the named event

Link to this section Functions

Link to this function actions(conn, this)

A list of all the names of the modules actions.

These are the parts actions that can be assigned to action groups in the in-game editor.

Link to this function events(conn, this)

A list of the names of all of the modules events.

Events are the clickable buttons visible in the right-click menu of the part.

Link to this function field(conn, this, name)

Returns the value of a field.

  • name — Name of the field.
Link to this function fields(conn, this)

The modules field names and their associated values, as a dictionary.

These are the values visible in the right-click menu of the part.

Link to this function has_action(conn, this, name)

true if the part has an action with the given name.

  • name
Link to this function has_event(conn, this, name)

true if the module has an event with the given name.

  • name
Link to this function has_field(conn, this, name)

Returns true if the module has a field with the given name.

  • name — Name of the field.
Link to this function name(conn, this)

Name of the PartModule.

For example, "ModuleEngines".

Link to this function part(conn, this)

The part that contains this module.

Link to this function reset_field(conn, this, name)

Set the value of a field to its original value.

  • name — Name of the field.
Link to this function set_action(conn, this, name, value)

Set the value of an action with the given name.

  • name

  • value

Link to this function set_field_float(conn, this, name, value)

Set the value of a field to the given floating point number.

  • name — Name of the field.

  • value — Value to set.

Link to this function set_field_int(conn, this, name, value)

Set the value of a field to the given integer number.

  • name — Name of the field.

  • value — Value to set.

Link to this function set_field_string(conn, this, name, value)

Set the value of a field to the given string.

  • name — Name of the field.

  • value — Value to set.

Link to this function trigger_event(conn, this, name)

Trigger the named event.

Equivalent to clicking the button in the right-click menu of the part.

  • name