Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
Contracts.Templates.OrbitalConstructionContract Class Reference
Inheritance diagram for Contracts.Templates.OrbitalConstructionContract:
Contracts.Contract FinePrint.Utilities.IUpdateWaypoints Contracts.IContractParameterHost

Public Member Functions

override bool CanBeCancelled ()
 If this contract can be cancelled More...
 
override bool CanBeDeclined ()
 If this contract can be declined More...
 
void CleanupRenderer ()
 
override bool MeetRequirements ()
 Test to see if this contract type meets requirements to be able to create a contract More...
 
void SetupRenderer ()
 
- Public Member Functions inherited from Contracts.Contract
bool Accept ()
 
ContractParameter AddParameter (ContractParameter parameter, string id=null)
 
virtual bool CanBeFailed ()
 If this contract can fail More...
 
bool Cancel ()
 
bool Complete ()
 
 Contract ()
 
bool Decline ()
 
bool Fail ()
 
void GenerateFailed ()
 
ContractParameter GetParameter (int index)
 
ContractParameter GetParameter (string id)
 
ContractParameter GetParameter (System.Type type)
 
GetParameter< T > (string id=null)
 
bool IsFinished ()
 
void Kill ()
 Prepares a contract to be forcibly removed from the contract system. More...
 
virtual string MissionControlTextRich ()
 
bool Offer ()
 
void ParameterStateUpdate (ContractParameter p)
 
void Register ()
 Registers all event hooks when contract is spawned in correct scene and is active More...
 
void RemoveParameter (int index)
 
void RemoveParameter (string id)
 
void RemoveParameter (System.Type type)
 
void RemoveParameter (ContractParameter parameter)
 
void Reset ()
 
void Save (ConfigNode node)
 
void SetViewed (Viewed viewed)
 Sets whether the player has either seen or read a contract in Mission Control. More...
 
void Unregister ()
 Unregisters all event hooks when contract becomes inactive or scene changes More...
 
void Update ()
 
void Withdraw ()
 

Protected Member Functions

override bool Generate ()
 Generates a new random mission More...
 
override string GetDescription ()
 Generates the human readable mission text from instance info More...
 
override string GetHashString ()
 
override string GetSynopsys ()
 Generates the human readable mission text from instance info More...
 
override string GetTitle ()
 Generates the human readable mission text from instance info More...
 
override string MessageCompleted ()
 Overload to replace standard 'contract complete' message More...
 
override void OnAccepted ()
 
override void OnLoad (ConfigNode node)
 
override void OnRegister ()
 Registers all event hooks when contract is spawned in correct scene and is active More...
 
override void OnSave (ConfigNode node)
 
override void OnUnregister ()
 Unregisters all event hooks when contract becomes inactive or scene changes More...
 
- Protected Member Functions inherited from Contracts.Contract
bool AddKeywords (params string[] keywords)
 
bool AddKeywordsRequired (params string[] keywords)
 
virtual void AwardAdvance ()
 
virtual void AwardCompletion ()
 
float GetDestinationWeight (CelestialBody body)
 
virtual string GetNotes ()
 Generates the human readable mission text from instance info More...
 
virtual List< CelestialBodyGetWeightBodies ()
 Optional celestial bodies to use when making weight changes. More...
 
virtual string MessageAccepted ()
 Overload to replace standard 'contract complete' message More...
 
virtual string MessageAdvances ()
 Appended to the MessageAccepted when a mission is accepted More...
 
virtual string MessageCancellationPenalties (double fundsPenalty, float repPenalty)
 Appended to the text when a mission is cancelled More...
 
virtual string MessageCancelled ()
 Overload to replace standard 'mission cancelled' message More...
 
virtual string MessageDeadlineExpired ()
 Overload to replace standard 'deadline expired' message More...
 
virtual string MessageFailed ()
 Overload to replace standard 'deadline expired' message More...
 
virtual string MessageFailurePenalties ()
 Appended to the text when a mission is failed More...
 
virtual string MessageOffered ()
 Overload to replace standard 'contract offered' message More...
 
virtual string MessageOfferExpired ()
 Overload to replace standard 'offer expired' message More...
 
virtual string MessageRewards ()
 Appended to the MessageCompleted text when a mission is completed More...
 
string MissionNotes ()
 
string MissionParameter (ContractParameter parameter, int indent)
 
virtual void OnCancelled ()
 
virtual void OnCompleted ()
 
virtual void OnDeadlineExpired ()
 
virtual void OnDeclined ()
 
virtual void OnFailed ()
 
virtual void OnFinished ()
 
virtual void OnGenerateFailed ()
 
virtual void OnOffered ()
 
virtual void OnOfferExpired ()
 
