public void CreateNewConvesation() { //Create new conversation data class ConversationData conversationData = new ConversationData(); conversationData.StepData = new List <StepData>(); //Get an ID for conversation conversationData.ID = DataMart.GetConversationID(); //Set any default values for the new conversation conversationData.NPCID = -1; //Set Conversation UI Field(s) with data from the new conversation ID.text = conversationData.ID.ToString(); NPCID.text = conversationData.NPCID.ToString(); //Clear any old UI elements DestroyAllChildUIElements(); //Clear listeners CreateStep.onClick.RemoveAllListeners(); SaveButton.onClick.RemoveAllListeners(); DeleteButton.onClick.RemoveAllListeners(); //Setup Create Step button CreateStep.onClick.AddListener(delegate { CreateNewStep(conversationData); }); //Setup Save button SaveButton.onClick.AddListener(delegate { SaveConversation(conversationData); }); //Delete button DeleteButton.onClick.AddListener(delegate { DeleteConversation(conversationData); }); }
public void Open() { if (isOpen) { string message = "You keep looking expecting to find more.."; UIManager.instance.PostNotification("Icons/Card/unknown", message); return; } ItemData data = DataMart.GetItem(chestItemID); bool isAdded = Player.instance.Inventory.AddInventoryItem(data); if (isAdded) { isOpen = true; transform.GetComponent <SpriteRenderer>().sprite = chestSpriteOpen; chestParticles.Stop(); string message = "You have found a <color=#C2C34D>" + data.Name + "</color>!"; UIManager.instance.PostNotification(data.SpriteURI, message); } else { string message = "Your inventory is full."; UIManager.instance.PostNotification("Icons/Card/unknown", message); } }
private void DeleteConversation(ConversationData conversationData) { if (DataMart.CheckConversationDataBase(conversationData.ID)) { DataMart.RemoveConversation(conversationData.ID); } DestroyAllChildUIElements(); }
private void Awake() { //Load Conversation Files Into Database StartCoroutine(DataMart.LoadAllDatabasesFromFile()); //Add Tab Bar Events LoadDatabaseButton.onClick.AddListener(delegate { StartCoroutine(DataMart.LoadAllDatabasesFromFile()); }); SaveDatabaseButton.onClick.AddListener(delegate { StartCoroutine(DataMart.SaveAllDatabasesToFile()); }); }
private void DeleteNPC(NPCData _npc) { if (DataMart.CheckNPC(_npc.ID)) { DataMart.RemoveNPC(_npc); } else { Debug.LogError("NPC doesnt exist"); } }
public void DeleteItem(ItemData item) { if (DataMart.CheckItemDataBase(item.ID)) { DataMart.RemoveItem(item); ClearItemUI(); } else { Debug.LogError("Delete Error: No item with that ID"); } }
public void LoadNPC(int id) { if (DataMart.CheckNPC(id)) { NPCData data = DataMart.GetNPC(id); RefreshUI(data); } else { Debug.LogError("Cannot load, NPC not found."); } }
public void LoadItem(int id) { if (DataMart.CheckItemDataBase(id)) { ItemData data = DataMart.GetItem(id); RefreshItemUI(data); } else { Debug.LogError("Load Error: No item with that ID"); } }
public void LoadConversation(int id) { if (DataMart.CheckConversationDataBase(id)) { ConversationData data = DataMart.GetConversation(id); RefreshConversationUI(data); } else { Debug.LogError("Load Error: No conversation with that ID"); } }
private void SaveNPC(NPCData _npc) { _npc.Name = NPCName.text; _npc.URI = PortraitURI.text; if (DataMart.CheckNPC(_npc.ID)) { DataMart.RemoveNPC(_npc); DataMart.AddNPC(_npc); } else { DataMart.AddNPC(_npc); } }
public void CreateNewNPC() { NPCData npcData = new NPCData(); npcData.ID = DataMart.GetNPCID(); ID.text = npcData.ID.ToString(); Delete.onClick.RemoveAllListeners(); Save.onClick.RemoveAllListeners(); Delete.onClick.AddListener(delegate { DeleteNPC(npcData); }); Save.onClick.AddListener(delegate { SaveNPC(npcData); }); ClearNPCUI(); }
private void Start() { if (IDKEY >= 0) { //Is not a negative number if (DataMart.CheckNPC(IDKEY)) { NPCData data = DataMart.GetNPC(IDKEY); npcname = data.Name; uri = data.URI; } } else { Debug.LogError("ID is a negative number"); } }
public void ClaimReward() { switch (questType) { case QuestType.HaveQuestItemInInventory: Player.instance.Inventory.RemoveInventoryItem(itemInventorySlotID); ItemData item = DataMart.GetItem(rewardItemID); Player.instance.Inventory.AddInventoryItem(item); string message = "You have found a <color=#C2C34D>" + item.Name + "</color>!"; UIManager.instance.PostNotification(item.SpriteURI, message); break; default: Debug.LogError("error in switch statement"); break; } state = QuestState.RewardObtained; }
public void SaveItem(ItemData itemData) { //Set Item Name itemData.Name = NameField.text; //Set Item Description itemData.Description = DescriptionField.text; //Set Item Value itemData.Value = int.Parse(ValueField.text); //Set Item Sprite URI itemData.SpriteURI = SpriteURIField.text; switch (TypeField.value) { case 0: itemData.Type = ItemData.ItemType.Valuable; break; case 1: itemData.Type = ItemData.ItemType.Quest; break; case 2: itemData.Type = ItemData.ItemType.KeyItem; break; default: Debug.LogError("Unknown Item Type."); break; } if (DataMart.CheckItemDataBase(itemData.ID)) { DataMart.RemoveItem(itemData); } DataMart.AddItem(itemData); SaveButton.GetComponent <Image>().color = Color.green; }
public void OpenItemDetail(int _itemID, int _slotID) { ItemData _data = DataMart.GetItem(_itemID); Sprite sprite = Resources.Load <Sprite>(_data.SpriteURI); ResetItemDetail(); ItemDetailDescription.text = _data.Description; ItemDetailImage.sprite = sprite; ItemDetailName.text = _data.Name; ItemDetailType.text = _data.Type.ToString(); if (_data.Type == ItemData.ItemType.Valuable) { ItemDropButton.interactable = true; ItemDropButton.onClick.AddListener(delegate { Player.instance.RemoveInventoryItem(_slotID); }); } else if (_data.Type == ItemData.ItemType.Quest) { } else if (_data.Type == ItemData.ItemType.KeyItem) { } }
public void CreateNewItem() { //Create new Item ItemData itemData = new ItemData(); //Get an ID itemData.ID = DataMart.GetItemID(); //Set UI - ID ID.text = itemData.ID.ToString(); //Clear listeners SaveButton.onClick.RemoveAllListeners(); DeleteButton.onClick.RemoveAllListeners(); //Setup Save button SaveButton.onClick.AddListener(delegate { SaveItem(itemData); }); //Setup Delete button DeleteButton.onClick.AddListener(delegate { DeleteItem(itemData); }); ClearItemUI(); }
public async Task CreatePhysicalEntityAsync(EntityExecution entityExecution, Entity entity, DataMart dataMart, CancellationToken cancellationToken) { // no op await Task.CompletedTask; }
public void SaveConversation(ConversationData conversationData) { //Exit if no steps if (StepContainer.childCount <= 0) { return; } //Get Conversations NPCID conversationData.NPCID = int.Parse(NPCID.text); for (int stepObjectID = 0; stepObjectID < StepContainer.childCount; stepObjectID++) { //Step Data (for easy reference) StepData stepData = conversationData.StepData[stepObjectID]; //Get Step Text conversationData.StepData[stepObjectID].Text = StepContainer.GetChild(stepObjectID).GetChild(2).GetComponent <TMP_InputField>().text; //Option Container Transform optionContainer = StepContainer.GetChild(stepObjectID).GetChild(3).GetChild(0).GetChild(0).transform; for (int option = 0; option < optionContainer.childCount; option++) { //Option Data (for easy reference) OptionData optionData = stepData.OptionData[option]; //Get Option ID optionData.DestinationID = int.Parse(optionContainer.GetChild(option).GetChild(5).GetComponent <TMP_InputField>().text); //Get Option Text optionData.Text = optionContainer.GetChild(option).GetChild(4).GetComponent <TMP_InputField>().text; //Get Option Trigger if (optionContainer.GetChild(option).GetChild(0).GetComponent <TMP_Dropdown>().value == 0) { //Acceptance Trigger optionData.Trigger = OptionTrigger.QuestAcceptance; } else if (optionContainer.GetChild(option).GetChild(0).GetComponent <TMP_Dropdown>().value == 1) { //Reward Trigger optionData.Trigger = OptionTrigger.ObtainQuestReward; } else if (optionContainer.GetChild(option).GetChild(0).GetComponent <TMP_Dropdown>().value == 2) { //No Trigger optionData.Trigger = OptionTrigger.None; } //Get Option Value if (optionContainer.GetChild(option).GetChild(2).GetComponent <TMP_Dropdown>().value == 0) { //Value 1 optionData.ValueCheck = CompanyValue.ValueOne; optionData.ValueCheckAmount = int.Parse(optionContainer.GetChild(option).GetChild(6).GetComponent <TMP_InputField>().text); } else if (optionContainer.GetChild(option).GetChild(2).GetComponent <TMP_Dropdown>().value == 1) { //Value 2 optionData.ValueCheck = CompanyValue.ValueTwo; optionData.ValueCheckAmount = int.Parse(optionContainer.GetChild(option).GetChild(6).GetComponent <TMP_InputField>().text); } else if (optionContainer.GetChild(option).GetChild(2).GetComponent <TMP_Dropdown>().value == 2) { //Value 3 optionData.ValueCheck = CompanyValue.ValueThree; optionData.ValueCheckAmount = int.Parse(optionContainer.GetChild(option).GetChild(6).GetComponent <TMP_InputField>().text); } else if (optionContainer.GetChild(option).GetChild(2).GetComponent <TMP_Dropdown>().value == 3) { //No Value optionData.ValueCheck = CompanyValue.NULL; optionData.ValueCheckAmount = -1; } } } if (DataMart.CheckConversationDataBase(conversationData.ID)) { DataMart.RemoveConversation(conversationData.ID); } DataMart.AddConversation(conversationData); SaveButton.GetComponent <Image>().color = Color.green; }
private void Start() { Conversation_Data = DataMart.GetConversation(ConversationID); }
public void Init(DataMart dataMart1) { this.dataMart = dataMart1 ?? throw new ArgumentNullException(nameof(dataMart1)); }
public void SavePlayer() { _myData = CreatePlayerData(); DataMart.Save_PlayerData(_myData); }
public static void Export(XmlWriter xmlWriter, IEnumerable <DataMart> dataMarts, Lpp.Dns.Portal.IPluginService plugins) { try { xmlWriter.WriteStartDocument(true); xmlWriter.WriteStartElement("datamarts", "urn://popmednet/datamarts/metadata"); xmlWriter.WriteAttributeString("xmlns", "xsi", null, "http://www.w3.org/2001/XMLSchema-instance"); xmlWriter.WriteAttributeString("xmlns", "xs", null, "http://www.w3.org/2001/XMLSchema"); foreach (var d in dataMarts) { DataMart dm = d; xmlWriter.WriteStartElement("datamart"); #region DataMart Header xmlWriter.WriteStartElement("header"); InsertStringValue(xmlWriter, "id", dm.ID.ToString()); InsertStringValue(xmlWriter, "name", dm.Name); InsertStringValue(xmlWriter, "acronym", dm.Acronym); InsertStringValue(xmlWriter, "organization", dm.Organization.Name); InsertStringValue(xmlWriter, "contactfullname", dm.ContactFirstName + " " + dm.ContactLastName); InsertStringValue(xmlWriter, "contactemail", dm.ContactEmail); InsertStringValue(xmlWriter, "healthplandescription", dm.HealthPlanDescription); InsertStringValue(xmlWriter, "collabrequest", dm.SpecialRequirements); InsertStringValue(xmlWriter, "datamodel", dm.DataModel); InsertStringValue(xmlWriter, "datamodelother", dm.OtherDataModel); InsertStringValue(xmlWriter, "dataperiodstartyear", dm.StartDate.HasValue ? dm.StartDate.Value.ToShortDateString() : ""); InsertStringValue(xmlWriter, "dataperiodendyear", dm.EndDate.HasValue ? dm.EndDate.Value.ToShortDateString() : ""); InsertStringValue(xmlWriter, "dataupdatefrequency", dm.DataUpdateFrequency); xmlWriter.WriteEndElement(); // end header element #endregion #region Data Domains xmlWriter.WriteStartElement("datadomains"); //InPatient Encounters xmlWriter.WriteStartElement("inpatientencounters"); InsertStringValue(xmlWriter, "value", dm.InpatientEncountersAny.ToString()); InsertStringValue(xmlWriter, "encounterid", dm.InpatientEncountersEncounterID.ToString()); InsertStringValue(xmlWriter, "dateofservice", dm.InpatientDatesOfService.ToString()); InsertStringValue(xmlWriter, "providerfacilityid", dm.InpatientEncountersProviderIdentifier.ToString()); InsertStringValue(xmlWriter, "icd9diagnosis", dm.InpatientICD9Diagnosis.ToString()); InsertStringValue(xmlWriter, "icd10diagnosis", dm.InpatientICD10Diagnosis.ToString()); InsertStringValue(xmlWriter, "icd9procedure", dm.InpatientICD9Procedures.ToString()); InsertStringValue(xmlWriter, "icd10procedure", dm.InpatientICD10Procedures.ToString()); InsertStringValue(xmlWriter, "dischargestatus", dm.InpatientDischargeStatus.ToString()); InsertStringValue(xmlWriter, "disposition", dm.InpatientDisposition.ToString()); InsertStringValue(xmlWriter, "hphcs", dm.InpatientHPHCS.ToString()); InsertStringValue(xmlWriter, "snomed", dm.InpatientSNOMED.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.InpatientOther.ToString(), "name", dm.InpatientOtherText); xmlWriter.WriteEndElement(); // end inpatientencounters element //outpatient Encounters xmlWriter.WriteStartElement("outpatientencounters"); InsertStringValue(xmlWriter, "value", dm.OutpatientEncountersAny.ToString()); InsertStringValue(xmlWriter, "encounterid", dm.OutpatientEncountersEncounterID.ToString()); InsertStringValue(xmlWriter, "dateofservice", dm.OutpatientDatesOfService.ToString()); InsertStringValue(xmlWriter, "providerfacilityid", dm.OutpatientEncountersProviderIdentifier.ToString()); InsertStringValue(xmlWriter, "icd9diagnosis", dm.OutpatientICD9Diagnosis.ToString()); InsertStringValue(xmlWriter, "icd10diagnosis", dm.OutpatientICD10Diagnosis.ToString()); InsertStringValue(xmlWriter, "icd9procedure", dm.OutpatientICD9Procedures.ToString()); InsertStringValue(xmlWriter, "icd10procedure", dm.OutpatientICD10Procedures.ToString()); InsertStringValue(xmlWriter, "hphcs", dm.OutpatientHPHCS.ToString()); InsertStringValue(xmlWriter, "snomed", dm.OutpatientSNOMED.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.OutpatientOther.ToString(), "name", dm.OutpatientOtherText); xmlWriter.WriteEndElement(); // end outpatientencounters element //enrollment Encounters //xmlWriter.WriteStartElement("enrollmentencounters"); //InsertStringValue(xmlWriter, "patientid", dm.ERPatientID.ToString()); //InsertStringValue(xmlWriter, "encounterid", dm.EREncounterID.ToString()); //InsertStringValue(xmlWriter, "enrollmentdates", dm.ERICD9Diagnosis.ToString()); //InsertStringValue(xmlWriter, "encounterdates", dm.ERICD10Diagnosis.ToString()); //InsertStringValue(xmlWriter, "clinicalsettings", dm.ERClinicalSetting.ToString()); //InsertStringValue(xmlWriter, "icd9diagnosis", dm.ERICD9Diagnosis.ToString()); //InsertStringValue(xmlWriter, "icd10diagnosis", dm.ERICD10Diagnosis.ToString()); //InsertStringValue(xmlWriter, "hphcs", dm.ERHPHCS.ToString()); //InsertStringValue(xmlWriter, "ndc", dm.ERNDC.ToString()); //InsertStringValue(xmlWriter, "snomed", dm.ERSNOMED.ToString()); //InsertStringValue(xmlWriter, "provideridentiier", dm.ERProviderIdentifier.ToString()); //InsertStringValue(xmlWriter, "providerfacility", dm.ERProviderFacility.ToString()); //InsertStringValue(xmlWriter, "encountertype", dm.EREncounterType.ToString()); //InsertStringValue(xmlWriter, "drg", dm.ERDRG.ToString()); //InsertStringValue(xmlWriter, "drgtype", dm.ERDRGType.ToString()); //InsertStringValueWithAttribute(xmlWriter, "other", dm.EROther.ToString(), "name", dm.EROtherText); //xmlWriter.WriteEndElement(); // end enrollmentencounters element //Laboratory Results xmlWriter.WriteStartElement("laboratoryresults"); InsertStringValue(xmlWriter, "value", dm.LaboratoryResultsAny.ToString()); InsertStringValue(xmlWriter, "orderdates", dm.LaboratoryResultsOrderDates.ToString()); InsertStringValue(xmlWriter, "resultdates", dm.LaboratoryResultsDates.ToString()); InsertStringValue(xmlWriter, "testname", dm.LaboratoryResultsTestName.ToString()); InsertStringValue(xmlWriter, "testdescription", dm.LaboratoryResultsTestDescriptions.ToString()); InsertStringValue(xmlWriter, "testloinc", dm.LaboratoryResultsTestLOINC.ToString()); InsertStringValue(xmlWriter, "testsnomed", dm.LaboratoryResultsTestSNOMED.ToString()); InsertStringValue(xmlWriter, "testresultsinterpretation", dm.LaboratoryResultsTestResultsInterpretation.ToString()); InsertStringValueWithAttribute(xmlWriter, "testother", dm.LaboratoryResultsTestOther.ToString(), "name", dm.LaboratoryResultsTestOtherText); xmlWriter.WriteEndElement(); // end laboratoryresults element //prescription orders xmlWriter.WriteStartElement("prescriptionorders"); InsertStringValue(xmlWriter, "value", dm.PrescriptionOrdersAny.ToString()); InsertStringValue(xmlWriter, "ndc", dm.PrescriptionOrderNDC.ToString()); InsertStringValue(xmlWriter, "rxnorm", dm.PrescriptionOrderRxNorm.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.PrescriptionOrderOther.ToString(), "name", dm.PrescriptionOrderOtherText); xmlWriter.WriteEndElement(); // end prescription orders element //pharmacy dispensings xmlWriter.WriteStartElement("pharmacydispensings"); InsertStringValue(xmlWriter, "value", dm.PharmacyDispensingAny.ToString()); InsertStringValue(xmlWriter, "dates", dm.PharmacyDispensingDates.ToString()); InsertStringValue(xmlWriter, "ndc", dm.PharmacyDispensingNDC.ToString()); InsertStringValue(xmlWriter, "rxnorm", dm.PharmacyDispensingRxNorm.ToString()); InsertStringValue(xmlWriter, "dayssupply", dm.PharmacyDispensingDaysSupply.ToString()); InsertStringValue(xmlWriter, "amountdispensed", dm.PharmacyDispensingAmountDispensed.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.PharmacyDispensingOther.ToString(), "name", dm.PharmacyDispensingOtherText); xmlWriter.WriteEndElement(); // end pharmacy dispensings element //demographics xmlWriter.WriteStartElement("demographics"); InsertStringValue(xmlWriter, "value", dm.DemographicsAny.ToString()); InsertStringValue(xmlWriter, "patientid", dm.DemographicsPatientID.ToString()); InsertStringValue(xmlWriter, "sex", dm.DemographicsSex.ToString()); InsertStringValue(xmlWriter, "dateofbirth", dm.DemographicsDateOfBirth.ToString()); InsertStringValue(xmlWriter, "dateofdeath", dm.DemographicsDateOfDeath.ToString()); InsertStringValue(xmlWriter, "address", dm.DemographicsAddressInfo.ToString()); InsertStringValue(xmlWriter, "race", dm.DemographicsRace.ToString()); InsertStringValue(xmlWriter, "ethnicity", dm.DemographicsEthnicity.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.DemographicsOther.ToString(), "name", dm.DemographicsOtherText); xmlWriter.WriteEndElement(); // end demographics element //patient reported outcomes xmlWriter.WriteStartElement("patientreportedoutcomes"); InsertStringValue(xmlWriter, "value", dm.PatientOutcomesAny.ToString()); InsertStringValue(xmlWriter, "healthbehavior", dm.PatientOutcomesHealthBehavior.ToString()); InsertStringValue(xmlWriter, "hrqol", dm.PatientOutcomesHRQoL.ToString()); InsertStringValue(xmlWriter, "reportedoutcome", dm.PatientOutcomesReportedOutcome.ToString()); //InsertStringValueWithAttribute(xmlWriter, "instruments", dm.PatientOutcomesInstruments.ToString(), "name", dm.PatientOutcomesInstrumentText); InsertStringValueWithAttribute(xmlWriter, "other", dm.PatientOutcomesOther.ToString(), "name", dm.PatientOutcomesOtherText); xmlWriter.WriteEndElement(); // end patient reported outcomes element //patient reported behavior //xmlWriter.WriteStartElement("patientreportedbehavior"); //InsertStringValue(xmlWriter, "healthbehavior", dm.PatientOutcomesHealthBehavior.ToString()); //InsertStringValueWithAttribute(xmlWriter, "instruments", dm.PatientBehaviorInstruments.ToString(), "name", dm.PatientBehaviorInstrumentText); //InsertStringValueWithAttribute(xmlWriter, "other", dm.PatientBehaviorOther.ToString(), "name", dm.PatientBehaviorOtherText); //xmlWriter.WriteEndElement(); // end patient reported behavior element //vital signs xmlWriter.WriteStartElement("vitalsigns"); InsertStringValue(xmlWriter, "value", dm.VitalSignsAny.ToString()); InsertStringValue(xmlWriter, "temperature", dm.VitalSignsTemperature.ToString()); InsertStringValue(xmlWriter, "height", dm.VitalSignsHeight.ToString()); InsertStringValue(xmlWriter, "weight", dm.VitalSignsWeight.ToString()); InsertStringValue(xmlWriter, "bmi", dm.VitalSignsBMI.ToString()); InsertStringValue(xmlWriter, "bloodpressure", dm.VitalSignsBloodPressure.ToString()); InsertStringValueWithAttribute(xmlWriter, "other", dm.VitalSignsOther.ToString(), "name", dm.VitalSignsOtherText); xmlWriter.WriteEndElement(); // end vital signs outcomes element //longtitudinal capture xmlWriter.WriteStartElement("longtitudinalcapture"); InsertStringValue(xmlWriter, "value", dm.LongitudinalCaptureAny.ToString()); InsertStringValue(xmlWriter, "patientid", dm.LongitudinalCapturePatientID.ToString()); InsertStringValue(xmlWriter, "capturestart", dm.LongitudinalCaptureStart.ToString()); InsertStringValue(xmlWriter, "capturestop", dm.LongitudinalCaptureStop.ToString()); InsertStringValue(xmlWriter, "other", dm.LongitudinalCaptureOther.ToString()); xmlWriter.WriteEndElement(); // end longtitudinal capture //bio repositories xmlWriter.WriteStartElement("biorepositories"); InsertStringValue(xmlWriter, "value", dm.BiorepositoriesAny.ToString()); //InsertStringValue(xmlWriter, "name", dm.BiorepositoriesName.ToString()); //InsertStringValue(xmlWriter, "description", dm.BiorepositoriesDescription.ToString()); //InsertStringValue(xmlWriter, "diseasename", dm.BiorepositoriesDiseaseName.ToString()); //InsertStringValue(xmlWriter, "specimensource", dm.BiorepositoriesSpecimenSource.ToString()); //InsertStringValue(xmlWriter, "specimenttype", dm.BiorepositoriesSpecimenType.ToString()); //InsertStringValue(xmlWriter, "processingmethod", dm.BiorepositoriesProcessingMethod.ToString()); //InsertStringValue(xmlWriter, "snomed", dm.BiorepositoriesSNOMED.ToString()); //InsertStringValue(xmlWriter, "storagemethod", dm.BiorepositoriesStorageMethod.ToString()); //InsertStringValueWithAttribute(xmlWriter, "other", dm.BiorepositoriesOther.ToString(), "name", dm.BiorepositoriesOtherText); xmlWriter.WriteEndElement(); // end bio repositories outcomes element xmlWriter.WriteEndElement(); // end datadomain element #endregion #region Installed Models xmlWriter.WriteStartElement("installedmodels"); var pluginModels = plugins.GetAllPlugins().SelectMany(p => p.Models.Select(m => new { p, m })); foreach (var mm in dm.Models) { var m = mm; IDnsModel model = null; if (pluginModels.Any(pm => pm.m.ID == m.ModelID)) { model = pluginModels.Where(pm => pm.m.ID == m.ModelID).Select(pm => pm.m).FirstOrDefault(); InsertStringValue(xmlWriter, "name", model.Name); } } ; xmlWriter.WriteEndElement(); // end installed models element #endregion xmlWriter.WriteEndElement(); // end data mart element xmlWriter.Flush(); } ; xmlWriter.WriteEndElement(); // end datamarts element xmlWriter.WriteEndDocument(); } catch (Exception ex) { throw ex; } finally { //xmlWriter.Close(); } }
private void ReloadData() { Conversation_Data = DataMart.GetConversation(ConversationID); conversation = ConversationManager.instance.CreateConversation(Conversation_Data); }
public AclEditModel RequestTypesAcl(Project project = null, Organization organization = null, DataMart dataMart = null) { throw new Lpp.Utilities.CodeToBeUpdatedException(); //var projObj = project ?? VirtualSecObjects.AllProjects; //var orgObj = organization ?? VirtualSecObjects.AllOrganizations; //var dmObj = dataMart ?? VirtualSecObjects.AllDataMarts; //return new AclEditModel //{ // Entries = RequestTypesEntriesForEdit(projObj, orgObj, dmObj), // PrivilegeEditors = new[] { RequestTypesPrivilegesEditor(projObj, orgObj, dmObj) }, // SubjectSelector = html => project == null ? html.SubjectsSelector(true) : html.ProjectSubjectSelector(project, true) //}; }
public async Task AddEntityOptimizationsAsync(EntityExecution entityExecution, Entity entity, DataMart dataMart, CancellationToken cancellationToken) { // no op await Task.CompletedTask; }
public static void BuildItemDatabase() { //Clear the item database to start fresh. DataMart.ClearItemDatabase(); ItemData data = new ItemData( 0, "Two of Clubs", "A low value card of clubs, usually sold for easy money.", 25, "Icons/Card/2clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 1, "Two of Diamonds", "A low value card of diamonds, usually sold for easy money.", 25, "Icons/Card/2diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 2, "Two of Hearts", "A low value card of hearts, usually sold for easy money.", 25, "Icons/Card/2hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 3, "Two of Spades", "A low value card of spades, usually sold for easy money.", 25, "Icons/Card/2spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 4, "Three of Clubs", "A low value card of clubs, usually sold for easy money.", 50, "Icons/Card/3clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 5, "Three of Diamonds", "A low value card of diamonds, usually sold for easy money.", 50, "Icons/Card/3diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 6, "Three of Hearts", "A low value card of hearts, usually sold for easy money.", 50, "Icons/Card/3hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 7, "Three of Spades", "A low value card of spades, usually sold for easy money.", 50, "Icons/Card/3spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 8, "Four of Clubs", "A low value card of clubs, usually sold for easy money.", 100, "Icons/Card/4clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 9, "Four of Diamonds", "A low value card of diamonds, usually sold for easy money.", 100, "Icons/Card/4diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 10, "Four of Hearts", "A low value card of hearts, usually sold for easy money.", 100, "Icons/Card/4hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 11, "Four of Spades", "A low value card of spades, usually sold for easy money.", 100, "Icons/Card/4spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 12, "Five of Clubs", "A low value card of clubs, usually sold for easy money.", 150, "Icons/Card/5clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 13, "Five of Diamonds", "A low value card of diamonds, usually sold for easy money.", 150, "Icons/Card/5diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 14, "Five of Hearts", "A low value card of hearts, usually sold for easy money.", 150, "Icons/Card/5hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 15, "Five of Spades", "A low value card of spades, usually sold for easy money.", 150, "Icons/Card/5spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 16, "Six of Clubs", "A moderate value card of clubs, usually sold for pretty good money.", 500, "Icons/Card/6clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 17, "Six of Diamonds", "A moderate value card of diamonds, usually sold for pretty good money.", 500, "Icons/Card/6diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 18, "Six of Hearts", "A moderate value card of hearts, usually sold for pretty good money.", 500, "Icons/Card/6hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 19, "Six of Spades", "A moderate value card of spades, usually sold for pretty good money.", 500, "Icons/Card/6spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 20, "Seven of Clubs", "A moderate value card of clubs, usually sold for pretty good money.", 600, "Icons/Card/7clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 21, "Seven of Diamonds", "A moderate value card of diamonds, usually sold for pretty good money.", 600, "Icons/Card/7diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 22, "Seven of Hearts", "A moderate value card of hearts, usually sold for pretty good money.", 600, "Icons/Card/7hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 23, "Seven of Spades", "A moderate value card of spades, usually sold for pretty good money.", 600, "Icons/Card/7spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 24, "Eight of Clubs", "A moderate value card of clubs, usually sold for pretty good money.", 750, "Icons/Card/8clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 25, "Eight of Diamonds", "A moderate value card of diamonds, usually sold for pretty good money.", 750, "Icons/Card/8diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 26, "Eight of Hearts", "A moderate value card of hearts, usually sold for pretty good money.", 750, "Icons/Card/8hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 27, "Eight of Spades", "A moderate value card of spades, usually sold for pretty good money.", 750, "Icons/Card/8spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 28, "Nine of Clubs", "A moderate value card of clubs, usually sold for pretty good money.", 850, "Icons/Card/9clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 29, "Nine of Diamonds", "A moderate value card of diamonds, usually sold for pretty good money.", 850, "Icons/Card/9diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 30, "Nine of Hearts", "A moderate value card of hearts, usually sold for pretty good money.", 850, "Icons/Card/9hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 31, "Nine of Spades", "A moderate value card of spades, usually sold for pretty good money.", 850, "Icons/Card/9spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 32, "Ten of Clubs", "A moderate value card of clubs, usually sold for pretty good money.", 1000, "Icons/Card/10clubs", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 33, "Ten of Diamonds", "A moderate value card of diamonds, usually sold for pretty good money.", 1000, "Icons/Card/10diamonds", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 34, "Ten of Hearts", "A moderate value card of hearts, usually sold for pretty good money.", 1000, "Icons/Card/10hearts", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 35, "Ten of Spades", "A moderate value card of spades, usually sold for pretty good money.", 1000, "Icons/Card/10spades", ItemData.ItemType.Valuable); DataMart.AddItem(data); data = new ItemData( 36, "Jack of Clubs", "A high value card of clubs that is worth a small fortune. Having one in your possession allows you to go places.", 1500, "Icons/Card/jackclubs", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 37, "Jack of Diamonds", "A high value card of diamonds that is worth a small fortune. Having one in your possession allows you to go places.", 1500, "Icons/Card/jackdiamonds", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 38, "Jack of Hearts", "A high value card of hearts that is worth a small fortune. Having one in your possession allows you to go places.", 1500, "Icons/Card/jackhearts", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 39, "Jack of Spades", "A high value card of spades that is worth a small fortune. Having one in your possession allows you to go places.", 1500, "Icons/Card/jackspades", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 40, "Queen of Clubs", "A high value card of clubs that is worth a small fortune. Having one in your possession allows you to go places.", 2000, "Icons/Card/queenclubs", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 41, "Queen of Diamonds", "A high value card of diamonds that is worth a small fortune. Having one in your possession allows you to go places.", 2000, "Icons/Card/queendiamonds", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 42, "Queen of Hearts", "A high value card of hearts that is worth a small fortune. Having one in your possession allows you to go places.", 2000, "Icons/Card/queenhearts", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 43, "Queen of Spades", "A high value card of spades that is worth a small fortune. Having one in your possession allows you to go places.", 2000, "Icons/Card/queenspades", ItemData.ItemType.KeyItem); DataMart.AddItem(data); data = new ItemData( 44, "King of Clubs", "A high value card of clubs that is worth a small fortune. Having one in your possession allows you to go places.", 3000, "Icons/Card/kingclubs", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 45, "King of Diamonds", "A high value card of diamonds that is worth a small fortune. Having one in your possession allows you to go places.", 3000, "Icons/Card/kingdiamonds", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 46, "King of Hearts", "A high value card of hearts that is worth a small fortune. Having one in your possession allows you to go places.", 3000, "Icons/Card/kinghearts", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 47, "King of Spades", "A high value card of spades that is worth a small fortune. Having one in your possession allows you to go places.", 3000, "Icons/Card/kingspades", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 48, "Ace of Clubs", "Merchants see no value in this card of clubs..it must be good for something.", 0, "Icons/Card/aceclubs", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 49, "Ave of Diamonds", "Merchants see no value in this card of diamonds..it must be good for something.", 0, "Icons/Card/acediamonds", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 50, "Ace of Hearts", "Merchants see no value in this card of hearts..it must be good for something.", 0, "Icons/Card/acehearts", ItemData.ItemType.Quest); DataMart.AddItem(data); data = new ItemData( 51, "Ace of Spades", "Merchants see no value in this card of spades..it must be good for something.", 0, "Icons/Card/acespades", ItemData.ItemType.Quest); DataMart.AddItem(data); }
public static void Main(string[] args) { try { var bindingExecution = new BindingExecution(); // ReSharper disable once StringLiteralTypo const string DatabaseName = "SAMHCOS"; // ReSharper disable once StringLiteralTypo const string SchemaName = "HCOSText"; const int DestinationEntityId = 1; const int DataEntityId = 2; const int PatientEntityId = 3; const int VisitEntityId = 4; const int VisitFacilityEntityId = 5; const string ChildObjectType = "Binding"; const string BindingType = "Nested"; const string DestinationEntityName = "3GenNestedDestinationEntity"; const string DataEntityName = "Data"; const string PatientEntityName = "Patient"; const string VisitEntityName = "Visit"; const string VisitFacilityEntityName = "VisitFacility"; const int NestedDataBindingId = 102; const int NestedPatientBindingId = 103; const int NestedVisitBindingId = 104; const int NestedVisitFacilityBindingId = 105; const string AttributeGenerationGap = "GenerationGap"; const string AttributeParentKeyFields = "ParentKeyFields"; const string AttributeChildKeyFields = "ChildKeyFields"; const string AttributeCardinality = "Cardinality"; const string AttributeValueSingleObject = "SingleObject"; const string PatientKey = "PatientKEY"; const string VisitKey = "VisitKEY"; const string VisitFacilityKey = "VisitFacilityKEY"; var dataMart = new DataMart(); dataMart.Entities.Add(new Entity { Id = DestinationEntityId, EntityName = DestinationEntityName, DatabaseName = DatabaseName, SchemaName = SchemaName }); dataMart.Entities.Add(new Entity { Id = DataEntityId, EntityName = DataEntityName, DatabaseName = DatabaseName, SchemaName = SchemaName }); dataMart.Entities.Add(new Entity { Id = PatientEntityId, EntityName = PatientEntityName, DatabaseName = DatabaseName, SchemaName = SchemaName }); dataMart.Entities.Add(new Entity { Id = VisitEntityId, EntityName = VisitEntityName, DatabaseName = DatabaseName, SchemaName = SchemaName }); dataMart.Entities.Add(new Entity { Id = VisitFacilityEntityId, EntityName = VisitFacilityEntityName, DatabaseName = DatabaseName, SchemaName = SchemaName }); var dataEntity = dataMart.Entities.First(entity => entity.Id == DataEntityId); dataEntity.Fields.Add(new Field { IsPrimaryKey = true, FieldName = "TextKEY" }); dataEntity.Fields.Add(new Field { FieldName = "root" }); dataEntity.Fields.Add(new Field { FieldName = "extension" }); dataEntity.Fields.Add(new Field { FieldName = "extension_suffix" }); dataEntity.Fields.Add(new Field { FieldName = "data" }); dataEntity.Fields.Add(new Field { FieldName = "base64_data" }); dataEntity.Fields.Add(new Field { FieldName = "data_format" }); dataEntity.Fields.Add(new Field { FieldName = "source_last_modified_at" }); dataEntity.Fields.Add(new Field { FieldName = "source_versioned_at" }); var patientEntity = dataMart.Entities.First(entity => entity.Id == PatientEntityId); patientEntity.Fields.Add(new Field { FieldName = "extension" }); patientEntity.Fields.Add(new Field { FieldName = "root" }); patientEntity.Fields.Add(new Field { FieldName = "last_name" }); patientEntity.Fields.Add(new Field { FieldName = "first_name" }); patientEntity.Fields.Add(new Field { FieldName = "middle_name" }); patientEntity.Fields.Add(new Field { FieldName = "gender" }); patientEntity.Fields.Add(new Field { FieldName = "date_of_birth" }); var visitEntity = dataMart.Entities.First(entity => entity.Id == VisitEntityId); visitEntity.Fields.Add(new Field { FieldName = "extension" }); visitEntity.Fields.Add(new Field { FieldName = "root" }); visitEntity.Fields.Add(new Field { FieldName = "admitted_at" }); visitEntity.Fields.Add(new Field { FieldName = "discharged_at" }); var visitFacilityEntity = dataMart.Entities.First(entity => entity.Id == VisitFacilityEntityId); visitFacilityEntity.Fields.Add(new Field { FieldName = "extension" }); visitFacilityEntity.Fields.Add(new Field { FieldName = "root" }); var destinationEntity = dataMart.Entities.First(entity => entity.Id == DestinationEntityId); destinationEntity.Fields.Add(new Field { IsPrimaryKey = true, FieldName = "TextKEY" }); dataEntity.Fields.ForEach( field => destinationEntity.Fields.Add( new Field { FieldName = $"{DataEntityName}_{field.FieldName}" })); patientEntity.Fields.ForEach( field => destinationEntity.Fields.Add( new Field { FieldName = $"{PatientEntityName}_{field.FieldName}" })); visitEntity.Fields.ForEach( field => destinationEntity.Fields.Add( new Field { FieldName = $"{VisitEntityName}_{field.FieldName}" })); dataMart.Bindings.Add(new Binding { Id = NestedDataBindingId, DestinationEntityId = DestinationEntityId, ContentId = Guid.NewGuid(), Classification = "Generic", Name = "NestedBinding" + DataEntityName, BindingType = BindingType, Status = "Active", LoadTypeCode = "Full", SourcedByEntities = { new SourceEntityReference { SourceEntityId = DataEntityId } } }); dataMart.Bindings.Add(new Binding { Id = NestedPatientBindingId, DestinationEntityId = DestinationEntityId, ContentId = Guid.NewGuid(), Classification = "Generic", Name = "NestedBinding" + PatientEntityName, BindingType = BindingType, Status = "Active", LoadTypeCode = "Full", SourcedByEntities = { new SourceEntityReference { SourceEntityId = PatientEntityId } } }); dataMart.Bindings.Add(new Binding { Id = NestedVisitBindingId, DestinationEntityId = DestinationEntityId, ContentId = Guid.NewGuid(), Classification = "Generic", Name = "NestedBinding" + VisitEntityName, BindingType = BindingType, Status = "Active", LoadTypeCode = "Full", SourcedByEntities = { new SourceEntityReference { SourceEntityId = VisitEntityId } } }); dataMart.Bindings.Add(new Binding { Id = NestedVisitFacilityBindingId, DestinationEntityId = DestinationEntityId, ContentId = Guid.NewGuid(), Classification = "Generic", Name = "NestedBinding" + VisitFacilityEntityName, BindingType = BindingType, Status = "Active", LoadTypeCode = "Full", SourcedByEntities = { new SourceEntityReference { SourceEntityId = VisitFacilityEntityId } } }); // relate Data to Patient on PatientKEY dataMart.Bindings.First(binding => binding.Id == NestedDataBindingId).ObjectRelationships.Add( new ObjectReference { ChildObjectType = ChildObjectType, ChildObjectId = NestedPatientBindingId, AttributeValues = new List <ObjectAttributeValue> { new ObjectAttributeValue { AttributeName = AttributeGenerationGap, AttributeValue = "1" }, new ObjectAttributeValue { AttributeName = AttributeParentKeyFields, AttributeValue = $"[\"{PatientKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeChildKeyFields, AttributeValue = $"[\"{PatientKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeCardinality, AttributeValue = AttributeValueSingleObject } } }); // relate Data to Visit on VisitKEY dataMart.Bindings.First(binding => binding.Id == NestedDataBindingId).ObjectRelationships.Add( new ObjectReference { ChildObjectType = ChildObjectType, ChildObjectId = NestedVisitBindingId, AttributeValues = new List <ObjectAttributeValue> { new ObjectAttributeValue { AttributeName = AttributeGenerationGap, AttributeValue = "1" }, new ObjectAttributeValue { AttributeName = AttributeParentKeyFields, AttributeValue = $"[\"{VisitKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeChildKeyFields, AttributeValue = $"[\"{VisitKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeCardinality, AttributeValue = AttributeValueSingleObject } } }); dataMart.Bindings.First(binding => binding.Id == NestedDataBindingId).ObjectRelationships.Add( new ObjectReference { ChildObjectType = ChildObjectType, ChildObjectId = NestedVisitFacilityBindingId, AttributeValues = new List <ObjectAttributeValue> { new ObjectAttributeValue { AttributeName = AttributeGenerationGap, AttributeValue = "2" }, new ObjectAttributeValue { AttributeName = AttributeParentKeyFields, AttributeValue = $"[\"{VisitFacilityKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeChildKeyFields, AttributeValue = $"[\"{VisitFacilityKey}\"]" }, new ObjectAttributeValue { AttributeName = AttributeCardinality, AttributeValue = AttributeValueSingleObject } } }); var unityContainer = new UnityContainer(); var testMetadataServiceClient = new TestMetadataServiceClient(); testMetadataServiceClient.Init(dataMart); unityContainer.RegisterInstance <IMetadataServiceClient>(testMetadataServiceClient); var testProcessingContextWrapper = new TestProcessingContextWrapper(); unityContainer.RegisterInstance <IProcessingContextWrapperFactory>(new TestProcessingContextWrapperFactory(testProcessingContextWrapper)); var testLoggingRepository = new TestLoggingRepository(); unityContainer.RegisterInstance <ILoggingRepository>(testLoggingRepository); var pluginLoader = new PluginLoader(); pluginLoader.LoadPlugins(); pluginLoader.RegisterPlugins(unityContainer); var hierarchicalDataTransformer = pluginLoader.GetPluginOfExactType <IDataTransformer>("HierarchicalDataTransformer"); if (hierarchicalDataTransformer == null) { throw new Exception("Plugin was not found"); } else { Console.WriteLine(@"Successfully loaded plugin"); } var canHandle = hierarchicalDataTransformer.CanHandle( bindingExecution, dataMart.Bindings.First(), dataMart.Entities.First()); if (!canHandle) { throw new Exception("CanHandle return false"); } else { Console.WriteLine(@"CanHandle was successful"); } var transformDataAsync = hierarchicalDataTransformer.TransformDataAsync( bindingExecution, dataMart.Bindings.First(), dataMart.Entities.First(), CancellationToken.None) .Result; } catch (Exception e) { Console.WriteLine(e); Console.ReadKey(); } }
public async Task <long> PromoteStagedDataAsync(EntityExecution entityExecution, Entity entity, DataMart dataMart, CancellationToken cancellationToken) { // no op: Databus takes care of this await Task.CompletedTask; return(Convert.ToInt64(0)); }
public static void BuildConversationDataBase() { DataMart.ClearConversationDatabase(); //Orc Farmer Conversation ConversationData conversation = new ConversationData(); conversation.NPCID = 1; conversation.ID = 1000; StepData step = new StepData(); step.Text = "Hey can you do something for me?"; OptionData option = new OptionData(); option.ValueCheck = CompanyValue.ValueOne; option.DestinationID = 1; option.Trigger = OptionTrigger.QuestAcceptance; option.Text = "Sure OK."; step.OptionData[0] = option; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = 2; option.Text = "No."; step.OptionData.Add(option); conversation.StepData.Add(step); step = new StepData(); step.Text = "If you get me a <color=#0EA1FD>Five of Clubs Card</color> I'll <color=#C2C34D>Reward</color> you."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = -1; option.Text = "End Conversation"; step.OptionData.Add(option); conversation.StepData.Add(step); step = new StepData(); step.Text = "Leave me be then beggar."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = -1; option.Text = "End Conversation"; step.OptionData.Add(option); conversation.StepData.Add(step); DataMart.AddConversation(conversation); //Orc Farmer #2 Conversation conversation = new ConversationData(); conversation.NPCID = 1; conversation.ID = 1001; step = new StepData(); step.Text = "Wow you got it! Here take this <color=#0EA1FD>Ace Card</color>"; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.DestinationID = 1; option.Text = "Thankyou! Ah..What does it do?"; option.Trigger = OptionTrigger.None; step.OptionData[0] = option; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = 2; option.Text = "Hmm another card.."; step.OptionData.Add(option); conversation.StepData.Add(step); step = new StepData(); step.Text = "I dont know."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.ObtainQuestReward; option.DestinationID = -1; option.Text = "End Conversation"; step.OptionData.Add(option); conversation.StepData.Add(step); step = new StepData(); step.Text = "Never pleased are you? well don't take it then."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = -1; option.Text = "End Conversation"; step.OptionData.Add(option); conversation.StepData.Add(step); DataMart.AddConversation(conversation); //Orc Farmer #3 Conversation conversation = new ConversationData(); conversation.NPCID = 1; conversation.ID = 1002; step = new StepData(); step.Text = "I gave you everything already."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.DestinationID = -1; option.Text = "End Conversation"; option.Trigger = OptionTrigger.None; step.OptionData.Add(option); conversation.StepData.Add(step); DataMart.AddConversation(conversation); //Orc Farmer #4 conversation = new ConversationData(); conversation.NPCID = 1; conversation.ID = 1003; step = new StepData(); step.Text = "Come on, go get me what I want."; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.DestinationID = -1; option.Text = "End Conversation"; option.Trigger = OptionTrigger.None; step.OptionData.Add(option); conversation.StepData.Add(step); DataMart.AddConversation(conversation); //Lil Mushy Conversation conversation = new ConversationData(); conversation.NPCID = 2; conversation.ID = 2000; step = new StepData(); step.Text = "So..Another idiot that goes around trying to talk to mushrooms..Are you stupid?"; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = 1; option.Text = "Ah..No!"; step.OptionData.Add(option); conversation.StepData.Add(step); step = new StepData(); step.Text = "OMG...You don't even blink at the fact I answered back...you are stupid!"; option = new OptionData(); option.ValueCheck = CompanyValue.NULL; option.Trigger = OptionTrigger.None; option.DestinationID = -1; option.Text = "End Conversation"; step.OptionData.Add(option); conversation.StepData.Add(step); DataMart.AddConversation(conversation); }
private void Start() { //Read files from streaming assets and populate DataMart databases. StartCoroutine(DataMart.LoadAllDatabasesFromFile()); }