Table of Contents

Class KerbalRosterManager

Namespace
KSP.Game
Assembly
Assembly-CSharp.dll
public class KerbalRosterManager : IUpdate
Inheritance
KerbalRosterManager
Implements
Inherited Members
Extension Methods

Constructors

KerbalRosterManager()

public KerbalRosterManager()

Fields

KERBAL_ROSTER_GLOBAL_SETTINGS

public static KerbalRosterGlobalSettings KERBAL_ROSTER_GLOBAL_SETTINGS

Field Value

KerbalRosterGlobalSettings

Properties

Assets

public AssetProvider Assets { get; }

Property Value

AssetProvider

Game

public GameInstance Game { get; }

Property Value

GameInstance

IsKerbalAssemblyTemplateInitialized

public bool IsKerbalAssemblyTemplateInitialized { get; }

Property Value

bool

KSCGuid

public IGGuid KSCGuid { get; }

Property Value

IGGuid

KerbalAssemblyTemplate

public SerializedAssembly KerbalAssemblyTemplate { get; }

Property Value

SerializedAssembly

KerbalIVAMass

public double KerbalIVAMass { get; }

Property Value

double

TotalKerbalSpawnCount

public uint TotalKerbalSpawnCount { get; }

Property Value

uint

VarietySystem

public KerbalVarietySystem VarietySystem { get; }

Property Value

KerbalVarietySystem

Methods

AddKerbalsfromJson(string, string)

public KerbalInfo AddKerbalsfromJson(string data, string playerGuidString)

Parameters

data string
playerGuidString string

Returns

KerbalInfo

CreateKerbal(CustomKerbalHandlingOptions)

public KerbalInfo CreateKerbal(KerbalRosterManager.CustomKerbalHandlingOptions customKerbalOptions = null)

Parameters

customKerbalOptions KerbalRosterManager.CustomKerbalHandlingOptions

Returns

KerbalInfo

CreateKerbal(double, CustomKerbalHandlingOptions)

public KerbalInfo CreateKerbal(double enrollmentUT, KerbalRosterManager.CustomKerbalHandlingOptions customKerbalOptions = null)

Parameters

enrollmentUT double
customKerbalOptions KerbalRosterManager.CustomKerbalHandlingOptions

Returns

KerbalInfo

CreateKerbal(double, string, string, CustomKerbalHandlingOptions)

public KerbalInfo CreateKerbal(double enrollmentUT, string firstNameOrKey, string playerGuidString, KerbalRosterManager.CustomKerbalHandlingOptions customKerbalOptions = null)

Parameters

enrollmentUT double
firstNameOrKey string
playerGuidString string
customKerbalOptions KerbalRosterManager.CustomKerbalHandlingOptions

Returns

KerbalInfo

CreateKerbalByName(double, string)

public KerbalInfo CreateKerbalByName(double enrollmentUT, string firstNameOrKey)

Parameters

enrollmentUT double
firstNameOrKey string

Returns

KerbalInfo

CreateKerbalByName(string)

public KerbalInfo CreateKerbalByName(string firstNameOrKey)

Parameters

firstNameOrKey string

Returns

KerbalInfo

CreateKerbalFromNetwork(IGGuid, SerializedKerbalInfo)

public KerbalInfo CreateKerbalFromNetwork(IGGuid kerbalInfoID, SerializedKerbalInfo serializedKerbalInfo)

Parameters

kerbalInfoID IGGuid
serializedKerbalInfo SerializedKerbalInfo

Returns

KerbalInfo

DeserializeAndAddKerbal(string)

public KerbalInfo DeserializeAndAddKerbal(string jsonString)

Parameters

jsonString string

Returns

KerbalInfo

DestroyKerbal(IGGuid)

public bool DestroyKerbal(IGGuid kerbalId)

Parameters

kerbalId IGGuid

Returns

bool

FindCustomKerbalByKey(string)

public KerbalInfo FindCustomKerbalByKey(string customNameKey)

Parameters

customNameKey string

Returns

KerbalInfo

GetAllKerbals()

public List<KerbalInfo> GetAllKerbals()

Returns

List<KerbalInfo>

GetAllKerbalsInAssembly(IGGuid, IObjectAssembly)

public List<KerbalInfo> GetAllKerbalsInAssembly(IGGuid simObjectId, IObjectAssembly assembly)

Parameters

simObjectId IGGuid
assembly IObjectAssembly

Returns

List<KerbalInfo>

GetAllKerbalsInAssemblyPart(IGGuid, IObjectAssemblyPart)

public List<KerbalInfo> GetAllKerbalsInAssemblyPart(IGGuid simObjectId, IObjectAssemblyPart assemblyPart)

Parameters

simObjectId IGGuid
assemblyPart IObjectAssemblyPart

Returns

List<KerbalInfo>

GetAllKerbalsInSimAndSubObject(IGGuid, IGGuid)

