protected override string GetDescription() { generateExperimentIfNeeded(); //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "researching", "research", "it was aliens", new System.Random().Next())); }
protected override string GetDescription() { generateExperimentIfNeeded(); //those 3 strings appear to do nothing return(TextGen.GenerateBackStories("Research", Agent.GetMindsetString(), "Science", experimentNode.GetValue("title"), new System.Random().Next(), true, true, true)); }
protected override string GetDescription() { //those 3 strings appear to do nothing if (onLand) { return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "building a base", "engineering", "planetary structures", new System.Random().Next())); } else { return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "building a station", "orbital structures", "engineering", new System.Random().Next())); } }
protected override string GetDescription() { if (contractType.description == null || contractType.description == "") { // Generate the contract description return(TextGen.GenerateBackStories(agent.Name, agent.GetMindsetString(), contractType.topic, contractType.subject, contractType.motivation, MissionSeed)); } else { return(contractType.description); } }
protected override bool Generate() { // MeetsRequirement gets called first and sets the contract type, but check it and // select the contract type just in case. if (contractType == null) { if (!SelectContractType()) { return(false); } } LoggingUtil.LogDebug(this.GetType(), "Generating contract: " + contractType); hash = contractType.hash; // Set the agent if (contractType.agent != null) { agent = contractType.agent; } // Set the contract expiry if (contractType.maxExpiry == 0.0f) { SetExpiry(); expiryType = DeadlineType.None; } else { SetExpiry(contractType.minExpiry, contractType.maxExpiry); } // Set the contract deadline if (contractType.deadline == 0.0f) { deadlineType = Contract.DeadlineType.None; } else { SetDeadlineDays(contractType.deadline, contractType.targetBody); } // Set rewards SetScience(contractType.rewardScience, contractType.targetBody); SetReputation(contractType.rewardReputation, contractType.failureReputation, contractType.targetBody); SetFunds(contractType.advanceFunds, contractType.rewardFunds, contractType.failureFunds, contractType.targetBody); // Copy text from contract type title = contractType.title; synopsis = contractType.synopsis; completedMessage = contractType.completedMessage; notes = contractType.notes; // Set description if (string.IsNullOrEmpty(contractType.description)) { if (agent == null) { agent = AgentList.Instance.GetSuitableAgentForContract(this); } // Generate the contract description description = TextGen.GenerateBackStories(agent.Name, agent.GetMindsetString(), contractType.topic, contractType.subject, contractType.motivation, MissionSeed); } else { description = contractType.description; } // Generate behaviours behaviours = new List <ContractBehaviour>(); if (!contractType.GenerateBehaviours(this)) { return(false); } // Generate parameters try { if (!contractType.GenerateParameters(this)) { return(false); } } catch (Exception e) { LoggingUtil.LogException(new Exception("Failed generating parameters for " + contractType, e)); return(false); } LoggingUtil.LogInfo(this.GetType(), "Generated contract: " + contractType); return(true); }
protected override string GetDescription() { // Topic and Subject are unused in the standard StoryDefs.cfg for "CollectScience" missions return(TextGen.GenerateBackStories("CollectScience", Agent.Name, "", "", MissionSeed, true, true, true)); }
protected override string GetDescription() { return(TextGen.GenerateBackStories(Localizer.Format("#autoLOC_TST_0052"), agent.Name, Localizer.Format("#autoLOC_TST_0053"), target.name, MissionSeed, true, true, true)); //#autoLOC_TST_0052 = Exploration # autoLOC_TST_0053 = ChemCam }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories("Station Science", Agent.Name, "station science experiment", experimentType.title, new System.Random().Next(), true, true, true)); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "retrieving an asteroid", "snooker", "large rocks", new System.Random().Next())); }
public bool Initialize(ContractType contractType) { LoggingUtil.LogLevel origLogLevel = LoggingUtil.logLevel; try { this.contractType = contractType; if (contractType.trace) { LoggingUtil.logLevel = LoggingUtil.LogLevel.VERBOSE; } LoggingUtil.LogDebug(this, "Initializing contract: " + contractType); // Set stuff from contract type subType = contractType.name; hash = contractType.hash; AutoAccept = contractType.autoAccept; // Set the contract expiry if (contractType.maxExpiry == 0.0f) { LoggingUtil.LogDebug(this, contractType.name + ": Setting expirty to none"); SetExpiry(); expiryType = DeadlineType.None; } else { SetExpiry(contractType.minExpiry, contractType.maxExpiry); // Force set the expiry, in stock this is normally done on Contract.Offer() dateExpire = GameTime + TimeExpiry; } // Set the contract deadline if (contractType.deadline == 0.0f) { deadlineType = Contract.DeadlineType.None; } else { SetDeadlineDays(contractType.deadline, null); } // Set rewards SetScience(contractType.rewardScience, contractType.targetBody); SetReputation(contractType.rewardReputation, contractType.failureReputation, contractType.targetBody); SetFunds(contractType.advanceFunds, contractType.rewardFunds, contractType.advanceFunds + contractType.failureFunds, contractType.targetBody); // Copy text from contract type title = contractType.title; synopsis = contractType.synopsis; completedMessage = contractType.completedMessage; notes = contractType.notes; // Set the agent if (contractType.agent != null) { agent = contractType.agent; } else { agent = AgentList.Instance.GetSuitableAgentForContract(this); } // Set description if (string.IsNullOrEmpty(contractType.description) && agent != null) { // Generate the contract description description = TextGen.GenerateBackStories("ConfiguredContract", agent.Name, contractType.topic, contractType.subject, random.Next(), true, true, true); } else { description = contractType.description; } // Generate behaviours behaviours = new List <ContractBehaviour>(); if (!contractType.GenerateBehaviours(this)) { return(false); } // Generate parameters bool paramsGenerated = contractType.GenerateParameters(this); bodiesLoaded = false; contractType.contractBodies = ContractBodies; if (!paramsGenerated) { return(false); } // Do a very late research bodies check try { contractType.ResearchBodiesCheck(this); } catch (ContractRequirementException) { return(false); } // Copy in the requirement nodes requirements = new List <ContractRequirement>(); foreach (ContractRequirement requirement in contractType.Requirements) { requirements.Add(requirement); } LoggingUtil.LogDebug(this, "Initialized contract: " + contractType); return(true); } catch (Exception e) { LoggingUtil.LogError(this, "Error initializing contract " + contractType); LoggingUtil.LogException(e); ExceptionLogWindow.DisplayFatalException(ExceptionLogWindow.ExceptionSituation.CONTRACT_GENERATION, e, contractType == null ? "unknown" : contractType.FullName); return(false); } finally { LoggingUtil.logLevel = origLogLevel; } }
protected override string GetDescription() { return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "", "", "", new System.Random().Next())); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "experiment", "station", "kill all humans", new System.Random().Next())); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "science", "station", "expand knowledge", new System.Random().Next())); }
protected override string GetDescription() { return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "commerce", "trading", "Resources Transportation", new System.Random().Next())); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "driving a rover", "joyriding", "surface travel", new System.Random().Next())); }
protected override string GetDescription() { return(TextGen.GenerateBackStories(agent.Name, agent.GetMindsetString(), "Space Telescope", target.name, "test", MissionSeed)); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "unmanned", "probes", "GPS", new System.Random().Next())); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "flying", "not crashing", "aerial", new System.Random().Next())); }
protected override string GetDescription() { //those 3 strings appear to do nothing return(TextGen.GenerateBackStories(Agent.Name, Agent.GetMindsetString(), "ISRU", "resource extraction", "sustainability", new System.Random().Next())); }