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
-
all_contracts:
List# A list of all contracts.
- Attribute:
Read-only, cannot be set
-
active_contracts:
List# A list of all active contracts.
- Attribute:
Read-only, cannot be set
-
offered_contracts:
List# A list of all offered, but unaccepted, contracts.
- Attribute:
Read-only, cannot be set
-
completed_contracts:
List# A list of all completed contracts.
- Attribute:
Read-only, cannot be set
-
failed_contracts:
List# A list of all failed contracts.
- Attribute:
Read-only, cannot be set
-
types:
- class SpaceCenter.Contract#
A contract. Can be accessed using
SpaceCenter.contract_manager.-
type:
string# Type of the contract.
- Attribute:
Read-only, cannot be set
-
title:
string# Title of the contract.
- Attribute:
Read-only, cannot be set
-
description:
string# Description of the contract.
- Attribute:
Read-only, cannot be set
-
notes:
string# Notes for the contract.
- Attribute:
Read-only, cannot be set
-
synopsis:
string# Synopsis for the contract.
- Attribute:
Read-only, cannot be set
-
keywords:
List# Keywords for the contract.
- Attribute:
Read-only, cannot be set
-
state:
SpaceCenter.ContractState# State of the contract.
- Attribute:
Read-only, cannot be set
-
seen:
boolean# Whether the contract has been seen.
- Attribute:
Read-only, cannot be set
-
read:
boolean# Whether the contract has been read.
- Attribute:
Read-only, cannot be set
-
active:
boolean# Whether the contract is active.
- Attribute:
Read-only, cannot be set
-
failed:
boolean# Whether the contract has been failed.
- Attribute:
Read-only, cannot be set
-
can_be_canceled:
boolean# Whether the contract can be canceled.
- Attribute:
Read-only, cannot be set
-
can_be_declined:
boolean# Whether the contract can be declined.
- Attribute:
Read-only, cannot be set
-
can_be_failed:
boolean# Whether the contract can be failed.
- Attribute:
Read-only, cannot be set
- 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
-
funds_completion:
number# Funds received on completion of the contract.
- Attribute:
Read-only, cannot be set
-
funds_failure:
number# Funds lost if the contract is failed.
- Attribute:
Read-only, cannot be set
-
reputation_completion:
number# Reputation gained on completion of the contract.
- Attribute:
Read-only, cannot be set
-
reputation_failure:
number# Reputation lost if the contract is failed.
- Attribute:
Read-only, cannot be set
-
science_completion:
number# Science gained on completion of the contract.
- Attribute:
Read-only, cannot be set
-
parameters:
List# Parameters for the contract.
- Attribute:
Read-only, cannot be set
-
date_accepted:
number# Universal time at which the contract was accepted, in seconds. Zero if the contract has not been accepted.
- Attribute:
Read-only, cannot be set
-
date_deadline:
number# Universal time by which the contract must be completed, in seconds. Zero if the contract has no deadline.
- Attribute:
Read-only, cannot be set
-
date_expire:
number# Universal time at which the contract offer expires, in seconds. Zero if the contract has no expiry date.
- Attribute:
Read-only, cannot be set
-
date_finished:
number# 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.
- Attribute:
Read-only, cannot be set
-
type:
- 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
-
notes:
string# Notes for the parameter.
- Attribute:
Read-only, cannot be set
-
children:
List# Child contract parameters.
- Attribute:
Read-only, cannot be set
-
completed:
boolean# Whether the parameter has been completed.
- Attribute:
Read-only, cannot be set
-
failed:
boolean# Whether the parameter has been failed.
- Attribute:
Read-only, cannot be set
-
optional:
boolean# Whether the contract parameter is optional.
- Attribute:
Read-only, cannot be set
-
funds_completion:
number# Funds received on completion of the contract parameter.
- Attribute:
Read-only, cannot be set
-
funds_failure:
number# Funds lost if the contract parameter is failed.
- Attribute:
Read-only, cannot be set
-
reputation_completion:
number# Reputation gained on completion of the contract parameter.
- Attribute:
Read-only, cannot be set
-
reputation_failure:
number# Reputation lost if the contract parameter is failed.
- Attribute:
Read-only, cannot be set
-
science_completion:
number# Science gained on completion of the contract parameter.
- Attribute:
Read-only, cannot be set
-
title: