Kerbal Space Program
1.12.4
|
Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship. More...
Public Types | |
enum | ControlLevel { ControlLevel.NONE, ControlLevel.PARTIAL_UNMANNED, ControlLevel.PARTIAL_MANNED, ControlLevel.FULL } |
enum | Situations { Situations.LANDED = 1, Situations.SPLASHED = 2, Situations.PRELAUNCH = 4, Situations.FLYING = 8, Situations.SUB_ORBITAL = 16, Situations.ORBITING = 32, Situations.ESCAPING = 64, Situations.DOCKED = 128 } |
enum | State { State.INACTIVE, State.ACTIVE, State.DEAD } |
Public Member Functions | |
bool | ActionControlBlocked (KSPActionGroup actionGroup) |
Check if a default vessel control action (staging, RCS, SAS) is blocked More... | |
void | AttachPatchedConicsSolver () |
bool | AxisControlBlocked (KSPAxisGroup axisGroup) |
Check if a default vessel control axis (throttle, PYR, etc) is blocked More... | |
ProtoVessel | BackupVessel () |
void | BuildCrossfeedPartSets () |
void | ChangeWorldVelocity (Vector3d velOffset) |
change the worldspace velocity of this vessel More... | |
void | CheckAirstreamShields () |
Will check shielding on all parts in the vessel. More... | |
bool | CheckGroundCollision () |
void | CheckKill () |
bool | checkLanded () |
bool | checkSplashed () |
bool | checkVisibility () |
Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise. More... | |
void | Clean (string reason="") |
void | ClearActiveInternalSpace () |
Sets all internal spaces in the vessel invisible More... | |
void | ClearStaging () |
bool | ContainsCollider (Collider c) |
Checks colliders on all parts to see if the given one belongs to any of them. More... | |
void | CopyOverrides (Vessel v) |
void | CrewListSetDirty () |
void | CycleAllAutoStrut () |
void | DespawnCrew () |
void | DestroyVesselComponents () |
void | DetachPatchedConicsSolver () |
void | Die () |
void | FallBackReferenceTransform () |
void | FeedInputFeed () |
VesselType | FindDefaultVesselType () |
T | FindPartModuleImplementing< T > () |
List< T > | FindPartModulesImplementing< T > () |
T | FindVesselModuleImplementing< T > () |
Find the vesselmodule on this vessel of the supplied type More... | |
List< Part > | GetActiveParts () |
bool | GetActiveTargetable () |
void | GetConnectedResourceTotals (int id, out double amount, out double maxAmount, bool pulling=true) |
Gets the amount and maxamount of the given resource in the partset More... | |
void | GetConnectedResourceTotals (int id, bool simulate, out double amount, out double maxAmount, bool pulling=true) |
Gets the amount and maxamount of the given resource in the partset More... | |
void | GetConnectedResourceTotals (int id, out double amount, out double maxAmount, double threshold, bool pulling=true) |
Gets the amount and maxamount of the given resource in the partset, obeying threshold More... | |
void | GetConnectedResourceTotals (int id, bool simulate, out double amount, out double maxAmount, double threshold, bool pulling=true) |
Gets the amount and maxamount of the given resource in the partset, obeying threshold More... | |
void | GetControlState (FlightCtrlState state) |
int | GetCrewCapacity () |
int | GetCrewCount () |
Orbit | GetCurrentOrbit () |
string | GetDisplayName () |
Returns the localized string of the vesselName. More... | |
Vector3 | GetFwdVector () |
virtual void | GetGroundLevelAngle () |
Calculates the angle of the surface the vessel is in More... | |
float | GetHeightFromSurface () |
Get the Vessel height from the surface. Similar to GetHeightFromTerrain but checks against all surfaces. Sets heightFromSurface to the vessel height as well. Or -1 if not found. More... | |
float | GetHeightFromTerrain (bool overRidePacked=false) |
Get the height of the vesselTransform from the terrain. Should only be done when vessel is loaded and unpacked. Will set heightFromTerrain to the vessel height. Or -1 if not found. More... | |
RaycastHit | GetHitFromSurface () |
Obtains the raycast hit from the vessel to the surface. More... | |
string | GetName () |
Vector3 | GetObtVelocity () |
Orbit | GetOrbit () |
OrbitDriver | GetOrbitDriver () |
Part | GetReferenceTransformPart () |
Vector3 | GetSrfVelocity () |
VesselTargetModes | GetTargetingMode () |
float | GetTotalMass () |
Get the sum of the mass of all (physical) parts on this vessel More... | |
Transform | GetTransform () |
Vessel | GetVessel () |
List< ProtoCrewMember > | GetVesselCrew () |
Vector3d | GetWorldPos3D () |
Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough) More... | |
void | GoOffRails () |
puts the ship back into a simulated orbit and reenables physics More... | |
void | GoOnRails () |
disables physics and puts the ship into a propagated orbit More... | |
bool | HasValidContractObjectives (params string[] objectiveTypes) |
bool | HasValidContractObjectives (List< string > objectiveTypes, bool copy=true) |
void | IgnoreGForces (int frames) |
Set the number of FixedUpdate Frames to ignore GeeForce Calcs. More... | |
void | IgnoreSpeed (int frames) |
Set the number of FixedUpdate Frames to ignore Speed Calcs. More... | |
bool | Initialize (bool fromShipAssembly=false) |
Initialize is used in cases where the Vessel component is added to a ship that already exists. More... | |
ClearToSaveStatus | IsClearToSave () |
bool | IsFirstFrame () |
void | KillPermanentGroundContact () |
void | Load () |
void | LoadVesselModules (ConfigNode node) |
void | MakeActive () |
void | MakeInactive () |
void | MurderCrew () |
void | OffsetVelocity (Vector3d correction) |
void | OnDestroy () |
void | OnLoadFlightState (Dictionary< string, KSPParseable > dataPool) |
void | OnSaveFlightState (Dictionary< string, KSPParseable > dataPool) |
Part | PartsContain (uint partPersistentId) |
Will search the parts in this vessel for a matching part persistentId. If found will return the part reference. Otherwise will return null. More... | |
double | PQSAltitude () |
void | printCollisions () |
void | printGroundContacts () |
void | RebuildCrewList () |
void | RecallReferenceTransform () |
bool | RemoveCrew (ProtoCrewMember pcm) |
bool | RemoveCrew (string name) |
void | RemoveCrewList (List< ProtoCrewMember > pcmList, bool updatePartCount) |
void | RenameVessel () |
double | RequestResource (Part part, int id, double demand, bool usePriority) |
Request a resource from across the vessel. More... | |
double | RequestResource (Part part, int id, double demand, bool usePriority, bool simulate) |
Request a resource from across the vessel. More... | |
void | ResetCollisionIgnores () |
void | ResetGroundContact () |
void | ResetRBAnchor () |
Destroys the joint that holds the vessel anchored in place More... | |
void | ResumeNavigation () |
Method called when vessel goes active, we need to start a coroutine while we wait for the contractsystem to be loaded More... | |
void | ResumeStaging () |
void | ResumeTarget () |
double | RevealAltitude () |
string | RevealDisplayName () |
float | RevealMass () |
string | RevealName () |
string | RevealSituationString () |
double | RevealSpeed () |
string | RevealType () |
void | SetActiveInternalSpace (Part visiblePart) |
Sets the internal space for the given part visible (and all others invisible) More... | |
void | SetActiveInternalSpaces (HashSet< Part > visibleParts) |
Sets the internal spaces for the given parts visible, other IVA spaces in the same vesesl become invisible More... | |
void | SetAutoClean (string reason="") |
void | SetControlState (FlightCtrlState state) |
void | SetGroupOverride (int newGroup) |
void | SetLandedAt (string landedAt, GameObject gO=null, string inputdisplaylandedAt="") |
Set the LandedAt and displaylandedAt variables. an optional GameObject and an optional inputdisplaylandedAt string can be passed in. The landedAt field will be set to the passed in landedAt string. If an inputdisplaylandedAt string is passed in then the displaylandedAt string is set to this string (Usually localized language). If the inputdisplaylandedAt is empty and a GameObject is supplied the GameObject Unity Tag will be used to lookup a MiniBiome name. If no inputdisplaylandedAt or GameObject are passed in the displaylandedAt field is set to the landedAt field. More... | |
void | SetLoaded (bool loaded) |
void | SetPosition (Vector3d position) |
void | SetPosition (Vector3d position, bool usePristineCoords) |
Sets the worldspace position of this vessel, and all its parts More... | |
void | SetReferenceTransform (Part p, bool storeRecall=true) |
void | SetRotation (Quaternion rotation) |
Sets the worldspace rotation of this vessel, and all its parts More... | |
void | SetRotation (Quaternion rotation, bool setPos) |
Sets the worldspace rotation of this vessel, and all its parts. Accepts bool on whether to reset pos (leave false if pos is set elsewhere) More... | |
void | SetWorldVelocity (Vector3d vel) |
set the absolute world velocity of this vessel More... | |
void | SpawnCrew () |
void | StartFromBackup (ProtoVessel pv) |
Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method. More... | |
void | StartFromBackup (ProtoVessel pv, FlightState st) |
Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method. More... | |
void | Translate (Vector3d offset) |
void | Unload () |
void | UpdateAcceleration (double fdtRecip, bool fromUpdate) |
void | UpdateCaches () |
void | UpdateDistanceTraveled () |
Updates the distance traveled of this vessel More... | |
void | UpdateLandedSplashed () |
void | UpdatePosVel () |
void | UpdateResourceSets () |
Clears dirty flag and updates the vessel and the crossfeed sets More... | |
void | UpdateResourceSetsIfDirty () |
Will update only if dirty. More... | |
void | UpdateVesselModuleActivation () |
void | UpdateVesselSize () |
Update the bounds of the vessel. More... | |
Static Public Member Functions | |
static string | AutoRename (Vessel v, string baseName) |
static void | CrewWasModified (Vessel vessel) |
static void | CrewWasModified (Vessel vessel1, Vessel vessel2) |
static Vessel | GetDominantVessel (Vessel v1, Vessel v2) |
Find the dominant vessel on a dock situation. The dominant vessel will have the secondary merged into it. More... | |
static string | GetLandedAtString (string landedAt) |
Get the landedAt string in English More... | |
static string | GetMETString (Vessel v) |
static double | GetNextManeuverTime (Vessel v, out bool hasManeuver) |
static string | GetSituationString (Situations situation) |
static string | GetSituationString (Vessel v) |
Get the Situation String, Will be Localized More... | |
static bool | IsValidVesselName (string name) |
Public Attributes | |
Vector3d | acceleration |
AltimeterDisplayState | altimeterDisplayState = AltimeterDisplayState.DEFAULT |
double | altitude |
Vector3 | angularMomentum = Vector3.zero |
Vector3 | angularVelocity = Vector3.zero |
Vector3d | angularVelocityD = Vector3d.zero |
Vector3 | CoM |
Vector3d | CoMD |
CommNetVessel | connection |
double | convectiveMachFlux |
int | crewableParts = 0 |
int | crewedParts = 0 |
List< PartSet > | crossfeedSets = new List<PartSet>() |
all the crossfeed (i.e. non-vessel-wide) sets on the vessel More... | |
FlightCtrlState | ctrlState |
int | currentStage |
bool | directSunlight |
string | displaylandedAt = "" |
A string of where the vessel is landed in Localized language. More... | |
double | distanceTraveled |
Protopart snapshot Dictionary (keyed by part persistentId) of the parts that will get drained when vessel is packed More... | |
List< PartModule > | dockingPorts = new List<PartModule>() |
bool | easingInToSurface |
bool | EditableNodes |
KerbalEVA | evaController |
ConfigNode | flightPlanNode |
RUI.Algorithms.StackFlowGraph | flowGraph |
a holder for the flowgraph More... | |
bool | frameWasRotating = false |
double | geeForce |
Vector3d | graviticAcceleration |
List< Part > | GroundContacts |
int | GroupOverride |
Action/axis group override selector More... | |
float | gThresh |
double | heightFromPartOffsetLocal = 0d |
float | heightFromSurface = -1f |
float | heightFromTerrain = -1f |
Guid | id |
Unique identifier for each vessel. More... | |
Vector3d | krakensbaneAcc |
bool | Landed |
string | landedAt = "" |
A string of where the vessel is landed in English. More... | |
string | landedAtLast = "" |
CelestialBody | lastBody |
double | lastUT = -1 |
for use in FI when checking if vessel has spent time unloaded. More... | |
Vector3d | lastVel |
double | latitude |
string | launchedFrom = "" |
Will contain the Launch Site Name that this vessel launched from. If indeed it did launch from a launch site. More... | |
double | launchTime |
bool | loaded = false |
Vector3 | localCoM |
This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass. More... | |
double | longitude |
double | mach |
MapObject | mapObject |
ControlLevel | maxControlLevel = ControlLevel.FULL |
double | missionTime |
Waypoint | navigationWaypoint |
the active navigation waypoint for this vessel More... | |
GameObject | objectUnderVessel |
double | obt_speed |
Vector3d | obt_velocity |
FlightInputCallback | OnAutopilotUpdate = (FlightCtrlState st) => { } |
FlightInputCallback | OnFlyByWire = (FlightCtrlState st) => { } |
pass the control state from the scene handler to this vessel. More... | |
Callback | OnJustAboutToBeDestroyed = () => { } |
FlightInputCallback | OnPostAutopilotUpdate = (FlightCtrlState st) => { } |
FlightInputCallback | OnPreAutopilotUpdate = (FlightCtrlState st) => { } |
OrbitDriver | orbitDriver |
OrbitRenderer | orbitRenderer |
OrbitTargeter | orbitTargeter |
KSPActionGroup[] | OverrideActionControl |
KSPAxisGroup[] | OverrideAxisControl |
bool[] | OverrideDefault |
string[] | OverrideGroupNames |
bool | packed |
landing / splashdown detection More... | |
double | partMaxGThresh |
List< Part > | parts |
PatchedConicRenderer | patchedConicRenderer |
PatchedConicSolver | patchedConicSolver |
bool | permanentGroundContact |
uint | persistentId |
A unique identifier for each vessel including from when it was Shipconstruct More... | |
Vector3d | perturbation |
double | pqsAltitude |
int | PQSmaxLevel = 0 |
int | PQSminLevel = 0 |
VesselPrecalculate | precalc |
float | presThresh |
ProtoVessel | protoVessel |
ProtoTargetInfo | pTI = null |
double | radarAltitude |
Vector3 | rb_velocity |
Vector3d | rb_velocityD |
uint | referenceTransformId |
uint | referenceTransformIdRecall |
PartSet | resourcePartSet |
The vessel partset. More... | |
bool | resourcesDirty = false |
We set the dirty flag if we're waiting. More... | |
Part | rootPart |
FlightCtrlState[] | setControlStates |
List< PartSet > | simulationCrossfeedSets = new List<PartSet>() |
all the Delta-V simulation crossfeed (i.e. non-vessel-wide) sets on the vessel More... | |
PartSet | simulationResourcePartSet |
The vessel Delta-V simulation partset. More... | |
Situations | situation |
bool | skipGroundPositioning = false |
True if this Vessel is to skip vessel ground checks. Will also be set true if the vessel was launched from a LaunchSite. If true Vessel will skip ground repositioning when coming off rails. More... | |
bool | skipGroundPositioningForDroppedPart = false |
True if this Vessel is a single part vessel and should skip vessel ground checks. skipGroundPositioning will overridden a single part vessel if this is false If true Vessel will skip ground repositioning when coming off rails. More... | |
double | specificAcceleration |
Specific acceleration is the vessel's potential acceleration per unit of throttle. Used to estimate burn times and such. NOTE: this value is calculated based on smoothed acceleration, so it isn't completely accurate. It will also change as the vessel's mass is reduced as fuel burns away. (it does get pretty accurate after burning for a few seconds) More... | |
Quaternion | srfRelRotation |
State | state = State.INACTIVE |
ITargetable | targetObject |
double | terrainAltitude |
Vector3 | terrainNormal |
double | totalMass |
Vector3d | up |
Vector3d | upAxis |
bool | updateResourcesOnEvent = true |
do we update immediately on event, or wait until the end of a series of modify events (i.e. vessel instantiation or decoupling) More... | |
Vector3d | velocityD |
double | verticalSpeed |
VesselDeltaV | VesselDeltaV |
This is the VesselDeltaV instance for this ShipConstruct. More... | |
List< VesselModule > | vesselModules = new List<VesselModule>() |
string | vesselName |
Beware this could be a localization Tag - Not localized. It's better to use GetDisplayName() to get the localized displayable vessel name for UI purposes. More... | |
VesselRanges | vesselRanges |
Vector3 | vesselSize |
Bounds for the vessel More... | |
bool | vesselSpawning = true |
True if this Vessel has just spawned into the game and hasn't had ground checks done. More... | |
Transform | vesselTransform |
VesselType | vesselType = VesselType.Debris |
double | waterOffset = 0d |
Static Public Attributes | |
static double | HeightFromPartOffsetGlobal = 0.5d |
static int | NumOverrideGroups = 4 |
Number of override groups available (does not include the default group) More... | |
static bool | PartialControlHasSASRCS = true |
static List< string > | VesselAnchorExceptions |
List of module classes that should not be anchored More... | |
static double | warningThresholdG = 0.8d |
Protected Member Functions | |
void | onCrewTransferred (GameEvents.HostedFromToAction< ProtoCrewMember, Part > data) |
Protected Attributes | |
List< ProtoCrewMember > | crew = new List<ProtoCrewMember>() |
int | crewCachedPartCount = -1 |
Properties | |
ActionGroupList | ActionGroups [get] |
bool | AutoClean [get] |
string | AutoCleanReason [get] |
VesselAutopilot | Autopilot [get] |
Situations | BestSituation [get] |
CometVessel | Comet [get, set] |
CommNetVessel | Connection [get, set] |
Vector3 | CurrentCoM [get] |
ControlLevel | CurrentControlLevel [get] |
DiscoveryInfo | DiscoveryInfo [get] |
float | distanceLandedPackThreshold [get, set] |
float | distanceLandedUnpackThreshold [get, set] |
float | distancePackThreshold [get, set] |
float | distanceUnpackThreshold [get, set] |
Vessel | EVALadderVessel [get] |
float | GroundLevelAngle [get] |
Angle of surface the Vessel is at currently, a negative value means it is initialized More... | |
RaycastHit | HeightFromSurfaceHit [get] |
bool | HoldPhysics [get] |
int | IgnoreCollisionsFrames [get] |
bool | IgnoreSpeedActive [get] |
Returns True if the vessel is ignoring Speed calcs. - Used after Set Position cheat is fired. More... | |
bool | isActiveVessel [get] |
bool | IsAnchored [get] |
bool | isCommandable [get] |
bool | IsControllable [get] |
True if the vessel has at least one operational control source and is active (focused). More... | |
bool | isEVA [get] |
bool | isPersistent [get, set] |
bool | IsRecoverable [get] |
bool | LandedInKSC [get] |
Returns true if vessel is landed at the KSC Launchpad or Runway. More... | |
bool | LandedInStockLaunchSite [get] |
Returns true if vessel is landed at one of the stock Launch Sites. More... | |
bool | LandedOrSplashed [get] |
static float | loadDistance [get, set] |
CelestialBody | mainBody [get] |
Orbit | orbit [get] |
List< Part > | Parts [get] |
bool | PatchedConicsAttached [get, set] |
Transform | ReferenceTransform [get] |
The reference transform is used to define the orientation of a vessel for controls and gauges. It defines which way is 'up' or 'forward' or which way pitch rotates, for instance. Read only. Use SetReferenceTransform to set. Defaults to vessel transform if no other transform is set. More... | |
string | SituationString [get] |
Returns the Localized Vessel situation String More... | |
SuspensionLoadBalancer | suspensionLoadBalancer [get, set] |
This is the Vessel Module that distributes the vessels mass across all suspension/wheels on the vessel. More... | |
Part | this[int index] [get] |
Part | this[uint flightID] [get] |
static float | unloadDistance [get, set] |
Vessel | VesselSurface [get, set] |
If this vessel is over another vessel, this property will be set More... | |
VesselValues | VesselValues [get] |
Properties inherited from IShipconstruct | |
List< Part > | Parts [get] |
Properties inherited from IDiscoverable | |
DiscoveryInfo | DiscoveryInfo [get] |
Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship.
enum Vessel.ControlLevel |
enum Vessel.Situations |
enum Vessel.State |
|
inline |
Check if a default vessel control action (staging, RCS, SAS) is blocked
|
inline |
|
inlinestatic |
|
inline |
Check if a default vessel control axis (throttle, PYR, etc) is blocked
|
inline |
|
inline |
|
inline |
change the worldspace velocity of this vessel
vel |
|
inline |
Will check shielding on all parts in the vessel.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise.
|
inline |
|
inline |
Sets all internal spaces in the vessel invisible
|
inline |
|
inline |
Checks colliders on all parts to see if the given one belongs to any of them.
c |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
< Cycle any auto-struts
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
T | : | class |
|
inline |
T | : | class |
|
inline |
Find the vesselmodule on this vessel of the supplied type
T | Type to find |
T | : | class |
|
inline |
|
inline |
Implements ITargetable.
|
inline |
Gets the amount and maxamount of the given resource in the partset
id | the hash of the resource |
amount | available amount will be stored here (will be headroom if pulling==false) |
maxAmount | max possible amount will be stored here |
pulling | are we planning to push or pull resources from the parts |
|
inline |
Gets the amount and maxamount of the given resource in the partset
id | the hash of the resource |
simulate | Set to true to use the simulationResourcePartSet |
amount | available amount will be stored here (will be headroom if pulling==false) |
maxAmount | max possible amount will be stored here |
pulling | are we planning to push or pull resources from the parts |
|
inline |
Gets the amount and maxamount of the given resource in the partset, obeying threshold
id | the hash of the resource |
amount | available amount will be stored here (will be headroom if pulling==false) |
maxAmount | >max possible amount will be stored here |
threshold | |
pulling | are we planning to push or pull resources from the parts |
|
inline |
Gets the amount and maxamount of the given resource in the partset, obeying threshold
id | the hash of the resource |
simulate | Set to true to use the simulationResourcePartSet |
amount | available amount will be stored here (will be headroom if pulling==false) |
maxAmount | >max possible amount will be stored here |
threshold | |
pulling | are we planning to push or pull resources from the parts |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Find the dominant vessel on a dock situation. The dominant vessel will have the secondary merged into it.
v1 | |
v2 |
|
inline |
Implements ITargetable.
|
inlinevirtual |
Calculates the angle of the surface the vessel is in
|
inline |
Get the Vessel height from the surface. Similar to GetHeightFromTerrain but checks against all surfaces. Sets heightFromSurface to the vessel height as well. Or -1 if not found.
|
inline |
Get the height of the vesselTransform from the terrain. Should only be done when vessel is loaded and unpacked. Will set heightFromTerrain to the vessel height. Or -1 if not found.
overRidePacked | If true will override the Vessel.packed check. |
|
inline |
Obtains the raycast hit from the vessel to the surface.
|
inlinestatic |
Get the landedAt string in English
landedAt |
|
inlinestatic |
|
inline |
Implements ITargetable.
|
inlinestatic |
< Generally this is only loaded vessels, but just check for the presence of a solver to allow it to fallback on the flightPlanNode.
|
inline |
Implements ITargetable.
|
inline |
Implements ITargetable.
|
inline |
Implements ITargetable.
|
inline |
|
inlinestatic |
|
inlinestatic |
Get the Situation String, Will be Localized
v |
|
inline |
Implements ITargetable.
|
inline |
Implements ITargetable.
|
inline |
Get the sum of the mass of all (physical) parts on this vessel
< if (p.physicalSignificance != Part.PhysicalSignificance.FULL) continue;
< CJ Adding resources Support
|
inline |
Implements ITargetable.
|
inline |
Implements ITargetable.
|
inline |
|
inline |
Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough)
|
inline |
puts the ship back into a simulated orbit and reenables physics
< can't unpack unloaded vessels
< don't unpack landed vessels if the planet is actually spinning.
|
inline |
disables physics and puts the ship into a propagated orbit
|
inline |
|
inline |
|
inline |
Set the number of FixedUpdate Frames to ignore GeeForce Calcs.
frames |
|
inline |
Set the number of FixedUpdate Frames to ignore Speed Calcs.
frames |
|
inline |
Initialize is used in cases where the Vessel component is added to a ship that already exists.
fromShipAssembly | set to true if Vessel is being initialized from a ShipAssembly (ShipConstruct) to Launch. Sets vessel position and orbit differently |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
< correct altitude based on PQS nominal height for the current lat/lon
|
inline |
|
inline |
|
inline |
< Kill any targeting.
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
Will search the parts in this vessel for a matching part persistentId. If found will return the part reference. Otherwise will return null.
partPersistentId |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
< We'll track how many crew we remove from the main list
|
inline |
|
inline |
Request a resource from across the vessel.
part | The part requesting the pull/push of the resource |
id | the hash of the resource |
demand | the demand in units, positive means draw (pull), negative means push |
usePriority | draw in staging order |
|
inline |
Request a resource from across the vessel.
part | The part requesting the pull/push of the resource |
id | the hash of the resource |
demand | the demand in units, positive means draw (pull), negative means push |
usePriority | draw in staging order |
simulate | Set to true to use the simulationResourcePartSet |
|
inline |
|
inline |
|
inline |
Destroys the joint that holds the vessel anchored in place
|
inline |
Method called when vessel goes active, we need to start a coroutine while we wait for the contractsystem to be loaded
|
inline |
|
inline |
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Implements IDiscoverable.
|
inline |
Sets the internal space for the given part visible (and all others invisible)
visiblePart |
|
inline |
Sets the internal spaces for the given parts visible, other IVA spaces in the same vesesl become invisible
visibleParts |
|
inline |
|
inline |
|
inline |
|
inline |
Set the LandedAt and displaylandedAt variables. an optional GameObject and an optional inputdisplaylandedAt string can be passed in. The landedAt field will be set to the passed in landedAt string. If an inputdisplaylandedAt string is passed in then the displaylandedAt string is set to this string (Usually localized language). If the inputdisplaylandedAt is empty and a GameObject is supplied the GameObject Unity Tag will be used to lookup a MiniBiome name. If no inputdisplaylandedAt or GameObject are passed in the displaylandedAt field is set to the landedAt field.
landedAt | |
gO | |
inputdisplaylandedAt |
|
inline |
|
inline |
|
inline |
Sets the worldspace position of this vessel, and all its parts
position |
< physicsless parts will be moved along with their parents
|
inline |
< unset the ref transform id if setting a null transform.
|
inline |
Sets the worldspace rotation of this vessel, and all its parts
rotation |
|
inline |
Sets the worldspace rotation of this vessel, and all its parts. Accepts bool on whether to reset pos (leave false if pos is set elsewhere)
rotation |
|
inline |
set the absolute world velocity of this vessel
vel |
|
inline |
|
inline |
Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
pv | The Protovessel object for this vessel |
|
inline |
Start from backup is used when the scene is being resumed, and the Vessel component is added before the parts themselves. Note that this method won't load the parts. It only creates the vessel object. To load parts, use the Vessel.Load() method.
pv | The Protovessel object for this vessel |
st | The flightstate |
|
inline |
|
inline |
|
inline |
< If we're not dead and we have the engines on, then let's compute an estimated acceleration from engines.
|
inline |
< do data transmitter thingie here
|
inline |
Updates the distance traveled of this vessel
|
inline |
|
inline |
< use CoM, not root part
< Pythagorean idea thanks to suggestion from Toadicus on modders' corner tracker. And it's even faster than the old trig version, too!
|
inline |
Clears dirty flag and updates the vessel and the crossfeed sets
|
inline |
Will update only if dirty.
|
inline |
|
inline |
Update the bounds of the vessel.
Vector3d Vessel.acceleration |
AltimeterDisplayState Vessel.altimeterDisplayState = AltimeterDisplayState.DEFAULT |
double Vessel.altitude |
Vector3 Vessel.angularMomentum = Vector3.zero |
Vector3 Vessel.angularVelocity = Vector3.zero |
Vector3d Vessel.angularVelocityD = Vector3d.zero |
Vector3 Vessel.CoM |
Vector3d Vessel.CoMD |
CommNetVessel Vessel.connection |
double Vessel.convectiveMachFlux |
|
protected |
int Vessel.crewableParts = 0 |
|
protected |
int Vessel.crewedParts = 0 |
all the crossfeed (i.e. non-vessel-wide) sets on the vessel
FlightCtrlState Vessel.ctrlState |
int Vessel.currentStage |
bool Vessel.directSunlight |
string Vessel.displaylandedAt = "" |
A string of where the vessel is landed in Localized language.
double Vessel.distanceTraveled |
Protopart snapshot Dictionary (keyed by part persistentId) of the parts that will get drained when vessel is packed
List built within this class, used to grouped in a single element the parts with it's resources to drain and drain time.
List<PartModule> Vessel.dockingPorts = new List<PartModule>() |
bool Vessel.easingInToSurface |
bool Vessel.EditableNodes |
KerbalEVA Vessel.evaController |
ConfigNode Vessel.flightPlanNode |
RUI.Algorithms.StackFlowGraph Vessel.flowGraph |
a holder for the flowgraph
bool Vessel.frameWasRotating = false |
double Vessel.geeForce |
Vector3d Vessel.graviticAcceleration |
List<Part> Vessel.GroundContacts |
int Vessel.GroupOverride |
Action/axis group override selector
0 -> default group 1+ selects actual override group
float Vessel.gThresh |
|
static |
double Vessel.heightFromPartOffsetLocal = 0d |
float Vessel.heightFromSurface = -1f |
float Vessel.heightFromTerrain = -1f |
Guid Vessel.id |
Unique identifier for each vessel.
Vector3d Vessel.krakensbaneAcc |
bool Vessel.Landed |
string Vessel.landedAt = "" |
A string of where the vessel is landed in English.
string Vessel.landedAtLast = "" |
CelestialBody Vessel.lastBody |
double Vessel.lastUT = -1 |
for use in FI when checking if vessel has spent time unloaded.
Vector3d Vessel.lastVel |
double Vessel.latitude |
string Vessel.launchedFrom = "" |
Will contain the Launch Site Name that this vessel launched from. If indeed it did launch from a launch site.
double Vessel.launchTime |
bool Vessel.loaded = false |
Vector3 Vessel.localCoM |
This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass.
double Vessel.longitude |
double Vessel.mach |
MapObject Vessel.mapObject |
ControlLevel Vessel.maxControlLevel = ControlLevel.FULL |
double Vessel.missionTime |
Waypoint Vessel.navigationWaypoint |
the active navigation waypoint for this vessel
|
static |
Number of override groups available (does not include the default group)
GameObject Vessel.objectUnderVessel |
double Vessel.obt_speed |
Vector3d Vessel.obt_velocity |
FlightInputCallback Vessel.OnAutopilotUpdate = (FlightCtrlState st) => { } |
FlightInputCallback Vessel.OnFlyByWire = (FlightCtrlState st) => { } |
pass the control state from the scene handler to this vessel.
Callback Vessel.OnJustAboutToBeDestroyed = () => { } |
FlightInputCallback Vessel.OnPostAutopilotUpdate = (FlightCtrlState st) => { } |
FlightInputCallback Vessel.OnPreAutopilotUpdate = (FlightCtrlState st) => { } |
OrbitDriver Vessel.orbitDriver |
OrbitRenderer Vessel.orbitRenderer |
OrbitTargeter Vessel.orbitTargeter |
KSPActionGroup [] Vessel.OverrideActionControl |
KSPAxisGroup [] Vessel.OverrideAxisControl |
bool [] Vessel.OverrideDefault |
string [] Vessel.OverrideGroupNames |
bool Vessel.packed |
landing / splashdown detection
|
static |
double Vessel.partMaxGThresh |
List<Part> Vessel.parts |
PatchedConicRenderer Vessel.patchedConicRenderer |
PatchedConicSolver Vessel.patchedConicSolver |
bool Vessel.permanentGroundContact |
uint Vessel.persistentId |
A unique identifier for each vessel including from when it was Shipconstruct
Vector3d Vessel.perturbation |
double Vessel.pqsAltitude |
int Vessel.PQSmaxLevel = 0 |
int Vessel.PQSminLevel = 0 |
VesselPrecalculate Vessel.precalc |
float Vessel.presThresh |
ProtoVessel Vessel.protoVessel |
ProtoTargetInfo Vessel.pTI = null |
double Vessel.radarAltitude |
Vector3 Vessel.rb_velocity |
Vector3d Vessel.rb_velocityD |
uint Vessel.referenceTransformId |
uint Vessel.referenceTransformIdRecall |
PartSet Vessel.resourcePartSet |
The vessel partset.
bool Vessel.resourcesDirty = false |
We set the dirty flag if we're waiting.
Part Vessel.rootPart |
FlightCtrlState [] Vessel.setControlStates |
all the Delta-V simulation crossfeed (i.e. non-vessel-wide) sets on the vessel
PartSet Vessel.simulationResourcePartSet |
The vessel Delta-V simulation partset.
Situations Vessel.situation |
bool Vessel.skipGroundPositioning = false |
True if this Vessel is to skip vessel ground checks. Will also be set true if the vessel was launched from a LaunchSite. If true Vessel will skip ground repositioning when coming off rails.
bool Vessel.skipGroundPositioningForDroppedPart = false |
double Vessel.specificAcceleration |
Specific acceleration is the vessel's potential acceleration per unit of throttle. Used to estimate burn times and such. NOTE: this value is calculated based on smoothed acceleration, so it isn't completely accurate. It will also change as the vessel's mass is reduced as fuel burns away. (it does get pretty accurate after burning for a few seconds)
Quaternion Vessel.srfRelRotation |
State Vessel.state = State.INACTIVE |
ITargetable Vessel.targetObject |
double Vessel.terrainAltitude |
Vector3 Vessel.terrainNormal |
double Vessel.totalMass |
Vector3d Vessel.up |
Vector3d Vessel.upAxis |
bool Vessel.updateResourcesOnEvent = true |
do we update immediately on event, or wait until the end of a series of modify events (i.e. vessel instantiation or decoupling)
Vector3d Vessel.velocityD |
double Vessel.verticalSpeed |
|
static |
List of module classes that should not be anchored
VesselDeltaV Vessel.VesselDeltaV |
This is the VesselDeltaV instance for this ShipConstruct.
List<VesselModule> Vessel.vesselModules = new List<VesselModule>() |
string Vessel.vesselName |
Beware this could be a localization Tag - Not localized. It's better to use GetDisplayName() to get the localized displayable vessel name for UI purposes.
VesselRanges Vessel.vesselRanges |
Vector3 Vessel.vesselSize |
Bounds for the vessel
bool Vessel.vesselSpawning = true |
True if this Vessel has just spawned into the game and hasn't had ground checks done.
Transform Vessel.vesselTransform |
VesselType Vessel.vesselType = VesselType.Debris |
|
static |
double Vessel.waterOffset = 0d |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
getset |
|
get |
|
get |
|
get |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
get |
Angle of surface the Vessel is at currently, a negative value means it is initialized
|
get |
|
get |
|
get |
|
get |
Returns True if the vessel is ignoring Speed calcs. - Used after Set Position cheat is fired.
|
get |
|
get |
|
get |
|
get |
True if the vessel has at least one operational control source and is active (focused).
|
get |
|
getset |
|
get |
|
get |
Returns true if vessel is landed at the KSC Launchpad or Runway.
|
get |
Returns true if vessel is landed at one of the stock Launch Sites.
|
get |
|
staticgetset |
|
get |
|
get |
|
get |
|
getset |
|
get |
The reference transform is used to define the orientation of a vessel for controls and gauges. It defines which way is 'up' or 'forward' or which way pitch rotates, for instance. Read only. Use SetReferenceTransform to set. Defaults to vessel transform if no other transform is set.
|
get |
Returns the Localized Vessel situation String
|
getset |
This is the Vessel Module that distributes the vessels mass across all suspension/wheels on the vessel.
|
get |
|
get |
|
staticgetset |
|
getset |
If this vessel is over another vessel, this property will be set
|
get |