Table of Contents

Class ObjectAssemblyBuilder

Namespace
KSP.OAB
Assembly
Assembly-CSharp.dll
public class ObjectAssemblyBuilder : KerbalMonoBehaviour, IUpdate, ILateUpdate
Inheritance
ObjectAssemblyBuilder
Implements
Derived
Inherited Members
Extension Methods

Constructors

ObjectAssemblyBuilder()

public ObjectAssemblyBuilder()

Fields

BuilderAssets

public ObjectAssemblyAssets BuilderAssets

Field Value

ObjectAssemblyAssets

CurrentOrientation

public OABOrientation CurrentOrientation

Field Value

OABOrientation

ProceduralFairingManager

public ProceduralFairingManager ProceduralFairingManager

Field Value

ProceduralFairingManager

ProceduralPartsManager

public ProceduralPartsManager ProceduralPartsManager

Field Value

ProceduralPartsManager

_activeHistorian

protected ObjectyAssemblyBuilderHistorian _activeHistorian

Field Value

ObjectyAssemblyBuilderHistorian

_activePartTracker

protected ObjectAssemblyPartTracker _activePartTracker

Field Value

ObjectAssemblyPartTracker

_relationships

public List<IObjectAssemblyRelationship> _relationships

Field Value

List<IObjectAssemblyRelationship>

_resourceCosting

protected ObjectAssemblyBuilderResourceCosting _resourceCosting

Field Value

ObjectAssemblyBuilderResourceCosting

_resourceProvider

protected IConstructionResourceProvider _resourceProvider

Field Value

IConstructionResourceProvider

currentTool

protected IObjectAssemblyTool currentTool

Field Value

IObjectAssemblyTool

currentToolIsOneTimeUse

protected bool currentToolIsOneTimeUse

Field Value

bool

eventsBuilder

public ObjectAssemblyBuilderEvents eventsBuilder

Field Value

ObjectAssemblyBuilderEvents

eventsUI

public ObjectAssemblyUIEvents eventsUI

Field Value

ObjectAssemblyUIEvents

previousTool

protected IObjectAssemblyTool previousTool

Field Value

IObjectAssemblyTool

utilFileIO

protected ObjectAssemblyBuilderFileIO utilFileIO

Field Value

ObjectAssemblyBuilderFileIO

utilInput

protected ObjectAssemblyInputHandler utilInput

Field Value

ObjectAssemblyInputHandler

utilLog

protected ObjectAssemblyBuilderLog utilLog

Field Value

ObjectAssemblyBuilderLog

utilShoppingCart

protected ObjectAssemblyShoppingCart utilShoppingCart

Field Value

ObjectAssemblyShoppingCart

watcherChecklist

protected ObjectAssemblyChecklist watcherChecklist

Field Value

ObjectAssemblyChecklist

watcherStats

protected OABSessionInformation watcherStats

Field Value

OABSessionInformation

Properties

ActiveBuilderVariant

public OABVariant ActiveBuilderVariant { get; }

Property Value

OABVariant

ActiveConfig

public OABConfig ActiveConfig { get; }

Property Value

OABConfig

ActivePartTracker

public ObjectAssemblyPartTracker ActivePartTracker { get; }

Property Value

ObjectAssemblyPartTracker

CameraManager

public ObjectAssemblyCameraManager CameraManager { get; }

Property Value

ObjectAssemblyCameraManager

CelestialBodyDependencyName

public string CelestialBodyDependencyName { get; }

Property Value

string

Checklist

public IObjectBuilderChecklist Checklist { get; }

Property Value

IObjectBuilderChecklist

ConstructionType

public OABConstructionType ConstructionType { get; }

Property Value

OABConstructionType

CurrentEnvironment

public IObjectAssemblyEnvironment CurrentEnvironment { get; }

Property Value

IObjectAssemblyEnvironment

CurrentSizeLimits

public IObjectAssemblyBuilderSizeLimits CurrentSizeLimits { get; }

Property Value

IObjectAssemblyBuilderSizeLimits

CurrentTool

public IObjectAssemblyTool CurrentTool { get; }

Property Value

IObjectAssemblyTool

DataContext

public DataContext DataContext { get; }

Property Value

DataContext

EnvironmentType

public OABEnvironmentType EnvironmentType { get; }

Property Value

OABEnvironmentType

EventsUI

public ObjectAssemblyUIEvents EventsUI { get; }

Property Value

ObjectAssemblyUIEvents

Historian

public ObjectyAssemblyBuilderHistorian Historian { get; }

Property Value

ObjectyAssemblyBuilderHistorian

InputHandler

public ObjectAssemblyInputHandler InputHandler { get; }

Property Value

ObjectAssemblyInputHandler

IsLoaded

public bool IsLoaded { get; }

Property Value

bool

IsSavingBackupWorkspace

public bool IsSavingBackupWorkspace { get; }

Property Value

bool

IsShuttingDown

public bool IsShuttingDown { get; }

Property Value

bool

OABHUD

public ObjectAssemblyBuilderHUD OABHUD { get; set; }

Property Value

ObjectAssemblyBuilderHUD

ResultAssemblyOutOfBounds

public bool ResultAssemblyOutOfBounds { get; }

Property Value

bool

ResultHasEnoughResourcesForLaunchAssembly

public bool ResultHasEnoughResourcesForLaunchAssembly { get; }

Property Value

bool

Stats

public OABSessionInformation Stats { get; }

Property Value

OABSessionInformation

UtilFileIO

public ObjectAssemblyBuilderFileIO UtilFileIO { get; }

