.. default-domain:: java .. highlight:: java .. package:: krpc.client.services.SpaceCenter Contracts ========= .. type:: public class ContractManager Contracts manager. Obtained by calling :meth:`getContractManager()`. .. method:: java.util.Set getTypes() A list of all contract types. .. method:: java.util.List getAllContracts() A list of all contracts. .. method:: java.util.List getActiveContracts() A list of all active contracts. .. method:: java.util.List getOfferedContracts() A list of all offered, but unaccepted, contracts. .. method:: java.util.List getCompletedContracts() A list of all completed contracts. .. method:: java.util.List getFailedContracts() A list of all failed contracts. .. type:: public class Contract A contract. Can be accessed using :meth:`getContractManager()`. .. method:: String getType() Type of the contract. .. method:: String getTitle() Title of the contract. .. method:: String getDescription() Description of the contract. .. method:: String getNotes() Notes for the contract. .. method:: String getSynopsis() Synopsis for the contract. .. method:: java.util.List getKeywords() Keywords for the contract. .. method:: ContractState getState() State of the contract. .. method:: boolean getSeen() Whether the contract has been seen. .. method:: boolean getRead() Whether the contract has been read. .. method:: boolean getActive() Whether the contract is active. .. method:: boolean getFailed() Whether the contract has been failed. .. method:: boolean getCanBeCanceled() Whether the contract can be canceled. .. method:: boolean getCanBeDeclined() Whether the contract can be declined. .. method:: boolean getCanBeFailed() Whether the contract can be failed. .. method:: void accept() Accept an offered contract. .. method:: void cancel() Cancel an active contract. .. method:: void decline() Decline an offered contract. .. method:: double getFundsAdvance() Funds received when accepting the contract. .. method:: double getFundsCompletion() Funds received on completion of the contract. .. method:: double getFundsFailure() Funds lost if the contract is failed. .. method:: double getReputationCompletion() Reputation gained on completion of the contract. .. method:: double getReputationFailure() Reputation lost if the contract is failed. .. method:: double getScienceCompletion() Science gained on completion of the contract. .. method:: java.util.List getParameters() Parameters for the contract. .. type:: public enum ContractState The state of a contract. See :meth:`Contract.getState()`. .. field:: public ContractState ACTIVE The contract is active. .. field:: public ContractState CANCELED The contract has been canceled. .. field:: public ContractState COMPLETED The contract has been completed. .. field:: public ContractState DEADLINE_EXPIRED The deadline for the contract has expired. .. field:: public ContractState DECLINED The contract has been declined. .. field:: public ContractState FAILED The contract has been failed. .. field:: public ContractState GENERATED The contract has been generated. .. field:: public ContractState OFFERED The contract has been offered to the player. .. field:: public ContractState OFFER_EXPIRED The contract was offered to the player, but the offer expired. .. field:: public ContractState WITHDRAWN The contract has been withdrawn. .. type:: public class ContractParameter A contract parameter. See :meth:`Contract.getParameters()`. .. method:: String getTitle() Title of the parameter. .. method:: String getNotes() Notes for the parameter. .. method:: java.util.List getChildren() Child contract parameters. .. method:: boolean getCompleted() Whether the parameter has been completed. .. method:: boolean getFailed() Whether the parameter has been failed. .. method:: boolean getOptional() Whether the contract parameter is optional. .. method:: double getFundsCompletion() Funds received on completion of the contract parameter. .. method:: double getFundsFailure() Funds lost if the contract parameter is failed. .. method:: double getReputationCompletion() Reputation gained on completion of the contract parameter. .. method:: double getReputationFailure() Reputation lost if the contract parameter is failed. .. method:: double getScienceCompletion() Science gained on completion of the contract parameter.