virtual void OnParameterStateChange (ContractParameter p)
 
virtual void OnRead ()
 
virtual void OnReset ()
 Called to reset the contract on scene loads, vessel changes, etc, if required. More...
 
virtual void OnSeen ()
 
virtual void OnUpdate ()
 Called per frame - with current time - when contract is active More...
 
virtual void OnWithdrawn ()
 
virtual void PenalizeCancellation ()
 
virtual void PenalizeFailure ()
 
void SendStateMessage (string title, string message, MessageSystemButton.MessageButtonColor color, MessageSystemButton.ButtonIcons icon)
 Sends user a text message via messaging system More...
 
void SetDeadlineDays (float days, CelestialBody body=null)
 
void SetDeadlineYears (float years, CelestialBody body=null)
 
void SetExpiry ()
 
void SetExpiry (int minDays, int maxDays)
 
void SetExpiry (float minDays, float maxDays)
 
void SetFunds (float advance, float completion, CelestialBody body=null)
 
void SetFunds (float advance, float completion, float failure, CelestialBody body=null)
 
void SetReputation (float completion, float failure, CelestialBody body=null)
 
void SetReputation (float completion, CelestialBody body=null)
 
void SetScience (float completion, CelestialBody body=null)
 
void SetState (State newState)
 
CelestialBody WeightedBodyChoice (IList< CelestialBody > bodies, System.Random generator=null)
 

Protected Attributes

AvailablePart constructionPart
 The part that has to be added to the vessel More...
 
string constructionPartName
 
uint constructionVesselId
 
PreBuiltCraftDefinition craftDefinition
 This is the prebuilt craft this mission will use. More...
 
Orbit orbit
 The orbit for the vessel. More...
 
double orbitAltitudeFactor = 0.5
 
double orbitEccentricity = 0.0
 
double orbitInclinationFactor = 0.5
 
ContractOrbitRenderer orbitRenderer
 The orbit renderer used to render the orbit in Tracking Station before accepting the contract. More...
 
CelestialBody targetBody
 
string vesselName
 
string[] VesselNameStrings
 One entry from this array is used to name the spawned vessel for the contract. More...
 
bool waitingForVslSpawn
 Is true when the contract is waiting for the vessel spawn coroutine to complete. More...
 
- Protected Attributes inherited from Contracts.Contract
Agent agent = null
 
double dateAccepted
 
double dateDeadline
 
double dateExpire
 
double dateFinished
 
Contract.DeadlineType deadlineType = DeadlineType.Floating
 
Contract.DeadlineType expiryType = DeadlineType.Floating
 
Contract.ContractPrestige prestige
 

Properties

string ConstructionPartName [get]
 The Part Name that must be added to the orbiting vessel. More...
 
uint ConstructionVesselId [get]
 The vessel persistentId More...
 
double OrbitAltitudeFactor [get]
 Orbit Altitude Factor More...
 
double OrbitEccentricity [get]
 Orbit Eccentricity Factor More...
 
double OrbitInclinationFactor [get]
 Orbit Inclination Factor More...
 
CelestialBody TargetBody [get]
 The Target CB for the contract More...
 
string VesselName [get]
 The Vessel name More...
 
- Properties inherited from Contracts.Contract
Agent Agent [get]
 Space agency or organisation that is requesting this mission More...
 
IEnumerable< ContractParameterAllParameters [get]
 
System.Guid ContractGuid [get]
 Globally unique mission identifier (will be unique even for two contracts considered to be repeats (matching ContractIDs)) More...
 
long ContractID [get]
 Unique mission identifier (combines mission name and parameters) More...
 
static int contractsInExistance [get, set]
 
State ContractState [get]
 
Viewed ContractViewed [get]
 
double DateAccepted [get]
 
double DateDeadline [get]
 
double DateExpire [get]
 
double DateFinished [get]
 
string Description [get]
 
static double GameTime [get]
 
List< string > Keywords [get]
 Keywords which help to score agent suitability for this contract More...
 
List< string > KeywordsRequired [get]
 Keywords which MUST be matched by a mentality in order for agents/mentalities to be valid eg. A mentality which DOES NOT positively score these have these will fail verification (excludes others) More...
 
string LocalizedContractState [get]
 
int MissionSeed [get]
 The seed that was used to generate the mission More...
 
string Notes [get]
 
int ParameterCount [get]
 
IContractParameterHost Parent [get]
 
Contract.ContractPrestige Prestige [get]
 Difficulty that this contract was generated for More...
 
Contract Root [get]
 
string Synopsys [get]
 
ContractParameter this[int index] [get]
 
ContractParameter this[string id] [get]
 
ContractParameter this[System.Type type] [get]
 
string Title [get]
 
