Contracts#
- class SpaceCenter.ContractManager()#
Contracts manager. Obtained by calling
SpaceCenter.getContractManager().- ContractManager.getTypes()#
A list of all contract types.
- Property:
Read-only, cannot be set
- Return type:
Setofstring
- ContractManager.getAllContracts()#
A list of all contracts.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.Contract
- ContractManager.getActiveContracts()#
A list of all active contracts.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.Contract
- ContractManager.getOfferedContracts()#
A list of all offered, but unaccepted, contracts.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.Contract
- ContractManager.getCompletedContracts()#
A list of all completed contracts.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.Contract
- ContractManager.getFailedContracts()#
A list of all failed contracts.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.Contract
- class SpaceCenter.Contract()#
A contract. Can be accessed using
SpaceCenter.getContractManager().- Contract.getType()#
Type of the contract.
- Property:
Read-only, cannot be set
- Return type:
string
- Contract.getTitle()#
Title of the contract.
- Property:
Read-only, cannot be set
- Return type:
string
- Contract.getDescription()#
Description of the contract.
- Property:
Read-only, cannot be set
- Return type:
string
- Contract.getNotes()#
Notes for the contract.
- Property:
Read-only, cannot be set
- Return type:
string
- Contract.getSynopsis()#
Synopsis for the contract.
- Property:
Read-only, cannot be set
- Return type:
string
- Contract.getKeywords()#
Keywords for the contract.
- Property:
Read-only, cannot be set
- Return type:
Arrayofstring
- Contract.getState()#
State of the contract.
- Property:
Read-only, cannot be set
- Return type:
- Contract.getSeen()#
Whether the contract has been seen.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getRead()#
Whether the contract has been read.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getActive()#
Whether the contract is active.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getFailed()#
Whether the contract has been failed.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getCanBeCanceled()#
Whether the contract can be canceled.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getCanBeDeclined()#
Whether the contract can be declined.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.getCanBeFailed()#
Whether the contract can be failed.
- Property:
Read-only, cannot be set
- Return type:
boolean
- Contract.accept()#
Accept an offered contract.
- Contract.cancel()#
Cancel an active contract.
- Contract.decline()#
Decline an offered contract.
- Contract.getFundsAdvance()#
Funds received when accepting the contract.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getFundsCompletion()#
Funds received on completion of the contract.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getFundsFailure()#
Funds lost if the contract is failed.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getReputationCompletion()#
Reputation gained on completion of the contract.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getReputationFailure()#
Reputation lost if the contract is failed.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getScienceCompletion()#
Science gained on completion of the contract.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getParameters()#
Parameters for the contract.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.ContractParameter
- Contract.getDateAccepted()#
Universal time at which the contract was accepted, in seconds. Zero if the contract has not been accepted.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getDateDeadline()#
Universal time by which the contract must be completed, in seconds. Zero if the contract has no deadline.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getDateExpire()#
Universal time at which the contract offer expires, in seconds. Zero if the contract has no expiry date.
- Property:
Read-only, cannot be set
- Return type:
number
- Contract.getDateFinished()#
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.
- Property:
Read-only, cannot be set
- Return type:
number
- class SpaceCenter.ContractState()#
The state of a contract. See
SpaceCenter.Contract.getState().- ContractState.active#
The contract is active.
- ContractState.canceled#
The contract has been canceled.
- ContractState.completed#
The contract has been completed.
- ContractState.deadlineExpired#
The deadline for the contract has expired.
- ContractState.declined#
The contract has been declined.
- ContractState.failed#
The contract has been failed.
- ContractState.generated#
The contract has been generated.
- ContractState.offered#
The contract has been offered to the player.
- ContractState.offerExpired#
The contract was offered to the player, but the offer expired.
- ContractState.withdrawn#
The contract has been withdrawn.
- class SpaceCenter.ContractParameter()#
A contract parameter. See
SpaceCenter.Contract.getParameters().- ContractParameter.getTitle()#
Title of the parameter.
- Property:
Read-only, cannot be set
- Return type:
string
- ContractParameter.getNotes()#
Notes for the parameter.
- Property:
Read-only, cannot be set
- Return type:
string
- ContractParameter.getChildren()#
Child contract parameters.
- Property:
Read-only, cannot be set
- Return type:
ArrayofSpaceCenter.ContractParameter
- ContractParameter.getCompleted()#
Whether the parameter has been completed.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ContractParameter.getFailed()#
Whether the parameter has been failed.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ContractParameter.getOptional()#
Whether the contract parameter is optional.
- Property:
Read-only, cannot be set
- Return type:
boolean
- ContractParameter.getFundsCompletion()#
Funds received on completion of the contract parameter.
- Property:
Read-only, cannot be set
- Return type:
number
- ContractParameter.getFundsFailure()#
Funds lost if the contract parameter is failed.
- Property:
Read-only, cannot be set
- Return type:
number
- ContractParameter.getReputationCompletion()#
Reputation gained on completion of the contract parameter.
- Property:
Read-only, cannot be set
- Return type:
number
- ContractParameter.getReputationFailure()#
Reputation lost if the contract parameter is failed.
- Property:
Read-only, cannot be set
- Return type:
number
- ContractParameter.getScienceCompletion()#
Science gained on completion of the contract parameter.
- Property:
Read-only, cannot be set
- Return type:
number