Table of Contents

Class ObjectAssemblyBuilderFileIO

Namespace
KSP.OAB
Assembly
Assembly-CSharp.dll
public class ObjectAssemblyBuilderFileIO
Inheritance
ObjectAssemblyBuilderFileIO
Inherited Members
Extension Methods

Constructors

ObjectAssemblyBuilderFileIO(ObjectAssemblyBuilder, OABSessionInformation)

public ObjectAssemblyBuilderFileIO(ObjectAssemblyBuilder builder, OABSessionInformation stats)

Parameters

builder ObjectAssemblyBuilder
stats OABSessionInformation

Fields

OABGlobalConfig

public OABGlobalConfig OABGlobalConfig

Field Value

OABGlobalConfig

Properties

Clipboard

public static string Clipboard { get; set; }

Property Value

string

Game

public GameInstance Game { get; }

Property Value

GameInstance

Methods

ApplySnapshot(ObjectAssemblyPartTracker, OABHistoricalSnapshot, bool)

public void ApplySnapshot(ObjectAssemblyPartTracker partTracker, OABHistoricalSnapshot snapshot, bool sendMessages = false)

Parameters

partTracker ObjectAssemblyPartTracker
snapshot OABHistoricalSnapshot
sendMessages bool

AssemblyFromDefinitions(List<SerializedPart>, ObjectAssemblyPartTracker, AssemblyOABConfig, List<IObjectAssemblyAvailablePart>)

public IObjectAssembly AssemblyFromDefinitions(List<SerializedPart> partContainers, ObjectAssemblyPartTracker activePartTracker, AssemblyOABConfig config, List<IObjectAssemblyAvailablePart> permittedParts)

Parameters

partContainers List<SerializedPart>
activePartTracker ObjectAssemblyPartTracker
config AssemblyOABConfig
permittedParts List<IObjectAssemblyAvailablePart>

Returns

IObjectAssembly

AssemblyFromSerializable(SerializedAssembly, List<IObjectAssemblyAvailablePart>)

public IObjectAssembly AssemblyFromSerializable(SerializedAssembly sa, List<IObjectAssemblyAvailablePart> permittedParts)

Parameters

sa SerializedAssembly
permittedParts List<IObjectAssemblyAvailablePart>

Returns

IObjectAssembly

AssemblyFromString(string, List<IObjectAssemblyAvailablePart>)

public IObjectAssembly AssemblyFromString(string toLoad, List<IObjectAssemblyAvailablePart> permittedParts)

Parameters

toLoad string
permittedParts List<IObjectAssemblyAvailablePart>

Returns

IObjectAssembly

AssemblyToSerializable(IObjectAssembly)

public SerializedAssembly AssemblyToSerializable(IObjectAssembly assembly)

Parameters

assembly IObjectAssembly

Returns

SerializedAssembly

AssemblyToString(IObjectAssembly)

public string AssemblyToString(IObjectAssembly assembly)

Parameters

assembly IObjectAssembly

Returns

string

CollectAssemblyInfo(ShipInformation, IObjectAssemblyPart)

public AssemblyDefinition CollectAssemblyInfo(ShipInformation info, IObjectAssemblyPart anchor)

Parameters

info ShipInformation
anchor IObjectAssemblyPart

Returns

AssemblyDefinition

CollectParts(IObjectAssemblyPart, List<SerializedPart>)

public void CollectParts(IObjectAssemblyPart current, List<SerializedPart> outDefinitions)

Parameters

current IObjectAssemblyPart
outDefinitions List<SerializedPart>

CollectStagingInfo(IObjectAssembly)

public StagingState CollectStagingInfo(IObjectAssembly objectAssembly)

Parameters

objectAssembly IObjectAssembly

Returns

StagingState

ConstructConfig(IObjectAssemblyPart)

public AssemblyOABConfig ConstructConfig(IObjectAssemblyPart anchor)

Parameters

anchor IObjectAssemblyPart

Returns

AssemblyOABConfig

ConstructGlobalConfig()

public OABGlobalConfig ConstructGlobalConfig()

Returns

OABGlobalConfig

DeleteWorkspaceSave(string, DataLocation)

public void DeleteWorkspaceSave(string name, IOProvider.DataLocation dataLocation)

Parameters

name string
dataLocation IOProvider.DataLocation

GenerateSnapshot(ObjectAssemblyPartTracker, OABActionType)

public OABHistoricalSnapshot GenerateSnapshot(ObjectAssemblyPartTracker partTracker, OABActionType type = OABActionType.Other)

Parameters

partTracker ObjectAssemblyPartTracker
type OABActionType

Returns

OABHistoricalSnapshot

GenerateSnapshot(SerializedAssembly, Vector3, float)

public static OABHistoricalSnapshot GenerateSnapshot(SerializedAssembly assembly, Vector3 bounds, float mass)

Parameters

assembly SerializedAssembly
bounds Vector3
mass float

Returns

OABHistoricalSnapshot

GetOABWorkspaceFileNames(DataLocation)

public static IEnumerable<string> GetOABWorkspaceFileNames(IOProvider.DataLocation dataLocation)

Parameters

dataLocation IOProvider.DataLocation

Returns

IEnumerable<string>

LoadOABGlobalConfig()

public void LoadOABGlobalConfig()

LoadSerializedAssembly(SerializedAssembly)

public void LoadSerializedAssembly(SerializedAssembly serializedAssembly)

Parameters

serializedAssembly SerializedAssembly

LoadWorkspaceFromFile(ObjectAssemblyPartTracker, OABLoadDialogExistingSave)

public void LoadWorkspaceFromFile(ObjectAssemblyPartTracker partTracker, OABLoadDialogExistingSave selectedEntry)

Parameters

partTracker ObjectAssemblyPartTracker
selectedEntry OABLoadDialogExistingSave

PeekOABWorkspaceFromFile(string, DataLocation, out OABSavedWorkspaceMetaInfo)

public static bool PeekOABWorkspaceFromFile(string vesselFileName, IOProvider.DataLocation dataLocation, out OABSavedWorkspaceMetaInfo workspaceMetaInfo)

Parameters

vesselFileName string
dataLocation IOProvider.DataLocation
workspaceMetaInfo OABSavedWorkspaceMetaInfo

Returns

bool

PeekOABWorkspaceFromFile(string, out OABSavedWorkspaceMetaInfo)

public static bool PeekOABWorkspaceFromFile(string file, out OABSavedWorkspaceMetaInfo workspaceMetaInfo)

Parameters

file string
workspaceMetaInfo OABSavedWorkspaceMetaInfo

Returns

bool

SaveOABGlobalConfig()

public bool SaveOABGlobalConfig()

Returns

bool

SaveWorkspaceToFile(ObjectAssemblyPartTracker, string, string, string, string, bool, DataLocation)

public bool SaveWorkspaceToFile(ObjectAssemblyPartTracker partTracker, string filename, string workspaceName, string vehicleName, string description, bool isAutosave, IOProvider.DataLocation dataLocation)

Parameters

partTracker ObjectAssemblyPartTracker
filename string
workspaceName string
vehicleName string
description string
isAutosave bool
dataLocation IOProvider.DataLocation

Returns

bool