Contracts

class SpaceCenter.ContractManager

Contracts manager. Obtained by calling SpaceCenter.contract_manager.

types: Set

A list of all contract types.

Attribute:

Read-only, cannot be set

Return type:

Set

all_contracts: List

A list of all contracts.

Attribute:

Read-only, cannot be set

Return type:

List

active_contracts: List

A list of all active contracts.

Attribute:

Read-only, cannot be set

Return type:

List

offered_contracts: List

A list of all offered, but unaccepted, contracts.

Attribute:

Read-only, cannot be set

Return type:

List

completed_contracts: List

A list of all completed contracts.

Attribute:

Read-only, cannot be set

Return type:

List

failed_contracts: List

A list of all failed contracts.

Attribute:

Read-only, cannot be set

Return type:

List

class SpaceCenter.Contract

A contract. Can be accessed using SpaceCenter.contract_manager.

type: string

Type of the contract.

Attribute:

Read-only, cannot be set

Return type:

string

title: string

Title of the contract.

Attribute:

Read-only, cannot be set

Return type:

string

description: string

Description of the contract.

Attribute:

Read-only, cannot be set

Return type:

string

notes: string

Notes for the contract.

Attribute:

Read-only, cannot be set

Return type:

string

synopsis: string

Synopsis for the contract.

Attribute:

Read-only, cannot be set

Return type:

string

keywords: List

Keywords for the contract.

Attribute:

Read-only, cannot be set

Return type:

List

state: SpaceCenter.ContractState

State of the contract.

Attribute:

Read-only, cannot be set

Return type:

SpaceCenter.ContractState

seen: boolean

Whether the contract has been seen.

Attribute:

Read-only, cannot be set

Return type:

boolean

read: boolean

Whether the contract has been read.

Attribute:

Read-only, cannot be set

Return type:

boolean

active: boolean

Whether the contract is active.

Attribute:

Read-only, cannot be set

Return type:

boolean

failed: boolean

Whether the contract has been failed.

Attribute:

Read-only, cannot be set

Return type:

boolean

can_be_canceled: boolean

Whether the contract can be canceled.

Attribute:

Read-only, cannot be set

Return type:

boolean

can_be_declined: boolean

Whether the contract can be declined.

Attribute:

Read-only, cannot be set

Return type:

boolean

can_be_failed: boolean

Whether the contract can be failed.

Attribute:

Read-only, cannot be set

Return type:

boolean

accept()

Accept an offered contract.

cancel()

Cancel an active contract.

decline()

Decline an offered contract.

funds_advance: number

Funds received when accepting the contract.

Attribute:

Read-only, cannot be set

Return type:

number

funds_completion: number

Funds received on completion of the contract.

Attribute:

Read-only, cannot be set

Return type:

number

funds_failure: number

Funds lost if the contract is failed.

Attribute:

Read-only, cannot be set

Return type:

number

reputation_completion: number

Reputation gained on completion of the contract.

Attribute:

Read-only, cannot be set

Return type:

number

reputation_failure: number

Reputation lost if the contract is failed.

Attribute:

Read-only, cannot be set

Return type:

number

science_completion: number

Science gained on completion of the contract.

Attribute:

Read-only, cannot be set

Return type:

number

parameters: List

Parameters for the contract.

Attribute:

Read-only, cannot be set

Return type:

List

class SpaceCenter.ContractState

The state of a contract. See SpaceCenter.Contract.state.

active

The contract is active.

canceled

The contract has been canceled.

completed

The contract has been completed.

deadline_expired

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.

offer_expired

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

withdrawn

The contract has been withdrawn.

class SpaceCenter.ContractParameter

A contract parameter. See SpaceCenter.Contract.parameters.

title: string

Title of the parameter.

Attribute:

Read-only, cannot be set

Return type:

string

notes: string

Notes for the parameter.

Attribute:

Read-only, cannot be set

Return type:

string

children: List

Child contract parameters.

Attribute:

Read-only, cannot be set

Return type:

List

completed: boolean

Whether the parameter has been completed.

Attribute:

Read-only, cannot be set

Return type:

boolean

failed: boolean

Whether the parameter has been failed.

Attribute:

Read-only, cannot be set

Return type:

boolean

optional: boolean

Whether the contract parameter is optional.

Attribute:

Read-only, cannot be set

Return type:

boolean

funds_completion: number

Funds received on completion of the contract parameter.

Attribute:

Read-only, cannot be set

Return type:

number

funds_failure: number

Funds lost if the contract parameter is failed.

Attribute:

Read-only, cannot be set

Return type:

number

reputation_completion: number

Reputation gained on completion of the contract parameter.

Attribute:

Read-only, cannot be set

Return type:

number

reputation_failure: number

Reputation lost if the contract parameter is failed.

Attribute:

Read-only, cannot be set

Return type:

number

science_completion: number

Science gained on completion of the contract parameter.

Attribute:

Read-only, cannot be set

Return type:

number