|
| 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 | GetNotes () |
| | Generates the human readable mission text from instance info More...
|
| |
| 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 List< CelestialBody > | GetWeightBodies () |
| | Optional celestial bodies to use when making weight changes. More...
|
| |
| override string | MessageCompleted () |
| | Overload to replace standard 'contract complete' message More...
|
| |
| override void | OnLoad (ConfigNode node) |
| |
| override void | OnSave (ConfigNode node) |
| |
| List< SurveyDefinition > | PossibleDefinitions () |
| |
| void | SetupParam (int paramIndex, KeyValuePair< SurveyDefinitionParameter, FlightBand > pair, int totalParameters, Vessel contextualVessel=null) |
| |
| bool | AddKeywords (params string[] keywords) |
| |
| bool | AddKeywordsRequired (params string[] keywords) |
| |
| virtual void | AwardAdvance () |
| |
| virtual void | AwardCompletion () |
| |
| float | GetDestinationWeight (CelestialBody body) |
| |
| 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 | OnAccepted () |
| |
| 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 | OnRegister () |
| | Registers all event hooks when contract is spawned in correct scene and is active More...
|
| |
| virtual void | OnReset () |
| | Called to reset the contract on scene loads, vessel changes, etc, if required. More...
|
| |
| virtual void | OnSeen () |
| |
| virtual void | OnUnregister () |
| | Unregisters all event hooks when contract becomes inactive or scene changes More...
|
| |
| 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) |
| |
|
static List< KeyValuePair
< Vessel, List< string > > > | CachePossibleVessels (CelestialBody body, List< SurveyDefinition > originalDefinitions) |
| |
| static int | CountBodies_Complete (bool includeKerbin, bool includeSun, string nodeComplete) |
| |
| static int | CountBodies_Reached (bool includeKerbin, bool includeSun) |
| |
| static List< CelestialBody > | GetBodies (bool includeKerbin, bool includeSun) |
| |
| static List< CelestialBody > | GetBodies (string nodeName, ProgressState nodeState, System.Func< CelestialBody, bool > where=null) |
| |
| static List< CelestialBody > | GetBodies (ProgressState bodyState, System.Func< CelestialBody, bool > where=null) |
| |
| static List< CelestialBody > | GetBodies (ProgressState bodyState, string nodeName, ProgressState nodeState, System.Func< CelestialBody, bool > where=null) |
| |
| static List< CelestialBody > | GetBodies_Complete (bool includeKerbin, bool includeSun, string complete) |
| |
| static List< CelestialBody > | GetBodies_InComplete (bool includeKerbin, bool includeSun, string notComplete) |
| |
| static List< CelestialBody > | GetBodies_NextUnreached (int depth, System.Func< CelestialBody, bool > where=null) |
| |
| static List< CelestialBody > | GetBodies_NotReached (bool includeKerbin, bool includeSun) |
| |
| static List< CelestialBody > | GetBodies_Reached (bool includeKerbin, bool includeSun) |
| |
|
| 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
} |
| |
| enum | ProgressState { ProgressState.Unreached,
ProgressState.Reached,
ProgressState.Incomplete,
ProgressState.Complete
} |
| |
| Agent | agent = null |
| |
| double | dateAccepted |
| |
| double | dateDeadline |
| |
| double | dateExpire |
| |
| double | dateFinished |
| |
| Contract.DeadlineType | deadlineType = DeadlineType.Floating |
| |
| Contract.DeadlineType | expiryType = DeadlineType.Floating |
| |
| Contract.ContractPrestige | prestige |
| |
| Agent | Agent [get] |
| | Space agency or organisation that is requesting this mission More...
|
| |
| IEnumerable< ContractParameter > | AllParameters [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] |
| |
| 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] |
| |
< First we want to find out what experiments are in the definitions possible on this planet.
< We will need these experiments multiple times, and we do not want to iterate over the parts of a vessel multiple times. We will cache the experiment IDs.
< If a vessel has crew on board, we'll assume they can perform surveys that require EVA.
< Now quickly filter out any vessels that aren't capable of surveys here.
| override bool FinePrint.Contracts.SurveyContract.Generate |
( |
| ) |
|
|
inlineprotectedvirtual |
Generates a new random mission
< Initially had high altitudes spawning on the sun, but the altitudes are so high that hitting trigger zones is difficult.
< Keep focused surveys and contextual surveys separate, for my own sanity.
< At this point we want to go through the surveyDefinition parameters, see what flight bands are possible, and theme our flight band choices by choosing one.
< Assuming that existing craft are capable of long range aerial travel is risky, we'll stick to lowish waypoints for contextuals.
< Now choose a band grouping and remove any of the possible parameters that can't fit in with it.
< Contextual surveys have a single waypoint at a time, that the player follows as it moves. They spawn near existing assets, so the rewards are nerfed.
< Calculate chance on Kerbin of being near the space center.
< Post process the altitudes a bit, PossibleDefinitions should already have handled this.
Reimplemented from Contracts.Contract.