Contracts#

class ContractManager#

Contracts manager. Obtained by calling contract_manager().

std::set<std::string> types()#

A list of all contract types.

std::vector<Contract> all_contracts()#

A list of all contracts.

std::vector<Contract> active_contracts()#

A list of all active contracts.

std::vector<Contract> offered_contracts()#

A list of all offered, but unaccepted, contracts.

std::vector<Contract> completed_contracts()#

A list of all completed contracts.

std::vector<Contract> failed_contracts()#

A list of all failed contracts.

class Contract#

A contract. Can be accessed using contract_manager().

std::string type()#

Type of the contract.

std::string title()#

Title of the contract.

std::string description()#

Description of the contract.

std::string notes()#

Notes for the contract.

std::string synopsis()#

Synopsis for the contract.

std::vector<std::string> keywords()#

Keywords for the contract.

ContractState state()#

State of the contract.

bool seen()#

Whether the contract has been seen.

bool read()#

Whether the contract has been read.

bool active()#

Whether the contract is active.

bool failed()#

Whether the contract has been failed.

bool can_be_canceled()#

Whether the contract can be canceled.

bool can_be_declined()#

Whether the contract can be declined.

bool can_be_failed()#

Whether the contract can be failed.

void accept()#

Accept an offered contract.

void cancel()#

Cancel an active contract.

void decline()#

Decline an offered contract.

double funds_advance()#

Funds received when accepting the contract.

double funds_completion()#

Funds received on completion of the contract.

double funds_failure()#

Funds lost if the contract is failed.

double reputation_completion()#

Reputation gained on completion of the contract.

double reputation_failure()#

Reputation lost if the contract is failed.

double science_completion()#

Science gained on completion of the contract.

std::vector<ContractParameter> parameters()#

Parameters for the contract.

enum struct ContractState#

The state of a contract. See Contract::state().

enumerator active#

The contract is active.

enumerator canceled#

The contract has been canceled.

enumerator completed#

The contract has been completed.

enumerator deadline_expired#

The deadline for the contract has expired.

enumerator declined#

The contract has been declined.

enumerator failed#

The contract has been failed.

enumerator generated#

The contract has been generated.

enumerator offered#

The contract has been offered to the player.

enumerator offer_expired#

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

enumerator withdrawn#

The contract has been withdrawn.

class ContractParameter#

A contract parameter. See Contract::parameters().

std::string title()#

Title of the parameter.

std::string notes()#

Notes for the parameter.

std::vector<ContractParameter> children()#

Child contract parameters.

bool completed()#

Whether the parameter has been completed.

bool failed()#

Whether the parameter has been failed.

bool optional()#

Whether the contract parameter is optional.

double funds_completion()#

Funds received on completion of the contract parameter.

double funds_failure()#

Funds lost if the contract parameter is failed.

double reputation_completion()#

Reputation gained on completion of the contract parameter.

double reputation_failure()#

Reputation lost if the contract parameter is failed.

double science_completion()#

Science gained on completion of the contract parameter.