private DialogueOverride GetPresetDynamicWithdrawDialogue() { DialogueOverride dialogueOverride = MissionControl.Instance.CurrentContract.Override.dialogueList.FirstOrDefault( dialogue => dialogue.GUID == ChunkLogic.DIALOGUE_DYNAMIC_WITHDRAW_ESCAPE_GUID); return(dialogueOverride); }
private void AddDialogueChunk(EncounterRules encounterRules) { DialogueOverride dialogueOverride = GetPresetDynamicWithdrawDialogue(); if (dialogueOverride == null) { encounterRules.EncounterLogic.Add(new AddDialogueChunk( ChunkLogic.DIALOGUE_DYNAMIC_WITHDRAW_ESCAPE_GUID, "DynamicWithdrawEscape", "Start Conversation For Dynamic Withdraw Escape", ChunkLogic.DYNAMIC_WITHDRAW_REGION_GUID, true, "I'm coming in hot. Get to the EZ as soon as you can, Commander", UnityGameInstance.BattleTechGame.DataManager.CastDefs.Get("castDef_SumireDefault") )); } else { encounterRules.EncounterLogic.Add(new AddDialogueChunk( ChunkLogic.DIALOGUE_DYNAMIC_WITHDRAW_ESCAPE_GUID, "DynamicWithdrawEscape", "Start Conversation For Dynamic Withdraw Escape", dialogueOverride )); } }
public AddDialogueChunk(string dialogueGuid, string dialogChunkName, string debugDescription, DialogueOverride dialogueOverride) { this.dialogueGuid = dialogueGuid; this.dialogChunkName = dialogChunkName; this.debugDescription = debugDescription; this.dialogueOverride = dialogueOverride; }
public static DialogueGameLogic CreateDialogLogic(GameObject parent, string name, DialogueOverride dialogueOverride) { GameObject dialogueGameLogicGo = CreateDialogLogicGameObject(parent, name); Dictionary <string, EncounterObjectGameLogic> encounterObjects = new Dictionary <string, EncounterObjectGameLogic>(); MissionControl.Instance.EncounterLayerData.BuildEncounterObjectDictionary(encounterObjects); DialogueGameLogic dialogueGameLogic = dialogueGameLogicGo.AddComponent <DialogueGameLogic>(); dialogueGameLogic.ApplyContractOverride(dialogueOverride, encounterObjects); return(dialogueGameLogic); }