C# Class kOS.Suffixed.ResourceTransferValue

Inheritance: Structure
显示文件 Open project: KSP-KOS/KOS Class Usage Examples

Public Methods

Method Description
ResourceTransferValue ( TransferManager transferManager, PartResourceDefinition resourceInfo, object transferTo, object transferFrom ) : System
ResourceTransferValue ( TransferManager transferManager, PartResourceDefinition resourceInfo, object transferTo, object transferFrom, double amount ) : System
ToString ( ) : string
Update ( double deltaTime ) : void

Private Methods

Method Description
AllPartsAreConnected ( IList fromParts, IList toParts ) : bool
CalculateAvailableResource ( IEnumerable fromParts ) : double
CalculateAvailableSpace ( IEnumerable parts ) : double
CalculateTransferGoal ( IEnumerable toParts ) : double
CanTransfer ( IEnumerable fromParts, IEnumerable toParts ) : bool

Tests to see if the transfer has reached its goal

DestinationReady ( IEnumerable toParts ) : bool
DetermineType ( object toTest ) : TransferPartType
DetermineTypes ( ) : void
GetParts ( TransferPartType type, object obj ) : IList
GetVesselId ( IList parts ) : Guid?

takes a list of parts and determines if they have a common vessel id

InitializeSuffixes ( ) : void
MarkFailed ( string message ) : void
MarkFinished ( ) : void
PullResources ( IList parts, double transferGoal, double deltaTime ) : double

Requests the resource from all parts in the collection

PutResources ( IList parts, double pulledAmount ) : void

Transfers resources into the specified parts

SourceReady ( IEnumerable fromParts ) : bool
StatusChangeMessage ( ) : string
WorkTransfer ( IList fromParts, IList toParts, double deltaTime ) : void

Method Details

ResourceTransferValue() public method

public ResourceTransferValue ( TransferManager transferManager, PartResourceDefinition resourceInfo, object transferTo, object transferFrom ) : System
transferManager kOS.Execution.TransferManager
resourceInfo PartResourceDefinition
transferTo object
transferFrom object
return System

ResourceTransferValue() public method

public ResourceTransferValue ( TransferManager transferManager, PartResourceDefinition resourceInfo, object transferTo, object transferFrom, double amount ) : System
transferManager kOS.Execution.TransferManager
resourceInfo PartResourceDefinition
transferTo object
transferFrom object
amount double
return System

ToString() public method

public ToString ( ) : string
return string

Update() public method

public Update ( double deltaTime ) : void
deltaTime double
return void