- Properties inherited from Contracts.IContractParameterHost
int ParameterCount [get]
 
IContractParameterHost Parent [get]
 
Contract Root [get]
 
ContractParameter this[int index] [get]
 
ContractParameter this[string id] [get]
 
ContractParameter this[System.Type type] [get]
 
string Title [get]
 

Additional Inherited Members

- Public Types inherited from Contracts.Contract
enum  ContractPrestige : int { ContractPrestige.Trivial = 0, ContractPrestige.Significant = 1, ContractPrestige.Exceptional = 2 }
 
enum  DeadlineType : int { DeadlineType.Fixed, DeadlineType.Floating, DeadlineType.None }
 
enum  State : int {
  State.Generated, State.Offered, State.OfferExpired, State.Declined,
  State.Cancelled, State.Active, State.Completed, State.DeadlineExpired,
  State.Failed, State.Withdrawn
}
 
enum  Viewed : int { Viewed.Unseen = 0, Viewed.Seen = 1, Viewed.Read = 2 }
 
- Static Public Member Functions inherited from Contracts.Contract
static Contract Generate (System.Type contractType, Contract.ContractPrestige difficulty, int seed, State state)
 Generates a new random mission More...
 
static Contract Load (Contract contract, ConfigNode node)
 
- Public Attributes inherited from Contracts.Contract
bool AutoAccept
 Whether this contract is automatically accepted after being offered by the contract system. More...
 
double FundsAdvance
 The funds advance gained from accepting this mission More...
 
double FundsCompletion
 The funds gained for completing the mission More...
 
double FundsFailure
 The funds gained for failing the mission More...
 
bool IgnoresWeight
 Whether this contract ignores weight changes, always staying at default. More...
 
EventData< StateOnStateChange = new EventData<State>("OnStateChange")
 
EventData< ViewedOnViewedChange = new EventData<Viewed>("OnViewedChange")
 
float ReputationCompletion
 The reputation gain for completing the mission More...
 
float ReputationFailure
 The reputation gain for failing to complete the mission before the deadline More...
 
float ScienceCompletion
 The science gained for completing the mission More...
 
double TimeDeadline
 The time duration from when this mission was accepted until the deadline is hit More...
 
double TimeExpiry
 The time duration from when this mission was generated until it expires More...
 
- Protected Types inherited from Contracts.Contract
enum  ProgressState { ProgressState.Unreached, ProgressState.Reached, ProgressState.Incomplete, ProgressState.Complete }
 
- Static Protected Member Functions inherited from Contracts.Contract
static int CountBodies_Complete (bool includeKerbin, bool includeSun, string nodeComplete)
 
static int CountBodies_Reached (bool includeKerbin, bool includeSun)
 
static List< CelestialBodyGetBodies (bool includeKerbin, bool includeSun)
 
static List< CelestialBodyGetBodies (string nodeName, ProgressState nodeState, System.Func< CelestialBody, bool > where=null)
 
static List< CelestialBodyGetBodies (ProgressState bodyState, System.Func< CelestialBody, bool > where=null)
 
static List< CelestialBodyGetBodies (ProgressState bodyState, string nodeName, ProgressState nodeState, System.Func< CelestialBody, bool > where=null)
 
static List< CelestialBodyGetBodies_Complete (bool includeKerbin, bool includeSun, string complete)
 
static List< CelestialBodyGetBodies_InComplete (bool includeKerbin, bool includeSun, string notComplete)
 
static List< CelestialBodyGetBodies_NextUnreached (int depth, System.Func< CelestialBody, bool > where=null)
 
static List< CelestialBodyGetBodies_NotReached (bool includeKerbin, bool includeSun)
 
static List< CelestialBodyGetBodies_Reached (bool includeKerbin, bool includeSun)
 

Member Function Documentation

override bool Contracts.Templates.OrbitalConstructionContract.CanBeCancelled ( )
inlinevirtual

If this contract can be cancelled

Reimplemented from Contracts.Contract.

override bool Contracts.Templates.OrbitalConstructionContract.CanBeDeclined ( )
inlinevirtual

If this contract can be declined

Reimplemented from Contracts.Contract.

void Contracts.Templates.OrbitalConstructionContract.CleanupRenderer ( )
inline
override bool Contracts.Templates.OrbitalConstructionContract.Generate ( )
inlineprotectedvirtual

Generates a new random mission

Reimplemented from Contracts.Contract.

override string Contracts.Templates.OrbitalConstructionContract.GetDescription ( )
inlineprotectedvirtual

Generates the human readable mission text from instance info

Reimplemented from Contracts.Contract.

override string Contracts.Templates.OrbitalConstructionContract.GetHashString ( )
inlineprotectedvirtual