public List<KerbalInfo> GetAllKerbalsInSimAndSubObject(IGGuid simObjectId, IGGuid secondaryId)

Parameters

simObjectId IGGuid
secondaryId IGGuid

Returns

List<KerbalInfo>

GetAllKerbalsInSimObject(IGGuid)

public List<KerbalInfo> GetAllKerbalsInSimObject(IGGuid simObjectId)

Parameters

simObjectId IGGuid

Returns

List<KerbalInfo>

GetAllKerbalsInVessel(IGGuid)

public List<KerbalInfo> GetAllKerbalsInVessel(IGGuid vesselId)

Parameters

vesselId IGGuid

Returns

List<KerbalInfo>

GetCustomKerbalCount()

public int GetCustomKerbalCount()

Returns

int

GetKerbalsAsJson(string)

public string GetKerbalsAsJson(string playerGuidString)

Parameters

playerGuidString string

Returns

string

GetKerbalsByPlayerId(string)

public List<KerbalInfo> GetKerbalsByPlayerId(string playerGuidString)

Parameters

playerGuidString string

Returns

List<KerbalInfo>

Initialize()

public void Initialize()

IsSeatOccupied(IGGuid, IGGuid, int)

public bool IsSeatOccupied(IGGuid simObjectId, IGGuid secondaryId, int positionIndex)

Parameters

simObjectId IGGuid
secondaryId IGGuid
positionIndex int

Returns

bool

KerbalExists(string)

public bool KerbalExists(string fullname)

Parameters

fullname string

Returns

bool

Load(SerializedKerbalRoster)

public void Load(SerializedKerbalRoster rosterFromSave)

Parameters

rosterFromSave SerializedKerbalRoster

OnUpdate(float)

public void OnUpdate(float deltaTime)

Parameters

deltaTime float

Save(ref SerializedKerbalRoster)

public void Save(ref SerializedKerbalRoster newSaveData)

Parameters

newSaveData SerializedKerbalRoster

SetKerbalAssemblyTemplate(SerializedAssembly)

public void SetKerbalAssemblyTemplate(SerializedAssembly newKerbalAssemblyTemplate)

Parameters

newKerbalAssemblyTemplate SerializedAssembly

SetKerbalLocation(KerbalInfo, IGGuid, IGGuid, int)

public bool SetKerbalLocation(KerbalInfo kerbal, IGGuid simObjectId, IGGuid secondaryId, int positionIndex)

Parameters

kerbal KerbalInfo
simObjectId IGGuid
secondaryId IGGuid
positionIndex int

Returns

bool

SetKerbalLocation(KerbalInfo, SimulationObjectModel, int)

public bool SetKerbalLocation(KerbalInfo kerbal, SimulationObjectModel simObject, int positionIndex)

Parameters

kerbal KerbalInfo
simObject SimulationObjectModel
positionIndex int

Returns

bool

SetKerbalLocation(IGGuid, IGGuid, IGGuid, int)

public bool SetKerbalLocation(IGGuid kerbalId, IGGuid simObjectId, IGGuid secondaryId, int positionIndex)

Parameters

kerbalId IGGuid
simObjectId IGGuid
secondaryId IGGuid
positionIndex int

Returns

bool

Shutdown()

public void Shutdown()

SwapKerbalLocation(KerbalInfo, KerbalInfo)

public bool SwapKerbalLocation(KerbalInfo kerbalA, KerbalInfo kerbalB)

Parameters

kerbalA KerbalInfo
kerbalB KerbalInfo

Returns

bool

SwapKerbalLocation(IGGuid, IGGuid)

public bool SwapKerbalLocation(IGGuid kerbalAId, IGGuid kerbalBId)

Parameters

kerbalAId IGGuid
kerbalBId IGGuid

Returns

bool

TryGetKerbalByID(IGGuid, out KerbalInfo)

public bool TryGetKerbalByID(IGGuid id, out KerbalInfo info)

Parameters

id IGGuid
info KerbalInfo

Returns

bool

TryGetKerbalByName(string, out KerbalInfo)

public bool TryGetKerbalByName(string fullname, out KerbalInfo info)

Parameters

fullname string
info KerbalInfo

Returns

bool

TryGetKerbalBySimObjectAndIdx(IGGuid, int, out KerbalInfo)

public bool TryGetKerbalBySimObjectAndIdx(IGGuid simObjectId, int positionIndex, out KerbalInfo foundKerbal)

Parameters

simObjectId IGGuid
positionIndex int
foundKerbal KerbalInfo

Returns

bool

TryGetKerbalBySimObjectsecondaryIdAndIdx(IGGuid, IGGuid, int, out KerbalInfo)

public bool TryGetKerbalBySimObjectsecondaryIdAndIdx(IGGuid simObjectId, IGGuid secondaryId, int positionIndex, out KerbalInfo foundKerbal)

Parameters

simObjectId IGGuid
secondaryId IGGuid
positionIndex int
foundKerbal KerbalInfo

Returns

bool