Skip to content

EditorBayItem

Michael Billard edited this page Sep 2, 2017 · 1 revision

This class holds information regarding a vessel undergoing vehicle integration. Vehicle integration is necessary to improve a vessel's reliability before launch.

Fields

isVAB

Set to true if the editor bay is one of the VAB bays, false if it is one of the SPH bays.

editorBayID

ID number of the editor bay.

vesselName

Name of the vessel.

vesselThumbnail

A texture containing the vessel thumbnail. It is generated when looking at the editor bay.

thumbnailPath

Path to the thumbnail file.

workerCount

The number of workers currently employed on the vehicle integration project.

rushJobCost

Amount of Funds to charge for rushing vehicle integration.

breakablePartCount

Total number of breakable parts in the vessel.

totalQuality

Total quality of all the breakable parts in the vessel. Equal to each part's base quality plus its flight experience. This value increases during each build cycle. It is used for display purposes during vehicle integration.

totalIntegrationToAdd

Total amount of integration points to add. This value drops during each build cycle. It is used for display purposes during vehicle integration and to track when a vessel has had its parts fully integrated.

totalIntegrationAdded

Tracks how many integration points were added during vehicle integration. When a vessel is preped for launch, this value is divide by the total breakable parts to get the integration per part. The value is then given to each breakable part's integration bonus.

vesselFilePath

A string containing the snapshot of the craft file.

totalVesselParts

Total number of parts in the vessel. This is used to determine whether or not the player has tampered with the vessel after loading it from an editor bay.

KACAlarmID

Name of the construction KAC alarm that is set when vessel integration begins. Requires Kerbal Alarm Clock.

partQualityData

A list of all the breakable parts in the vessel along with their quality ratings and current flight experience.

Properties

baseReliability

Returns the base reliability of the editor bay.

maxReliability

Returns the max reliability of the editor bay.

Methods

RecalculateTotalQuality

Recalculates the total quality of all the breakable parts in the editor bay.

AddPartQualityData(System.String,System.Int32,System.Int32)

Adds a new PartQualityData item to the internal list.

Parameters

title: User-friendly name of the part.

quality: Quality rating of the part.

flightExperienceBonus: Flight experience bonus of the part.

Clear

Clears all the fields in the editor bay except for bay ID and isVAB.

ToString

Generates a string containing information about the editor bay.

Return value

A string containing information about the editor bay.

DeleteSnapshot

Deletes the vessel snapshot file.

Save(System.Boolean)

Serializes the EditorBayItem into a ConfigNode.

Return value

A ConfigNode containing seralized values.

Load(ConfigNode)

De-serializes the ConfigNode's values into the EditorBayItem.

Parameters

node: A ConfigNode containing values to de-serialize.