/// <summary> /// Cancels a current tracking service due to target being no longer available /// </summary> /// <param name="infoType"></param> public void CancelOrgInfoTracking(OrgInfoType orgInfoType) { //reset array to false (Not tracking anything) GameManager.i.dataScript.SetOrgInfoType(orgInfoType, false); //reset timer Organisation org = GameManager.i.campaignScript.campaign.orgInfo; if (org != null) { org.timer = 0; } else { Debug.LogError("Invalid orgInfo (Null)"); } }
/// <summary> /// Generates an OrgInfo effects tab message /// </summary> /// <param name="org"></param> public void ProcessOrgInfoEffectMessage(Organisation org, OrgInfoType orgType = OrgInfoType.Count) { //if default orginfoType.Count need to get correct type orgType = GameManager.i.dataScript.GetOrgInfoType(); string orgText = ""; switch (orgType) { case OrgInfoType.Nemesis: orgText = string.Format("Reporting the position of your {0}", GameManager.Formatt("Nemesis", ColourType.salmonText)); break; case OrgInfoType.ErasureTeams: orgText = string.Format("Reporting the position of any {0}", GameManager.Formatt("Erasure Teams", ColourType.salmonText)); break; case OrgInfoType.Npc: if (GameManager.i.missionScript.mission.npc != null) { orgText = string.Format("Reporting the position of the {0}", GameManager.Formatt(GameManager.i.missionScript.mission.npc.tag, ColourType.salmonText)); } break; default: Debug.LogWarningFormat("Unrecognised orgType \"{0}\"", orgType); break; } //effects tab message ActiveEffectData data = new ActiveEffectData() { text = string.Format("{0} active", org.tag.ToUpper()), topText = string.Format("{0} Direct Feed", org.tag), detailsTop = string.Format("{0} will continue to provide a direct feed for", GameManager.Formatt(org.tag, ColourType.neutralText)), detailsBottom = string.Format("{0} days{1}", GameManager.Formatt(Convert.ToString(org.timer), ColourType.neutralText), string.IsNullOrEmpty(orgText) == false ? string.Format("{0}{1}{2}", "\n", "\n", orgText) : ""), sprite = org.sprite, help0 = "orgInfo_0", help1 = "orgInfo_1", help2 = "orgInfo_2" }; GameManager.i.messageScript.ActiveEffect(data); }