Property Value

ObjectAssemblyBuilderFileIO

WorkspaceDefaultValue

public string WorkspaceDefaultValue { get; }

Property Value

string

WorkspaceDescriptionDefaultValue

public string WorkspaceDescriptionDefaultValue { get; }

Property Value

string

WorkspaceVehicleDefaultValue

public string WorkspaceVehicleDefaultValue { get; }

Property Value

string

Methods

AsyncLoadAllParts(Action)

public void AsyncLoadAllParts(Action callback)

Parameters

callback Action

Awake()

public void Awake()

CollectAllLoadedParts()

public List<ObjectAssemblyBuilder.RuntimeQAPartData> CollectAllLoadedParts()

Returns

List<ObjectAssemblyBuilder.RuntimeQAPartData>

Configure(OABConfig, IReadOnlyCollection<PartCore>, OABHistoricalSnapshot, Action)

public void Configure(OABConfig config, IReadOnlyCollection<PartCore> allPossibleParts, OABHistoricalSnapshot startSnapshot = null, Action onLaunchCallback = null)

Parameters

config OABConfig
allPossibleParts IReadOnlyCollection<PartCore>
startSnapshot OABHistoricalSnapshot
onLaunchCallback Action

CreateBasicShip(Action)

public IEnumerator CreateBasicShip(Action onComplete = null)

Parameters

onComplete Action

Returns

IEnumerator

CreateClasses()

protected void CreateClasses()

CreateObjects()

protected virtual void CreateObjects()

GetAvailableResourceAmount(ResourceDefinitionID)

public double GetAvailableResourceAmount(ResourceDefinitionID resourceId)

Parameters

resourceId ResourceDefinitionID

Returns

double

GetCurrentToolType()

public OABToolType GetCurrentToolType()

Returns

OABToolType

HasEnoughResourcesForLaunchAssembly()

public bool HasEnoughResourcesForLaunchAssembly()

Returns

bool

HasEnoughResourcesToLoadAssembly(SerializedAssembly)

public bool HasEnoughResourcesToLoadAssembly(SerializedAssembly serializedAssembly)

Parameters

serializedAssembly SerializedAssembly

Returns

bool

Initialize()

public virtual void Initialize()

InitializeClasses()

protected virtual void InitializeClasses()

InitializeObjects()

protected virtual void InitializeObjects()

InitializeTool()

protected virtual void InitializeTool()

IsAssemblyOutOfBounds(IObjectAssembly)

public bool IsAssemblyOutOfBounds(IObjectAssembly assembly)

Parameters

assembly IObjectAssembly

Returns

bool

LaunchShip(Action)

public void LaunchShip(Action onLaunch = null)

Parameters

onLaunch Action

LoadFromFile(TextAsset, OABOrientation, BuilderSymmetryMode, string, Action)

public IEnumerator LoadFromFile(TextAsset toLoad, OABOrientation orientation = OABOrientation.VAB, BuilderSymmetryMode symmetryMode = BuilderSymmetryMode.X1, string launch = null, Action onComplete = null)

Parameters

toLoad TextAsset
orientation OABOrientation
symmetryMode BuilderSymmetryMode
launch string
onComplete Action

Returns

IEnumerator

OnDestroy()

public void OnDestroy()

OnLateUpdate()

public void OnLateUpdate()

OnOABConfigChanged()

public void OnOABConfigChanged()

OnUpdate(float)

public void OnUpdate(float deltaTime)

Parameters

deltaTime float

ResetCamera()

protected void ResetCamera()

RevertTool()

public void RevertTool()

SelectPartRandomly(PartCategories, IReadOnlyDictionary<PartCategories, List<IObjectAssemblyAvailablePart>>)

public IObjectAssemblyAvailablePart SelectPartRandomly(PartCategories category, IReadOnlyDictionary<PartCategories, List<IObjectAssemblyAvailablePart>> partLookup)

Parameters

category PartCategories
partLookup IReadOnlyDictionary<PartCategories, List<IObjectAssemblyAvailablePart>>

Returns

IObjectAssemblyAvailablePart

SetCurrentTool(IObjectAssemblyTool, bool)

public void SetCurrentTool(IObjectAssemblyTool toolToUse, bool oneTimeUse)

Parameters

toolToUse IObjectAssemblyTool
oneTimeUse bool

SetSavingBackupVessel(bool)

public void SetSavingBackupVessel(bool bValue)

Parameters

bValue bool

Shutdown()

public void Shutdown()

StackAttachSpecificParts(IObjectAssemblyPart, IObjectAssemblyPart, bool)

public void StackAttachSpecificParts(IObjectAssemblyPart top, IObjectAssemblyPart bottom, bool topIsParent)

Parameters

top IObjectAssemblyPart
bottom IObjectAssemblyPart
topIsParent bool

Start()

public void Start()

SurfaceAttachSpecificParts(IObjectAssemblyPart, IObjectAssemblyPart, Vector3, Vector3)

public void SurfaceAttachSpecificParts(IObjectAssemblyPart parentPart, IObjectAssemblyPart surfacePart, Vector3 localOffset, Vector3 rotation)

Parameters

parentPart IObjectAssemblyPart
surfacePart IObjectAssemblyPart
localOffset Vector3
rotation Vector3

ToggleCameraTargetLock()

protected void ToggleCameraTargetLock()

ToggleRenderDebugSizeLimits()

public static void ToggleRenderDebugSizeLimits()

TryDeductResourceCostAtLaunch()

public bool TryDeductResourceCostAtLaunch()

Returns

bool