Contracts#

class ContractManager#

Contracts manager. Obtained by calling SpaceCenter.ContractManager.

ISet<string> Types { get; }#

A list of all contract types.

Game Scenes:

All

IList<Contract> AllContracts { get; }#

A list of all contracts.

Game Scenes:

All

IList<Contract> ActiveContracts { get; }#

A list of all active contracts.

Game Scenes:

All

IList<Contract> OfferedContracts { get; }#

A list of all offered, but unaccepted, contracts.

Game Scenes:

All

IList<Contract> CompletedContracts { get; }#

A list of all completed contracts.

Game Scenes:

All

IList<Contract> FailedContracts { get; }#

A list of all failed contracts.

Game Scenes:

All

class Contract#

A contract. Can be accessed using SpaceCenter.ContractManager.

string Type { get; }#

Type of the contract.

Game Scenes:

All

string Title { get; }#

Title of the contract.

Game Scenes:

All

string Description { get; }#

Description of the contract.

Game Scenes:

All

string Notes { get; }#

Notes for the contract.

Game Scenes:

All

string Synopsis { get; }#

Synopsis for the contract.

Game Scenes:

All

IList<string> Keywords { get; }#

Keywords for the contract.

Game Scenes:

All

ContractState State { get; }#

State of the contract.

Game Scenes:

All

bool Seen { get; }#

Whether the contract has been seen.

Game Scenes:

All

bool Read { get; }#

Whether the contract has been read.

Game Scenes:

All

bool Active { get; }#

Whether the contract is active.

Game Scenes:

All

bool Failed { get; }#

Whether the contract has been failed.

Game Scenes:

All

bool CanBeCanceled { get; }#

Whether the contract can be canceled.

Game Scenes:

All

bool CanBeDeclined { get; }#

Whether the contract can be declined.

Game Scenes:

All

bool CanBeFailed { get; }#

Whether the contract can be failed.

Game Scenes:

All

void Accept ()#

Accept an offered contract.

Game Scenes:

All

void Cancel ()#

Cancel an active contract.

Game Scenes:

All

void Decline ()#

Decline an offered contract.

Game Scenes:

All

double FundsAdvance { get; }#

Funds received when accepting the contract.

Game Scenes:

All

double FundsCompletion { get; }#

Funds received on completion of the contract.

Game Scenes:

All

double FundsFailure { get; }#

Funds lost if the contract is failed.

Game Scenes:

All

double ReputationCompletion { get; }#

Reputation gained on completion of the contract.

Game Scenes:

All

double ReputationFailure { get; }#

Reputation lost if the contract is failed.

Game Scenes:

All

double ScienceCompletion { get; }#

Science gained on completion of the contract.

Game Scenes:

All

IList<ContractParameter> Parameters { get; }#

Parameters for the contract.

Game Scenes:

All

double DateAccepted { get; }#

Universal time at which the contract was accepted, in seconds. Zero if the contract has not been accepted.

Game Scenes:

All

double DateDeadline { get; }#

Universal time by which the contract must be completed, in seconds. Zero if the contract has no deadline.

Game Scenes:

All

double DateExpire { get; }#

Universal time at which the contract offer expires, in seconds. Zero if the contract has no expiry date.

Game Scenes:

All

double DateFinished { get; }#

Universal time at which the contract was completed or failed, in seconds. Zero if the contract has not finished or KSP did not record a finish time.

Game Scenes:

All

enum ContractState#

The state of a contract. See Contract.State.

Active#

The contract is active.

Canceled#

The contract has been canceled.

Completed#

The contract has been completed.

DeadlineExpired#

The deadline for the contract has expired.

Declined#

The contract has been declined.

Failed#

The contract has been failed.

Generated#

The contract has been generated.

Offered#

The contract has been offered to the player.

OfferExpired#

The contract was offered to the player, but the offer expired.

Withdrawn#

The contract has been withdrawn.

class ContractParameter#

A contract parameter. See Contract.Parameters.

string Title { get; }#

Title of the parameter.

Game Scenes:

All

string Notes { get; }#

Notes for the parameter.

Game Scenes:

All

IList<ContractParameter> Children { get; }#

Child contract parameters.

Game Scenes:

All

bool Completed { get; }#

Whether the parameter has been completed.

Game Scenes:

All

bool Failed { get; }#

Whether the parameter has been failed.

Game Scenes:

All

bool Optional { get; }#

Whether the contract parameter is optional.

Game Scenes:

All

double FundsCompletion { get; }#

Funds received on completion of the contract parameter.

Game Scenes:

All

double FundsFailure { get; }#

Funds lost if the contract parameter is failed.

Game Scenes:

All

double ReputationCompletion { get; }#

Reputation gained on completion of the contract parameter.

Game Scenes:

All

double ReputationFailure { get; }#

Reputation lost if the contract parameter is failed.

Game Scenes:

All

double ScienceCompletion { get; }#

Science gained on completion of the contract parameter.

Game Scenes:

All