Reimplemented from Contracts.Contract.

override string Contracts.Templates.OrbitalConstructionContract.GetSynopsys ( )
inlineprotectedvirtual

Generates the human readable mission text from instance info

Reimplemented from Contracts.Contract.

override string Contracts.Templates.OrbitalConstructionContract.GetTitle ( )
inlineprotectedvirtual

Generates the human readable mission text from instance info

Reimplemented from Contracts.Contract.

override bool Contracts.Templates.OrbitalConstructionContract.MeetRequirements ( )
inlinevirtual

Test to see if this contract type meets requirements to be able to create a contract

Reimplemented from Contracts.Contract.

override string Contracts.Templates.OrbitalConstructionContract.MessageCompleted ( )
inlineprotectedvirtual

Overload to replace standard 'contract complete' message

Returns

Reimplemented from Contracts.Contract.

override void Contracts.Templates.OrbitalConstructionContract.OnAccepted ( )
inlineprotectedvirtual

Reimplemented from Contracts.Contract.

override void Contracts.Templates.OrbitalConstructionContract.OnLoad ( ConfigNode  node)
inlineprotectedvirtual

Reimplemented from Contracts.Contract.

override void Contracts.Templates.OrbitalConstructionContract.OnRegister ( )
inlineprotectedvirtual

Registers all event hooks when contract is spawned in correct scene and is active

Reimplemented from Contracts.Contract.

override void Contracts.Templates.OrbitalConstructionContract.OnSave ( ConfigNode  node)
inlineprotectedvirtual

Reimplemented from Contracts.Contract.

override void Contracts.Templates.OrbitalConstructionContract.OnUnregister ( )
inlineprotectedvirtual

Unregisters all event hooks when contract becomes inactive or scene changes

Reimplemented from Contracts.Contract.

void Contracts.Templates.OrbitalConstructionContract.SetupRenderer ( )
inline

Member Data Documentation

AvailablePart Contracts.Templates.OrbitalConstructionContract.constructionPart
protected

The part that has to be added to the vessel

string Contracts.Templates.OrbitalConstructionContract.constructionPartName
protected
uint Contracts.Templates.OrbitalConstructionContract.constructionVesselId
protected
PreBuiltCraftDefinition Contracts.Templates.OrbitalConstructionContract.craftDefinition
protected

This is the prebuilt craft this mission will use.

Orbit Contracts.Templates.OrbitalConstructionContract.orbit
protected

The orbit for the vessel.

double Contracts.Templates.OrbitalConstructionContract.orbitAltitudeFactor = 0.5
protected
double Contracts.Templates.OrbitalConstructionContract.orbitEccentricity = 0.0
protected
double Contracts.Templates.OrbitalConstructionContract.orbitInclinationFactor = 0.5
protected
ContractOrbitRenderer Contracts.Templates.OrbitalConstructionContract.orbitRenderer
protected

The orbit renderer used to render the orbit in Tracking Station before accepting the contract.

CelestialBody Contracts.Templates.OrbitalConstructionContract.targetBody
protected
string Contracts.Templates.OrbitalConstructionContract.vesselName
protected
string [] Contracts.Templates.OrbitalConstructionContract.VesselNameStrings
protected
Initial value:
= new string[] {
"#autoLOC_6002605",
"#autoLOC_6002606",
"#autoLOC_6002607",
"#autoLOC_6002608",
"#autoLOC_6002609",
"#autoLOC_6002610",
"#autoLOC_6002611",
"#autoLOC_6002612",
"#autoLOC_6002613",
"#autoLOC_6002614",
"#autoLOC_6002615",
"#autoLOC_6002616"
}

One entry from this array is used to name the spawned vessel for the contract.

bool Contracts.Templates.OrbitalConstructionContract.waitingForVslSpawn
protected

Is true when the contract is waiting for the vessel spawn coroutine to complete.

Property Documentation

string Contracts.Templates.OrbitalConstructionContract.ConstructionPartName
get

The Part Name that must be added to the orbiting vessel.

uint Contracts.Templates.OrbitalConstructionContract.ConstructionVesselId
get

The vessel persistentId

double Contracts.Templates.OrbitalConstructionContract.OrbitAltitudeFactor
get

Orbit Altitude Factor

double Contracts.Templates.OrbitalConstructionContract.OrbitEccentricity
get

Orbit Eccentricity Factor

double Contracts.Templates.OrbitalConstructionContract.OrbitInclinationFactor
get

Orbit Inclination Factor

CelestialBody Contracts.Templates.OrbitalConstructionContract.TargetBody
get

The Target CB for the contract

string Contracts.Templates.OrbitalConstructionContract.VesselName
get

The Vessel name


The documentation for this class was generated from the following file: