protected override void RunInt() { Slate slate = QuestGen.slate; QuestPart_Message message = new QuestPart_Message(); message.inSignal = (QuestGenUtility.HardcodedSignalWithQuestID(inSignal.GetValue(slate)) ?? slate.Get <string>("inSignal")); message.messageType = (messageType.GetValue(slate) ?? MessageTypeDefOf.NeutralEvent); message.lookTargets = QuestGenUtility.ToLookTargets(lookTargets, slate); QuestGen.AddTextRequest("root", delegate(string x) { message.message = x; }, QuestGenUtility.MergeRules(rules.GetValue(slate), text.GetValue(slate), "root")); QuestGen.quest.AddPart(message); }
public static QuestPart_Message Message(this Quest quest, string message, MessageTypeDef messageType = null, bool getLookTargetsFromSignal = false, RulePack rules = null, LookTargets lookTargets = null, string inSignal = null) { QuestPart_Message questPart = new QuestPart_Message(); questPart.inSignal = QuestGenUtility.HardcodedSignalWithQuestID(inSignal) ?? QuestGen.slate.Get <string>("inSignal"); questPart.messageType = messageType ?? MessageTypeDefOf.NeutralEvent; questPart.lookTargets = lookTargets; questPart.getLookTargetsFromSignal = getLookTargetsFromSignal; QuestGen.AddTextRequest("root", delegate(string x) { questPart.message = x; }, QuestGenUtility.MergeRules(rules, message, "root")); QuestGen.quest.AddPart(questPart); return(questPart); }