Class SpaceSimulation
  
  
  
    - Namespace
 - KSP.Sim.impl
 
  - Assembly
 - Assembly-CSharp.dll
 
   
  
  
  
    public class SpaceSimulation : IViewActionQueue, IUpdate, IFixedUpdate, ILateUpdate, IPriorityOverride
   
  
    - Inheritance
 
    - 
      
      
SpaceSimulation
     
  
  
    - Implements
 
    - 
      
      
      
      
      
    
 
  
  
    - Inherited Members
 
    - 
    
    
    
    
    
    
    
  
 
  
    - Extension Methods
 
    - 
  
  
  
  
  
  
 
  Constructors
  
  
  SpaceSimulation(int, double, DynamicConfigurationDatabase, IScriptEnvironment)
  
  
  
  
  
    public SpaceSimulation(int maxPlayers, double universalTime, DynamicConfigurationDatabase dynamicConfigurationDatabase, IScriptEnvironment scriptEnvironment)
   
  Parameters
  
    maxPlayers int 
    
    universalTime double 
    
    dynamicConfigurationDatabase DynamicConfigurationDatabase 
    
    scriptEnvironment IScriptEnvironment 
    
  
  Fields
  
  IsEnabled
  
  
  
  
  
  Field Value
  
    - bool
 
    
  
  
  scriptEnvironment
  
  
  
  
  
    public IScriptEnvironment scriptEnvironment
   
  Field Value
  
    - IScriptEnvironment
 
    
  
  Properties
  
  
  IsCelestialBodyCollisionApproximationEnabled
  
  
  
  
  
    public bool IsCelestialBodyCollisionApproximationEnabled { get; set; }
   
  Property Value
  
    - bool
 
    
  
  
  
  Lua
  
  
  
  
  
    public SpaceSimulationLua Lua { get; }
   
  Property Value
  
    - SpaceSimulationLua
 
    
  
  
  
  Maneuvers
  
  
  
  
  
    public ManeuverProvider Maneuvers { get; }
   
  Property Value
  
    - ManeuverProvider
 
    
  
  
  
  MaxPlayers
  
  
  
  
  
    public int MaxPlayers { get; }
   
  Property Value
  
    - int
 
    
  
  
  
  ModelViewMap
  
  
  
  
  
    public IModelViewMap ModelViewMap { get; }
   
  Property Value
  
    - IModelViewMap
 
    
  
  
  
  ObjectIdManager
  
  
  
  
  
    public ObjectIdManager ObjectIdManager { get; }
   
  Property Value
  
    - ObjectIdManager
 
    
  
  
  
  UniverseModel
  
  
  
  
  
    public UniverseModel UniverseModel { get; }
   
  Property Value
  
    - UniverseModel
 
    
  
  
  
  UniverseView
  
  
  
  
  
    public UniverseView UniverseView { get; }
   
  Property Value
  
    - UniverseView
 
    
  
  Methods
  
  
  AddColonyComponentToSimObject(IGGuid)
  
  
  
  
  
    public void AddColonyComponentToSimObject(IGGuid targetObject)
   
  Parameters
  
    targetObject IGGuid 
    
  
  
  
  ClearViewActionQueue()
  
  
  
  
  
    public void ClearViewActionQueue()
   
  
  
  CreateCelestialBodySimObject(CelestialBodyDefinition, SerializedCelestialBody)
  
  
  
  
  
    public SimulationObjectModel CreateCelestialBodySimObject(CelestialBodyDefinition celestialBodyDefinition, SerializedCelestialBody celestialBody)
   
  Parameters
  
    celestialBodyDefinition CelestialBodyDefinition 
    
    celestialBody SerializedCelestialBody 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateCombinedVesselSimObject(VesselComponent, PartComponent, VesselComponent, PartComponent)
  
  
  
  
  
    public SimulationObjectModel CreateCombinedVesselSimObject(VesselComponent masterVessel, PartComponent masterAttachPart, VesselComponent otherVessel, PartComponent otherAttachPart)
   
  Parameters
  
    masterVessel VesselComponent 
    
    masterAttachPart PartComponent 
    
    otherVessel VesselComponent 
    
    otherAttachPart PartComponent 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateFlagSimObject(SerializedFlag, string, Action<SimulationObjectView>)
  
  
  
  
  
    public SimulationObjectModel CreateFlagSimObject(SerializedFlag flag, string viewPrefabAssetKey, Action<SimulationObjectView> viewCreatedCallback)
   
  Parameters
  
    flag SerializedFlag 
    
    viewPrefabAssetKey string 
    
    viewCreatedCallback Action<SimulationObjectView> 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateKerbalSimObject(SerializedAssembly, string, byte)
  
  
  
  
  
    public SimulationObjectModel CreateKerbalSimObject(SerializedAssembly kerbal, string ownerPlayerGuidString, byte ownerPlayerId)
   
  Parameters
  
    kerbal SerializedAssembly 
    
    ownerPlayerGuidString string 
    
    ownerPlayerId byte 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateVesselSimObject(SerializedAssembly, string, byte, byte)
  
  
  
  
  
    public SimulationObjectModel CreateVesselSimObject(SerializedAssembly vessel, string owningPlayerGuidString, byte owningPlayerId, byte authorityPlayerId)
   
  Parameters
  
    vessel SerializedAssembly 
    
    owningPlayerGuidString string 
    
    owningPlayerId byte 
    
    authorityPlayerId byte 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateVesselSimObjectInternal(SerializedAssembly, string, byte, byte, ulong, string)
  
  
  
  
  
    public SimulationObjectModel CreateVesselSimObjectInternal(SerializedAssembly vessel, string ownerPlayerGuidString, byte ownerPlayerId, byte authorityPlayerId, ulong vesselObjectId, string debuggingName)
   
  Parameters
  
    vessel SerializedAssembly 
    
    ownerPlayerGuidString string 
    
    ownerPlayerId byte 
    
    authorityPlayerId byte 
    
    vesselObjectId ulong 
    
    debuggingName string 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  CreateWaypointSimObject(WaypointComponentDefinition, CelestialBodyComponent, double, double, double)
  
  
  
  
  
    public SimulationObjectModel CreateWaypointSimObject(WaypointComponentDefinition waypointDefinition, CelestialBodyComponent body, double latitude, double longitude, double altitudeFromRadius)
   
  Parameters
  
    waypointDefinition WaypointComponentDefinition 
    
    body CelestialBodyComponent 
    
    latitude double 
    
    longitude double 
    
    altitudeFromRadius double 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  FindSimObject(IGGuid)
  
  
  
  
  
    public SimulationObjectModel FindSimObject(IGGuid globalId)
   
  Parameters
  
    globalId IGGuid 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  FindSimObjectByNameKey(string)
  
  
  
  
  
    public SimulationObjectModel FindSimObjectByNameKey(string globalNameKey)
   
  Parameters
  
    globalNameKey string 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  FlushViewActionQueue(IModelViewMap)
  
  
  
  
  
    public void FlushViewActionQueue(IModelViewMap modelViewMap)
   
  Parameters
  
    modelViewMap IModelViewMap 
    
  
  
  
  GetAllObjectsWithComponent<T>()
  
  
  
  
  
    public ICollection<string> GetAllObjectsWithComponent<T>() where T : ObjectComponent
   
  Returns
  
    - ICollection<string>
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetAllSimulationObjectsWithComponent<T>()
  
  
  
  
  
    public ICollection<SimulationObjectModel> GetAllSimulationObjectsWithComponent<T>() where T : ObjectComponent
   
  Returns
  
    - ICollection<SimulationObjectModel>
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetBodyNameKeys()
  
  
  
  
  
    public ICollection<string> GetBodyNameKeys()
   
  Returns
  
    - ICollection<string>
 
    
  
  
  
  GetBodyRelativePosition(GeographicPositionState, out FramePositionState)
  
  
  
  
  
    public bool GetBodyRelativePosition(GeographicPositionState geographicPosition, out FramePositionState framePosition)
   
  Parameters
  
    geographicPosition GeographicPositionState 
    
    framePosition FramePositionState 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetColonyGuids()
  
  
  
  
  
    public ICollection<string> GetColonyGuids()
   
  Returns
  
    - ICollection<string>
 
    
  
  
  
  GetGeographicPosition(string, FramePositionState, out GeographicPositionState)
  
  
  
  
  
    public bool GetGeographicPosition(string cbNameKey, FramePositionState framePosition, out GeographicPositionState geographicPosition)
   
  Parameters
  
    cbNameKey string 
    
    framePosition FramePositionState 
    
    geographicPosition GeographicPositionState 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetPartGuids()
  
  
  
  
  
    public ICollection<string> GetPartGuids()
   
  Returns
  
    - ICollection<string>
 
    
  
  
  
  GetSimulationObjectComponent<T>(IGGuid)
  
  
  
  
  
    public T GetSimulationObjectComponent<T>(IGGuid guid) where T : ObjectComponent
   
  Parameters
  
    guid IGGuid 
    
  
  Returns
  
    - T
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  GetSurfaceObjectPosition(IGGuid, string, out FramePositionState)
  
  
  
  
  
    public bool GetSurfaceObjectPosition(IGGuid celestialBodySimObject, string surfaceObjectName, out FramePositionState framePosition)
   
  Parameters
  
    celestialBodySimObject IGGuid 
    
    surfaceObjectName string 
    
    framePosition FramePositionState 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetSurfaceObjectPosition(string, string, out FramePositionState)
  
  
  
  
  
    public bool GetSurfaceObjectPosition(string cbNameKey, string surfaceObjectName, out FramePositionState framePosition)
   
  Parameters
  
    cbNameKey string 
    
    surfaceObjectName string 
    
    framePosition FramePositionState 
    
  
  Returns
  
    - bool
 
    
  
  
  
  GetVesselGuids()
  
  
  
  
  
    public ICollection<string> GetVesselGuids()
   
  Returns
  
    - ICollection<string>
 
    
  
  
  
  IsCelestialBodyCollisionApproximation(ITransformModel, out CelestialBodyComponent)
  
  
  
  
  
    public bool IsCelestialBodyCollisionApproximation(ITransformModel transform, out CelestialBodyComponent collidingBody)
   
  Parameters
  
    transform ITransformModel 
    
    collidingBody CelestialBodyComponent 
    
  
  Returns
  
    - bool
 
    
  
  
  
  IsViewObjectLoaded(SimulationObjectModel)
  
  
  
  
  
    public bool IsViewObjectLoaded(SimulationObjectModel simObject)
   
  Parameters
  
    simObject SimulationObjectModel 
    
  
  Returns
  
    - bool
 
    
  
  
  
  OnFixedUpdate(float)
  
  
  
  
  
    public void OnFixedUpdate(float deltaTime)
   
  Parameters
  
    deltaTime float 
    
  
  
  
  OnFixedUpdate(float, bool)
  
  
  
  
  
    public void OnFixedUpdate(float deltaTime, bool force)
   
  Parameters
  
    deltaTime float 
    
    force bool 
    
  
  
  
  ReplaceVesselSimObject(SerializedAssembly, bool, string, byte, byte, IGGuid)
  
  
  
  
  
    public SimulationObjectModel ReplaceVesselSimObject(SerializedAssembly vessel, bool preserveOrientation, string ownerPlayerGuidString, byte ownerPlayerId, byte authorityPlayerId, IGGuid targetVesselID)
   
  Parameters
  
    vessel SerializedAssembly 
    
    preserveOrientation bool 
    
    ownerPlayerGuidString string 
    
    ownerPlayerId byte 
    
    authorityPlayerId byte 
    
    targetVesselID IGGuid 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  SetOrphanedPartActiveVessel(PartComponent)
  
  
  
  
  
    public void SetOrphanedPartActiveVessel(PartComponent targetPart)
   
  Parameters
  
    targetPart PartComponent 
    
  
  
  
  SplitCombinedVesselSimObject(VesselComponent, IGGuid)
  
  
  
  
  
    public SimulationObjectModel SplitCombinedVesselSimObject(VesselComponent combinedVessel, IGGuid detachingPartId)
   
  Parameters
  
    combinedVessel VesselComponent 
    
    detachingPartId IGGuid 
    
  
  Returns
  
    - SimulationObjectModel
 
    
  
  
  
  SubmitViewAction(IViewAction)
  
  
  
  
  
    public void SubmitViewAction(IViewAction action)
   
  Parameters
  
    action IViewAction 
    
  
  
  
  SubmitViewActions(IEnumerable<IViewAction>)
  
  
  
  
  
    public void SubmitViewActions(IEnumerable<IViewAction> actions)
   
  Parameters
  
    actions IEnumerable<IViewAction> 
    
  
  
  
  SyncToView(UniverseView)
  
  
  
  
  
    public void SyncToView(UniverseView view)
   
  Parameters
  
    view UniverseView 
    
  
  
  
  TryGetViewObject(SimulationObjectModel, out SimulationObjectView)
  
  
  
  
  
    public bool TryGetViewObject(SimulationObjectModel simObject, out SimulationObjectView viewObject)
   
  Parameters
  
    simObject SimulationObjectModel 
    
    viewObject SimulationObjectView 
    
  
  Returns
  
    - bool
 
    
  
  
  
  TryGetViewObjectComponent<T>(SimulationObjectModel, out T)
  
  
  
  
  
    public bool TryGetViewObjectComponent<T>(SimulationObjectModel simObject, out T viewObjectComponent) where T : ViewObjectComponent
   
  Parameters
  
    simObject SimulationObjectModel 
    
    viewObjectComponent T 
    
  
  Returns
  
    - bool
 
    
  
  Type Parameters
  
    T 
    
  
  
  
  UnloadAll()