Method | Description | |
---|---|---|
BodyOrbitsBody ( CelestialBody a, CelestialBody b ) : System.Boolean |
Returns true if body a orbits body b, either directly or through a grandparent chain.
|
|
DegreeFix ( double inAngle, double rangeStart ) : double |
Fix the strange too-large or too-small angle degrees that are sometimes returned by KSP, normalizing them into a constrained 360 degree range.
|
|
DegreesToRadians ( double degrees ) : double | ||
GetAssemblyFileVersion ( ) : string | ||
GetCurrentCamera ( ) : |
||
GetSkinCopy ( |
||
IsResource ( string insensitiveName, int &foundId ) : bool |
Determines if a given case insensitive name corresponds with a defined resource, and outputs the resource id for easy access from Squad's lists.
|
|
IsResource ( string insensitiveName, string &fixedName ) : bool |
Determines if a given case insensitive name corresponds with a defined resource, and outputs the case sensitive name for easy access from Squad's lists.
|
|
IsValidNumber ( double input ) : bool | ||
IsValidRotation ( |
||
IsValidVector ( kOS.Suffixed.Vector vector ) : bool | ||
IsValidVector ( Vector3 vector ) : bool | ||
IsValidVector ( UnityEngine.Vector3d vector ) : bool | ||
KOSExtensionGetObtVelocity ( this body, SharedObjects shared ) : UnityEngine.Vector3d |
Meant to be an override for stock KSP's CelestialBody.GetObtVelocity(), which (literally) always stack overflows because it's implemented as just infinite recursion without a base case.
|
|
KOSExtensionGetParentBody ( this body ) : CelestialBody |
Return the parent body of this body, just like KSP's built-in referenceBody, except that it exhibits more sane behavior in the case of the Sun where there is no parent. Default KSP's referenceBody will sometimes return null and sometimes return the Sun itself as the parent of the Sun. This makes it always return null as the parent of the Sun no matter what.
|
|
KOSType ( |
Given any CSharp object, return the string name of the type in a way that makes more sense to kOS users, using kOS names rather than Csharp names.
|
|
RadiansToDegrees ( double radians ) : double |
Method | Description | |
---|---|---|
GetActualAttachedNodes ( Part checkPart ) : IEnumerable |
Gets the *actual* list of attachnodes for a part. Use as a replacement for the KSP API property part.attachNodes because that doesn't seem to reliably include the surface attached attachnodes all of the time.
|
public static BodyOrbitsBody ( CelestialBody a, CelestialBody b ) : System.Boolean | ||
a | CelestialBody | Does this body |
b | CelestialBody | Orbit around this body |
return | System.Boolean |
public static DegreeFix ( double inAngle, double rangeStart ) : double | ||
inAngle | double | input angle in degrees |
rangeStart | double | /// Bottom of 360 degree range to normalize to. /// ( 0 means the range [0..360]), while -180 means [-180,180] ) /// |
return | double |
public static DegreesToRadians ( double degrees ) : double | ||
degrees | double | |
return | double |
public static GetAssemblyFileVersion ( ) : string | ||
return | string |
public static GetCurrentCamera ( ) : |
||
return |
public static GetSkinCopy ( |
||
toCopy | ||
return |
public static IsResource ( string insensitiveName, int &foundId ) : bool | ||
insensitiveName | string | case insensitive name |
foundId | int | output id of the found resource, zero if none found |
return | bool |
public static IsResource ( string insensitiveName, string &fixedName ) : bool | ||
insensitiveName | string | case insensitive name |
fixedName | string | output case sensitive name |
return | bool |
public static IsValidNumber ( double input ) : bool | ||
input | double | |
return | bool |
public static IsValidRotation ( |
||
quaternion | ||
return | bool |
public static IsValidVector ( kOS.Suffixed.Vector vector ) : bool | ||
vector | kOS.Suffixed.Vector | |
return | bool |
public static IsValidVector ( Vector3 vector ) : bool | ||
vector | Vector3 | |
return | bool |
public static IsValidVector ( UnityEngine.Vector3d vector ) : bool | ||
vector | UnityEngine.Vector3d | |
return | bool |
public static KOSExtensionGetObtVelocity ( this body, SharedObjects shared ) : UnityEngine.Vector3d | ||
body | this | The body to get the value for. (this will be hidden when this is an extension method of CelestialBody). |
shared | SharedObjects | Ubiquitous shared objects |
return | UnityEngine.Vector3d |
public static KOSExtensionGetParentBody ( this body ) : CelestialBody | ||
body | this | Body to get parent of (this will be hidden when called as an extension method) |
return | CelestialBody |
public static KOSType ( |
||
type | native c-sharp object | |
return | string |
public static RadiansToDegrees ( double radians ) : double | ||
radians | double | |
return | double |