Difference between revisions of "API:Vessel"
From Kerbal Space Program Wiki
(Updating to 1.04 signatures and adding all methods, fields, properties) |
Aspacenerd (talk | contribs) m (Added some descriptions) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 8: | Line 8: | ||
|summary=Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship. | |summary=Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship. | ||
}} | }} | ||
− | + | {{Properties|properties= | |
− | {{ | ||
{{Property | {{Property | ||
|type=ActionGroupList | |type=ActionGroupList | ||
|name=ActionGroups | |name=ActionGroups | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 20: | Line 19: | ||
|type=VesselAutopilot | |type=VesselAutopilot | ||
|name=Autopilot | |name=Autopilot | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 27: | Line 26: | ||
|type=Vector3 | |type=Vector3 | ||
|name=CurrentCoM | |name=CurrentCoM | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 34: | Line 33: | ||
|type=DiscoveryInfo | |type=DiscoveryInfo | ||
|name=DiscoveryInfo | |name=DiscoveryInfo | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 41: | Line 40: | ||
|type=float | |type=float | ||
|name=distanceLandedPackThreshold | |name=distanceLandedPackThreshold | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 48: | Line 47: | ||
|type=float | |type=float | ||
|name=distanceLandedUnpackThreshold | |name=distanceLandedUnpackThreshold | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 55: | Line 54: | ||
|type=float | |type=float | ||
|name=distancePackThreshold | |name=distancePackThreshold | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 62: | Line 61: | ||
|type=float | |type=float | ||
|name=distanceUnpackThreshold | |name=distanceUnpackThreshold | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 69: | Line 68: | ||
|type=bool | |type=bool | ||
|name=HoldPhysics | |name=HoldPhysics | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 76: | Line 75: | ||
|type=bool | |type=bool | ||
|name=isActiveVessel | |name=isActiveVessel | ||
− | |desc= | + | |desc=Returns true if this is the vessel that is currently being controled by the player. |
|hasget=1 | |hasget=1 | ||
− | |hasset= | + | |hasset= |
}} | }} | ||
{{Property | {{Property | ||
|type=bool | |type=bool | ||
|name=isCommandable | |name=isCommandable | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 90: | Line 89: | ||
|type=bool | |type=bool | ||
|name=IsControllable | |name=IsControllable | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 104: | Line 103: | ||
|type=bool | |type=bool | ||
|name=isPersistent | |name=isPersistent | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 111: | Line 110: | ||
|type=bool | |type=bool | ||
|name=IsRecoverable | |name=IsRecoverable | ||
− | |desc= | + | |desc=Returns true if this vessel is recoverable (ex. is splashed down or landed on Kerbin and is not moving). |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 118: | Line 117: | ||
|type=bool | |type=bool | ||
|name=LandedOrSplashed | |name=LandedOrSplashed | ||
− | |desc= | + | |desc=Returns true if the vessel is splashed down or landed. |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 125: | Line 124: | ||
|type=CelestialBody | |type=CelestialBody | ||
|name=mainBody | |name=mainBody | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
− | |hasset= | + | |hasset= |
}} | }} | ||
{{Property | {{Property | ||
|type=Orbit | |type=Orbit | ||
|name=orbit | |name=orbit | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 139: | Line 138: | ||
|type=List〈Part〉 | |type=List〈Part〉 | ||
|name=Parts | |name=Parts | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 146: | Line 145: | ||
|type=bool | |type=bool | ||
|name=PatchedConicsAttached | |name=PatchedConicsAttached | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 160: | Line 159: | ||
|type=VesselValues | |type=VesselValues | ||
|name=VesselValues | |name=VesselValues | ||
− | |desc= | + | |desc=? |
|hasget=1 | |hasget=1 | ||
|hasset= | |hasset= | ||
Line 167: | Line 166: | ||
|type=static float | |type=static float | ||
|name=loadDistance | |name=loadDistance | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
Line 174: | Line 173: | ||
|type=static float | |type=static float | ||
|name=unloadDistance | |name=unloadDistance | ||
− | |desc=Has attribute [Obsolete("Use Vessel.vesselRanges instead")] | + | |desc=? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
|hasget=1 | |hasget=1 | ||
|hasset=1 | |hasset=1 | ||
}} | }} | ||
− | + | }} | |
− | {{ | + | {{Fields| |
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
Line 194: | Line 193: | ||
|type=Vector3 | |type=Vector3 | ||
|name=angularMomentum | |name=angularMomentum | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 204: | Line 203: | ||
|type=double | |type=double | ||
|name=atmDensity | |name=atmDensity | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=atmosphericTemperature | |name=atmosphericTemperature | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=CentrifugalAcc | |name=CentrifugalAcc | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 224: | Line 223: | ||
|type=double | |type=double | ||
|name=convectiveCoefficient | |name=convectiveCoefficient | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=convectiveMachFlux | |name=convectiveMachFlux | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=CoriolisAcc | |name=CoriolisAcc | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 249: | Line 248: | ||
|type=bool | |type=bool | ||
|name=directSunlight | |name=directSunlight | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=distanceToSun | |name=distanceToSun | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=dynamicPressurekPa | |name=dynamicPressurekPa | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=KerbalEVA | |type=KerbalEVA | ||
|name=evaController | |name=evaController | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=externalTemperature | |name=externalTemperature | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=ConfigNode | |type=ConfigNode | ||
|name=flightPlanNode | |name=flightPlanNode | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=geeForce | |name=geeForce | ||
− | |desc=The current magnitude of gravity, in meters per second squared. | + | |desc=The current magnitude of gravity, in meters per second squared. (Is this right? geeForce is not gravity) |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=geeForce_immediate | |name=geeForce_immediate | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=gForce | |name=gForce | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=bool | |type=bool | ||
|name=handlePhysicsStats | |name=handlePhysicsStats | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 304: | Line 303: | ||
|type=float | |type=float | ||
|name=heightFromTerrain | |name=heightFromTerrain | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=horizontalSrfSpeed | |name=horizontalSrfSpeed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 319: | Line 318: | ||
|type=double | |type=double | ||
|name=indicatedAirSpeed | |name=indicatedAirSpeed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 329: | Line 328: | ||
|type=string | |type=string | ||
|name=landedAt | |name=landedAt | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=latitude | |name=latitude | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=launchTime | |name=launchTime | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 354: | Line 353: | ||
|type=double | |type=double | ||
|name=longitude | |name=longitude | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=mach | |name=mach | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=missionTime | |name=missionTime | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3 | |type=Vector3 | ||
|name=MOI | |name=MOI | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=obt_speed | |name=obt_speed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 384: | Line 383: | ||
|type=FlightInputCallback | |type=FlightInputCallback | ||
|name=OnAutopilotUpdate | |name=OnAutopilotUpdate | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=FlightInputCallback | |type=FlightInputCallback | ||
|name=OnFlyByWire | |name=OnFlyByWire | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Callback | |type=Callback | ||
|name=OnJustAboutToBeDestroyed | |name=OnJustAboutToBeDestroyed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=FlightInputCallback | |type=FlightInputCallback | ||
|name=OnPostAutopilotUpdate | |name=OnPostAutopilotUpdate | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=FlightInputCallback | |type=FlightInputCallback | ||
|name=OnPreAutopilotUpdate | |name=OnPreAutopilotUpdate | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=OrbitDriver | |type=OrbitDriver | ||
|name=orbitDriver | |name=orbitDriver | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=OrbitRenderer | |type=OrbitRenderer | ||
|name=orbitRenderer | |name=orbitRenderer | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=OrbitTargeter | |type=OrbitTargeter | ||
|name=orbitTargeter | |name=orbitTargeter | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=bool | |type=bool | ||
|name=packed | |name=packed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=List〈Part〉 | |type=List〈Part〉 | ||
|name=parts | |name=parts | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=PatchedConicRenderer | |type=PatchedConicRenderer | ||
|name=patchedConicRenderer | |name=patchedConicRenderer | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=PatchedConicSolver | |type=PatchedConicSolver | ||
|name=patchedConicSolver | |name=patchedConicSolver | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=perturbation | |name=perturbation | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=pqsAltitude | |name=pqsAltitude | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=ProtoVessel | |type=ProtoVessel | ||
|name=protoVessel | |name=protoVessel | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 464: | Line 463: | ||
|type=uint | |type=uint | ||
|name=referenceTransformId | |name=referenceTransformId | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 474: | Line 473: | ||
|type=Situations | |type=Situations | ||
|name=situation | |name=situation | ||
− | |desc= | + | |desc=? |
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=solarFlux | |name=solarFlux | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 494: | Line 488: | ||
|type=double | |type=double | ||
|name=speed | |name=speed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=double | |type=double | ||
|name=speedOfSound | |name=speedOfSound | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=bool | |type=bool | ||
|name=Splashed | |name=Splashed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Vector3d | |type=Vector3d | ||
|name=srf_velocity | |name=srf_velocity | ||
− | |desc= | + | |desc=The velocity vector of the vessel while in the atmosphere. (Prograde) |
}} | }} | ||
{{Field | {{Field | ||
Line 519: | Line 513: | ||
|type=double | |type=double | ||
|name=srfSpeed | |name=srfSpeed | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=State | |type=State | ||
|name=state | |name=state | ||
− | |desc= | + | |desc=? |
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
{{Field | {{Field | ||
Line 539: | Line 528: | ||
|type=ITargetable | |type=ITargetable | ||
|name=targetObject | |name=targetObject | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
Line 569: | Line 558: | ||
|type=VesselRanges | |type=VesselRanges | ||
|name=vesselRanges | |name=vesselRanges | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=Transform | |type=Transform | ||
|name=vesselTransform | |name=vesselTransform | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Field | {{Field | ||
|type=VesselType | |type=VesselType | ||
|name=vesselType | |name=vesselType | ||
− | |desc= | + | |desc=? |
+ | }} | ||
}} | }} | ||
− | |||
− | {{ | + | {{Methods| |
+ | {{Method | ||
+ | |returntype=constructor | ||
+ | |returndesc= | ||
+ | |name=Vessel | ||
+ | |args= | ||
+ | |desc=? | ||
+ | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
Line 589: | Line 585: | ||
|name=AttachPatchedConicsSolver | |name=AttachPatchedConicsSolver | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 596: | Line 592: | ||
|name=BackupVessel | |name=BackupVessel | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 603: | Line 599: | ||
|name=CalculatePhysicsStats | |name=CalculatePhysicsStats | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 609: | Line 605: | ||
|returndesc= | |returndesc= | ||
|name=ChangeWorldVelocity | |name=ChangeWorldVelocity | ||
− | |args=Vector3d velOffset | + | |args={{arg|Vector3d|velOffset}} |
|desc=change the worldspace velocity of this vessel | |desc=change the worldspace velocity of this vessel | ||
}} | }} | ||
Line 617: | Line 613: | ||
|name=checkLanded | |name=checkLanded | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 624: | Line 620: | ||
|name=checkSplashed | |name=checkSplashed | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 638: | Line 634: | ||
|name=ClearStaging | |name=ClearStaging | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 644: | Line 640: | ||
|returndesc= | |returndesc= | ||
|name=ContainsCollider | |name=ContainsCollider | ||
− | |args=Collider c | + | |args={{arg|Collider|c}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 652: | Line 648: | ||
|name=DespawnCrew | |name=DespawnCrew | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 659: | Line 655: | ||
|name=DestroyVesselComponents | |name=DestroyVesselComponents | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 666: | Line 662: | ||
|name=DetachPatchedConicsSolver | |name=DetachPatchedConicsSolver | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 673: | Line 669: | ||
|name=Die | |name=Die | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 680: | Line 676: | ||
|name=FallBackReferenceTransform | |name=FallBackReferenceTransform | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 687: | Line 683: | ||
|name=FeedInputFeed | |name=FeedInputFeed | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 694: | Line 690: | ||
|name=FindDefaultVesselType | |name=FindDefaultVesselType | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 708: | Line 704: | ||
|name=findLocalCenterOfPressure | |name=findLocalCenterOfPressure | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 715: | Line 711: | ||
|name=findLocalMOI | |name=findLocalMOI | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 721: | Line 717: | ||
|returndesc= | |returndesc= | ||
|name=findLocalMOI | |name=findLocalMOI | ||
− | |args=Vector3 worldCoM | + | |args={{arg|Vector3|worldCoM}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 729: | Line 725: | ||
|name=FindPartModulesImplementing〈T〉 | |name=FindPartModulesImplementing〈T〉 | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 743: | Line 739: | ||
|name=GetActiveParts | |name=GetActiveParts | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 749: | Line 745: | ||
|returndesc= | |returndesc= | ||
|name=GetActiveResource | |name=GetActiveResource | ||
− | |args=PartResourceDefinition def | + | |args={{arg|PartResourceDefinition|def}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 757: | Line 753: | ||
|name=GetActiveResources | |name=GetActiveResources | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 764: | Line 760: | ||
|name=GetCrewCapacity | |name=GetCrewCapacity | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 771: | Line 767: | ||
|name=GetCrewCount | |name=GetCrewCount | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 778: | Line 774: | ||
|name=GetFwdVector | |name=GetFwdVector | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 785: | Line 781: | ||
|name=GetHeightFromSurface | |name=GetHeightFromSurface | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 799: | Line 795: | ||
|name=GetName | |name=GetName | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 806: | Line 802: | ||
|name=GetObtVelocity | |name=GetObtVelocity | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 813: | Line 809: | ||
|name=GetOrbit | |name=GetOrbit | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 820: | Line 816: | ||
|name=GetOrbitDriver | |name=GetOrbitDriver | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 827: | Line 823: | ||
|name=GetReferenceTransformPart | |name=GetReferenceTransformPart | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 834: | Line 830: | ||
|name=GetSrfVelocity | |name=GetSrfVelocity | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 841: | Line 837: | ||
|name=GetTargetingMode | |name=GetTargetingMode | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 855: | Line 851: | ||
|name=GetTransform | |name=GetTransform | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 862: | Line 858: | ||
|name=GetVessel | |name=GetVessel | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 897: | Line 893: | ||
|name=HasControlSources | |name=HasControlSources | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 903: | Line 899: | ||
|returndesc= | |returndesc= | ||
|name=Initialize | |name=Initialize | ||
− | |args=bool fromShipAssembly | + | |args={{arg|bool|fromShipAssembly}} |
|desc=Initialize is used in cases where the Vessel component is added to a ship that already exists. | |desc=Initialize is used in cases where the Vessel component is added to a ship that already exists. | ||
}} | }} | ||
Line 911: | Line 907: | ||
|name=IsClearToSave | |name=IsClearToSave | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 918: | Line 914: | ||
|name=Load | |name=Load | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Load")] | + | |desc=? Has attribute [ContextMenu("Load")] |
}} | }} | ||
{{Method | {{Method | ||
Line 925: | Line 921: | ||
|name=MakeActive | |name=MakeActive | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 932: | Line 928: | ||
|name=MakeInactive | |name=MakeInactive | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 939: | Line 935: | ||
|name=MurderCrew | |name=MurderCrew | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 946: | Line 942: | ||
|name=OnDestroy | |name=OnDestroy | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 952: | Line 948: | ||
|returndesc= | |returndesc= | ||
|name=OnLoadFlightState | |name=OnLoadFlightState | ||
− | |args=Dictionary〈string, KSPParseable〉 dataPool | + | |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 959: | Line 955: | ||
|returndesc= | |returndesc= | ||
|name=OnSaveFlightState | |name=OnSaveFlightState | ||
− | |args=Dictionary〈string, KSPParseable〉 dataPool | + | |args={{arg|Dictionary〈string, KSPParseable〉|dataPool}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 967: | Line 963: | ||
|name=PQSAltitude | |name=PQSAltitude | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 974: | Line 970: | ||
|name=printCollisions | |name=printCollisions | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Print All Collisions")] | + | |desc=? Has attribute [ContextMenu("Print All Collisions")] |
}} | }} | ||
{{Method | {{Method | ||
Line 981: | Line 977: | ||
|name=printGroundContacts | |name=printGroundContacts | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Print Ground Contacts")] | + | |desc=? Has attribute [ContextMenu("Print Ground Contacts")] |
}} | }} | ||
{{Method | {{Method | ||
Line 988: | Line 984: | ||
|name=RenameVessel | |name=RenameVessel | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Rename Vessel")] | + | |desc=? Has attribute [ContextMenu("Rename Vessel")] |
}} | }} | ||
{{Method | {{Method | ||
Line 995: | Line 991: | ||
|name=ResetCollisionIgnores | |name=ResetCollisionIgnores | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Reset Collision Ignores")] | + | |desc=? Has attribute [ContextMenu("Reset Collision Ignores")] |
}} | }} | ||
{{Method | {{Method | ||
Line 1,002: | Line 998: | ||
|name=ResumeStaging | |name=ResumeStaging | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,009: | Line 1,005: | ||
|name=ResumeTarget | |name=ResumeTarget | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,016: | Line 1,012: | ||
|name=RevealAltitude | |name=RevealAltitude | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,023: | Line 1,019: | ||
|name=RevealMass | |name=RevealMass | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,030: | Line 1,026: | ||
|name=RevealName | |name=RevealName | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,037: | Line 1,033: | ||
|name=RevealSituationString | |name=RevealSituationString | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,044: | Line 1,040: | ||
|name=RevealSpeed | |name=RevealSpeed | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,051: | Line 1,047: | ||
|name=RevealType | |name=RevealType | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,058: | Line 1,054: | ||
|name=SetActiveInternalPart | |name=SetActiveInternalPart | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,064: | Line 1,060: | ||
|returndesc= | |returndesc= | ||
|name=SetActiveInternalPart | |name=SetActiveInternalPart | ||
− | |args=List〈Part〉 visibleParts | + | |args={{arg|List〈Part〉|visibleParts}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,071: | Line 1,067: | ||
|returndesc= | |returndesc= | ||
|name=SetActiveInternalPart | |name=SetActiveInternalPart | ||
− | |args=Part visiblePart | + | |args={{arg|Part|visiblePart}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,078: | Line 1,074: | ||
|returndesc= | |returndesc= | ||
|name=SetPosition | |name=SetPosition | ||
− | |args=Vector3 position | + | |args={{arg|Vector3|position}} |
|desc=Sets the worldspace position of this vessel, and all its parts | |desc=Sets the worldspace position of this vessel, and all its parts | ||
}} | }} | ||
Line 1,085: | Line 1,081: | ||
|returndesc= | |returndesc= | ||
|name=SetPosition | |name=SetPosition | ||
− | |args=Vector3 position, bool usePristineCoords | + | |args={{arg|Vector3|position}},{{arg|bool|usePristineCoords}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,092: | Line 1,088: | ||
|returndesc= | |returndesc= | ||
|name=SetReferenceTransform | |name=SetReferenceTransform | ||
− | |args=Part p | + | |args={{arg|Part|p}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,099: | Line 1,095: | ||
|returndesc= | |returndesc= | ||
|name=SetRotation | |name=SetRotation | ||
− | |args=Quaternion rotation | + | |args={{arg|Quaternion|rotation}} |
|desc=Sets the worldspace rotation of this vessel, and all its parts | |desc=Sets the worldspace rotation of this vessel, and all its parts | ||
}} | }} | ||
Line 1,106: | Line 1,102: | ||
|returndesc= | |returndesc= | ||
|name=SetWorldVelocity | |name=SetWorldVelocity | ||
− | |args=Vector3d vel | + | |args={{arg|Vector3d|vel}} |
|desc=set the absolute world velocity of this vessel | |desc=set the absolute world velocity of this vessel | ||
}} | }} | ||
Line 1,114: | Line 1,110: | ||
|name=SpawnCrew | |name=SpawnCrew | ||
|args= | |args= | ||
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,120: | Line 1,116: | ||
|returndesc= | |returndesc= | ||
|name=StartFromBackup | |name=StartFromBackup | ||
− | |args=ProtoVessel pv | + | |args={{arg|ProtoVessel|pv}} |
|desc=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. | |desc=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. | ||
}} | }} | ||
Line 1,127: | Line 1,123: | ||
|returndesc= | |returndesc= | ||
|name=Translate | |name=Translate | ||
− | |args=Vector3 offset | + | |args={{arg|Vector3|offset}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{Method | {{Method | ||
Line 1,135: | Line 1,131: | ||
|name=Unload | |name=Unload | ||
|args= | |args= | ||
− | |desc=Has attribute [ContextMenu("Unload")] | + | |desc=? Has attribute [ContextMenu("Unload")] |
}} | }} | ||
{{StaticMethod | {{StaticMethod | ||
Line 1,141: | Line 1,137: | ||
|returndesc= | |returndesc= | ||
|name=AutoRename | |name=AutoRename | ||
− | |args=Vessel v, string baseName | + | |args={{arg|Vessel|v}},{{arg|string|baseName}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{StaticMethod | {{StaticMethod | ||
Line 1,148: | Line 1,144: | ||
|returndesc= | |returndesc= | ||
|name=GetLandedAtString | |name=GetLandedAtString | ||
− | |args=string landedAt | + | |args={{arg|string|landedAt}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{StaticMethod | {{StaticMethod | ||
Line 1,155: | Line 1,151: | ||
|returndesc= | |returndesc= | ||
|name=GetMETString | |name=GetMETString | ||
− | |args=Vessel v | + | |args={{arg|Vessel|v}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{StaticMethod | {{StaticMethod | ||
Line 1,162: | Line 1,158: | ||
|returndesc= | |returndesc= | ||
|name=GetSituationString | |name=GetSituationString | ||
− | |args=Vessel v | + | |args={{arg|Vessel|v}} |
− | |desc= | + | |desc=? |
}} | }} | ||
{{StaticMethod | {{StaticMethod | ||
Line 1,169: | Line 1,165: | ||
|returndesc= | |returndesc= | ||
|name=IsValidVesselName | |name=IsValidVesselName | ||
− | |args=string name | + | |args={{arg|string|name}} |
− | |desc= | + | |desc=? |
+ | }} | ||
+ | }} | ||
+ | {{Enums|enums= | ||
+ | {{Enum | ||
+ | |name=Situations | ||
+ | |values=LANDED<br/>SPLASHED<br/>PRELAUNCH<br/>FLYING<br/>SUB_ORBITAL<br/>ORBITING<br/>ESCAPING<br/>DOCKED | ||
+ | }} | ||
+ | {{Enum | ||
+ | |name=State | ||
+ | |values=INACTIVE<br/>ACTIVE<br/>DEAD | ||
}} | }} | ||
− | {{ | + | }} |
+ | == Other API == | ||
+ | |||
+ | Vessel also contains the following, not included above. | ||
+ | |||
+ | <syntaxhighlight> | ||
+ | ... | ||
+ | public Part this[int index] { get; } | ||
+ | public Part this[uint flightID] { get; } | ||
+ | |||
+ | public class ActiveResource | ||
+ | { | ||
+ | public double amount; | ||
+ | public PartResourceDefinition info; | ||
+ | public double maxAmount; | ||
+ | public List<Part> parts; | ||
+ | |||
+ | public ActiveResource(PartResourceDefinition def); | ||
+ | } | ||
+ | ... | ||
+ | </syntaxhighlight> | ||
[[Category:Community API Documentation]] | [[Category:Community API Documentation]] |
Latest revision as of 21:22, 21 April 2021
A Vessel represents a ship, or a piece of debris that was once part of a ship. You can access the vessel that your Part is part of with this.vessel. Particularly useful members are vessel.orbit, which gives your orbit, and vessel.mainBody, which gives CelestialBody whose influence you are currently under.
Vessel Class
Inherits | Implements |
---|---|
MonoBehaviour |
|
Vessels define individual ships in flight. They work essentially as a header for the set of parts that make up the ship.
Properties
The following is a list of properties in Vessel.
Name | Description |
---|---|
ActionGroupList ActionGroups { get; } | ? |
VesselAutopilot Autopilot { get; } | ? |
Vector3 CurrentCoM { get; } | ? |
DiscoveryInfo DiscoveryInfo { get; } | ? |
float distanceLandedPackThreshold { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distanceLandedUnpackThreshold { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distancePackThreshold { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
float distanceUnpackThreshold { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
bool HoldPhysics { get; } | ? |
bool isActiveVessel { get; } | Returns true if this is the vessel that is currently being controled by the player. |
bool isCommandable { get; } | ? |
bool IsControllable { get; } | ? |
bool isEVA { get; } | True if the vessel is an EVA kerbal. |
bool isPersistent { get; set; } | ? |
bool IsRecoverable { get; } | Returns true if this vessel is recoverable (ex. is splashed down or landed on Kerbin and is not moving). |
bool LandedOrSplashed { get; } | Returns true if the vessel is splashed down or landed. |
CelestialBody mainBody { get; } | ? |
Orbit orbit { get; } | ? |
List〈Part〉 Parts { get; } | ? |
bool PatchedConicsAttached { get; } | ? |
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. |
VesselValues VesselValues { get; } | ? |
static float loadDistance { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
static float unloadDistance { get; set; } | ? Has attribute [Obsolete("Use Vessel.vesselRanges instead")] |
Fields
The following is a list of fields in Vessel.
Signature | Description |
---|---|
Vector3d acceleration | The current acceleration vector of the vessel. |
double altitude | Height above the surface of the reference body, including liquid bodies. |
Vector3 angularMomentum | ? |
Vector3 angularVelocity | The angular velocity vector of the vessel. |
double atmDensity | ? |
double atmosphericTemperature | ? |
Vector3d CentrifugalAcc | ? |
Vector3 CoM | The vector corresponding to the vessel's center of mass, relative to the vessel origin. |
double convectiveCoefficient | ? |
double convectiveMachFlux | ? |
Vector3d CoriolisAcc | ? |
FlightCtrlState ctrlState | The vessel's flight control state object, used for accessing and modifying user and fly-by-wire input. |
int currentStage | Current stage of the vessel. |
bool directSunlight | ? |
double distanceToSun | ? |
double dynamicPressurekPa | ? |
KerbalEVA evaController | ? |
double externalTemperature | ? |
ConfigNode flightPlanNode | ? |
double geeForce | The current magnitude of gravity, in meters per second squared. (Is this right? geeForce is not gravity) |
double geeForce_immediate | ? |
Vector3d gForce | ? |
bool handlePhysicsStats | ? |
float heightFromSurface | The height above the surface of the reference body, including liquid bodies. |
float heightFromTerrain | ? |
double horizontalSrfSpeed | ? |
Guid id | Unique identifier for each vessel. |
double indicatedAirSpeed | ? |
bool Landed | True if the vessel has landed. |
string landedAt | ? |
double latitude | ? |
double launchTime | ? |
bool loaded | True if the vessel has loaded. |
Vector3 localCoM | This is used for persistence purposes. Use findLocalCenterOfMass() if you just want the center of mass. |
double longitude | ? |
double mach | ? |
double missionTime | ? |
Vector3 MOI | ? |
double obt_speed | ? |
Vector3d obt_velocity | The orbital velocity vector of the vessel, relative to the reference body. |
FlightInputCallback OnAutopilotUpdate | ? |
FlightInputCallback OnFlyByWire | ? |
Callback OnJustAboutToBeDestroyed | ? |
FlightInputCallback OnPostAutopilotUpdate | ? |
FlightInputCallback OnPreAutopilotUpdate | ? |
OrbitDriver orbitDriver | ? |
OrbitRenderer orbitRenderer | ? |
OrbitTargeter orbitTargeter | ? |
bool packed | ? |
List〈Part〉 parts | ? |
PatchedConicRenderer patchedConicRenderer | ? |
PatchedConicSolver patchedConicSolver | ? |
Vector3d perturbation | ? |
double pqsAltitude | ? |
ProtoVessel protoVessel | ? |
Vector3 rb_velocity | The current velocity of the Unity physics rigidbody. |
uint referenceTransformId | ? |
Part rootPart | The root part of the vessel. |
Situations situation | ? |
double solarFlux | ? |
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) |
double speed | ? |
double speedOfSound | ? |
bool Splashed | ? |
Vector3d srf_velocity | The velocity vector of the vessel while in the atmosphere. (Prograde) |
Quaternion srfRelRotation | The Quaternion corresponding to the vessel's rotation, relative to the surface of reference body. |
double srfSpeed | ? |
State state | ? |
double staticPressurekPa | The current atmospheric pressure of this vessel. |
ITargetable targetObject | ? |
double terrainAltitude | The height of the terrain, relative to the center of the reference body. |
Vector3 terrainNormal | The vector perpendicular to the terrain. |
Vector3d upAxis | Vector corresponding to the vessel's up facing direction. |
double verticalSpeed | The vertical speed of the vessel, relative to the surface of the reference body. |
string vesselName | Name identifier of the vessel. |
VesselRanges vesselRanges | ? |
Transform vesselTransform | ? |
VesselType vesselType | ? |
Methods
The following are methods included in Vessel.
Signature | Description |
---|---|
constructor Vessel() | ? |
void AttachPatchedConicsSolver() | ? |
ProtoVessel BackupVessel() | ? |
void CalculatePhysicsStats() | ? |
void ChangeWorldVelocity(Vector3d velOffset) | change the worldspace velocity of this vessel |
bool checkLanded() | ? |
bool checkSplashed() | ? |
bool checkVisibility() | Returns true if this vessel is within the visible range of any commandable (focusable) vessel, false otherwise. |
void ClearStaging() | ? |
bool ContainsCollider(Collider c) | ? |
void DespawnCrew() | ? |
void DestroyVesselComponents() | ? |
void DetachPatchedConicsSolver() | ? |
void Die() | ? |
void FallBackReferenceTransform() | ? |
void FeedInputFeed() | ? |
VesselType FindDefaultVesselType() | ? |
Vector3 findLocalCenterOfMass() | Finds the local center of mass recursively from the given ship part. |
Vector3 findLocalCenterOfPressure() | ? |
Vector3 findLocalMOI() | ? |
Vector3 findLocalMOI(Vector3 worldCoM) | ? |
List〈T〉 FindPartModulesImplementing〈T〉() | ? |
Vector3 findWorldCenterOfMass() | Finds the world center of mass recursively from the given ship part. |
List〈Part〉 GetActiveParts() | ? |
ActiveResource GetActiveResource(PartResourceDefinition def) | ? |
List〈ActiveResource〉 GetActiveResources() | ? |
int GetCrewCapacity() | ? |
int GetCrewCount() | ? |
Vector3 GetFwdVector() | ? |
float GetHeightFromSurface() | ? |
float GetHeightFromTerrain() | The vessel's altitude above the reference body's terrain, not including liquid bodies. |
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 |
Transform GetTransform() | ? |
Vessel GetVessel() | ? |
List〈ProtoCrewMember〉 GetVesselCrew() | Returns a list of ProtoCrewMembers corresponding to each kerbal on board. ProtoCrewMember contains many fields relating to the kerbals stats such as name, courage, etc. |
Vector3d GetWorldPos3D() | Get a double precision vector for the vessel's worldspace position (for when transform.position isn't accurate enough) |
void GoOffRails() | puts the ship back into a simulated orbit and reenables physics |
void GoOnRails() | disables physics and puts the ship into a propagated orbit |
bool HasControlSources() | ? |
bool Initialize(bool fromShipAssembly) | Initialize is used in cases where the Vessel component is added to a ship that already exists. |
ClearToSaveStatus IsClearToSave() | ? |
void Load() | ? Has attribute [ContextMenu("Load")] |
void MakeActive() | ? |
void MakeInactive() | ? |
void MurderCrew() | ? |
void OnDestroy() | ? |
void OnLoadFlightState(Dictionary〈string, KSPParseable〉 dataPool) | ? |
void OnSaveFlightState(Dictionary〈string, KSPParseable〉 dataPool) | ? |
double PQSAltitude() | ? |
void printCollisions() | ? Has attribute [ContextMenu("Print All Collisions")] |
void printGroundContacts() | ? Has attribute [ContextMenu("Print Ground Contacts")] |
void RenameVessel() | ? Has attribute [ContextMenu("Rename Vessel")] |
void ResetCollisionIgnores() | ? Has attribute [ContextMenu("Reset Collision Ignores")] |
void ResumeStaging() | ? |
void ResumeTarget() | ? |
double RevealAltitude() | ? |
float RevealMass() | ? |
string RevealName() | ? |
string RevealSituationString() | ? |
double RevealSpeed() | ? |
string RevealType() | ? |
void SetActiveInternalPart() | ? |
void SetActiveInternalPart(List〈Part〉 visibleParts) | ? |
void SetActiveInternalPart(Part visiblePart) | ? |
void SetPosition(Vector3 position) | Sets the worldspace position of this vessel, and all its parts |
void SetPosition(Vector3 position,bool usePristineCoords) | ? |
void SetReferenceTransform(Part p) | ? |
void SetRotation(Quaternion rotation) | Sets the worldspace rotation of this vessel, and all its parts |
void SetWorldVelocity(Vector3d vel) | set the absolute world velocity of this vessel |
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. |
void Translate(Vector3 offset) | ? |
void Unload() | ? Has attribute [ContextMenu("Unload")] |
static string AutoRename(Vessel v,string baseName) | ? |
static string GetLandedAtString(string landedAt) | ? |
static string GetMETString(Vessel v) | ? |
static string GetSituationString(Vessel v) | ? |
static bool IsValidVesselName(string name) | ? |
Enumerations
The following is a list of enumerations in Vessel.
Name | Values |
---|---|
Situations | LANDED SPLASHED PRELAUNCH FLYING SUB_ORBITAL ORBITING ESCAPING DOCKED |
State | INACTIVE ACTIVE DEAD |
Other API
Vessel also contains the following, not included above.
... public Part this[int index] { get; } public Part this[uint flightID] { get; } public class ActiveResource { public double amount; public PartResourceDefinition info; public double maxAmount; public List<Part> parts; public ActiveResource(PartResourceDefinition def); } ...