Difference between revisions of "API:Staging"
m (N3X15 moved page Staging to API:Staging) |
(Updated list to contain all public properties and functions of the class.) |
||
Line 5: | Line 5: | ||
Note that in KSP the stages count DOWN as you go through the stages in your rocket, so that the LAST stage is stage zero. The stage a part activates in is given by Part.inverseStage. | Note that in KSP the stages count DOWN as you go through the stages in your rocket, so that the LAST stage is stage zero. The stage a part activates in is given by Part.inverseStage. | ||
− | == | + | == Class Documentation == |
− | + | This is a complete list of public properties and functions of the Staging class. However, only entries that have been investigated by other users have been filled in. If you discover the use of a property or function, you are encouraged to fill it in! | |
+ | |||
+ | The functionality of some functions may be obvious from its name, but simply have not been tested yet. | ||
+ | |||
+ | === Properties === | ||
+ | |||
+ | <table border="1"> | ||
+ | <tr> | ||
+ | <td><code>bool AdvancedStagingControls { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>int CurrentStage { get; }</code></td> | ||
+ | <td>The stage number of the currently active stage of the rocket. This decrements by one every time a new stage is activated, until it reaches zero when the final stage is activated.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>Texture2D DefaultIconMapTexture { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>Vector3 IconOffset { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>float IconSpacing { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>int lastStage { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>List<StackIcon> Selection { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>bool separate_ready { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>Transform StackTransform { get; }</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>int StageCount { get; }</code></td> | ||
+ | <td>The stage number of the initial stage of the rocket. You can test to see if the rocket is still on the pad by testing whether (Staging.CurrentStage == Staging.StageCount)</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | === Public Static Functions === | ||
<table border="1"> | <table border="1"> | ||
<tr> | <tr> | ||
− | <td><code> | + | <td><code>void ActivateNextStage();</code></td> |
<td>Activates the next stage of the rocket just as if the user had pressed space.</td> | <td>Activates the next stage of the rocket just as if the user had pressed space.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><code> | + | <td><code>void ActivateStage(int stage);</code></td> |
<td>Activates the given stage, even if it's not the next stage.</td> | <td>Activates the given stage, even if it's not the next stage.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><code> | + | <td><code>void AddStageAt(int index);</code></td> |
− | <td> | + | <td>Inserts a new empty stage at the given index.</td> |
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void AddToSelection(StackIcon icon, bool multipleSelect = false);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void beginFlight();</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>StackIcon CreateIcon(Part caller);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void DeleteStage(StageGroup stageToDelete);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void deselect(StackIcon icon);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void DisableIcon(StackIcon iconToDisable);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>StackIcon FindIcon(Part part);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void findStageIndices(Part part, int thisStage);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void GenerateStagingSequence();</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void GenerateStagingSequence(Part root);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>int GetStageCount(List<Part> ship);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnIconDrag(StackIcon icon);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnIconDragEnd(StackIcon icon);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnIconDragStart(StackIcon icon);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnStageDrag(StageGroup stage);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnStageDragEnd(StageGroup stage);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void OnStageDragStart(StageGroup stage);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>int RecalculateVesselStaging(Vessel v);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void RemoveIcon(StackIcon iconToRemove);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void ResumeFlight(int currStage);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void ScheduleSort();</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void ScrollToIcon(StackIcon icon);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void ScrollToStage(int stageNumber);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void SetStageCount(int lastStg);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void SetStageCount(List<GameObject> ship);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void SetStageCount(List<Part> ship);</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void SortIcons();</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td><code>void SortNow();</code></td> | ||
+ | <td>(Usage unknown.)</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
− | <td><code> | + | <td><code>void StepBackCurrentStage();</code></td> |
− | <td> | + | <td>(Usage unknown.)</td> |
− | </tr></table> | + | </tr> |
+ | </table> | ||
[[Category:Community API Documentation]] | [[Category:Community API Documentation]] |
Revision as of 04:25, 23 November 2013
The Staging class provides some information about the staging of the rocket, and also provides a function that lets you activate the next stage from code as if the user had pressed the space bar.
This class also seems to handle user interaction with the staging icon list (dragging icons around).
Note that in KSP the stages count DOWN as you go through the stages in your rocket, so that the LAST stage is stage zero. The stage a part activates in is given by Part.inverseStage.
Class Documentation
This is a complete list of public properties and functions of the Staging class. However, only entries that have been investigated by other users have been filled in. If you discover the use of a property or function, you are encouraged to fill it in!
The functionality of some functions may be obvious from its name, but simply have not been tested yet.
Properties
bool AdvancedStagingControls { get; } |
(Usage unknown.) |
int CurrentStage { get; } |
The stage number of the currently active stage of the rocket. This decrements by one every time a new stage is activated, until it reaches zero when the final stage is activated. |
Texture2D DefaultIconMapTexture { get; } |
(Usage unknown.) |
Vector3 IconOffset { get; } |
(Usage unknown.) |
float IconSpacing { get; } |
(Usage unknown.) |
int lastStage { get; } |
(Usage unknown.) |
List<StackIcon> Selection { get; } |
(Usage unknown.) |
bool separate_ready { get; } |
(Usage unknown.) |
Transform StackTransform { get; } |
(Usage unknown.) |
int StageCount { get; } |
The stage number of the initial stage of the rocket. You can test to see if the rocket is still on the pad by testing whether (Staging.CurrentStage == Staging.StageCount) |
Public Static Functions
void ActivateNextStage(); |
Activates the next stage of the rocket just as if the user had pressed space. |
void ActivateStage(int stage); |
Activates the given stage, even if it's not the next stage. |
void AddStageAt(int index); |
Inserts a new empty stage at the given index. |
void AddToSelection(StackIcon icon, bool multipleSelect = false); |
(Usage unknown.) |
void beginFlight(); |
(Usage unknown.) |
StackIcon CreateIcon(Part caller); |
(Usage unknown.) |
void DeleteStage(StageGroup stageToDelete); |
(Usage unknown.) |
void deselect(StackIcon icon); |
(Usage unknown.) |
void DisableIcon(StackIcon iconToDisable); |
(Usage unknown.) |
StackIcon FindIcon(Part part); |
(Usage unknown.) |
void findStageIndices(Part part, int thisStage); |
(Usage unknown.) |
void GenerateStagingSequence(); |
(Usage unknown.) |
void GenerateStagingSequence(Part root); |
(Usage unknown.) |
int GetStageCount(List<Part> ship); |
(Usage unknown.) |
void OnIconDrag(StackIcon icon); |
(Usage unknown.) |
void OnIconDragEnd(StackIcon icon); |
(Usage unknown.) |
void OnIconDragStart(StackIcon icon); |
(Usage unknown.) |
void OnStageDrag(StageGroup stage); |
(Usage unknown.) |
void OnStageDragEnd(StageGroup stage); |
(Usage unknown.) |
void OnStageDragStart(StageGroup stage); |
(Usage unknown.) |
int RecalculateVesselStaging(Vessel v); |
(Usage unknown.) |
void RemoveIcon(StackIcon iconToRemove); |
(Usage unknown.) |
void ResumeFlight(int currStage); |
(Usage unknown.) |
void ScheduleSort(); |
(Usage unknown.) |
void ScrollToIcon(StackIcon icon); |
(Usage unknown.) |
void ScrollToStage(int stageNumber); |
(Usage unknown.) |
void SetStageCount(int lastStg); |
(Usage unknown.) |
void SetStageCount(List<GameObject> ship); |
(Usage unknown.) |
void SetStageCount(List<Part> ship); |
(Usage unknown.) |
void SortIcons(); |
(Usage unknown.) |
void SortNow(); |
(Usage unknown.) |
void StepBackCurrentStage(); |
(Usage unknown.) |