public override string ReportBody() { ReportBuilder.Clear(); ReportBuilder.AppendLine("Gross Budget: " + Utilities.Instance.GetGrossBudget()); ReportBuilder.AppendLine("Staff Wages: " + Costs.Instance.GetWageCosts()); ReportBuilder.AppendLine("Facility Maintenance Costs: " + Costs.Instance.GetFacilityMaintenanceCosts()); ReportBuilder.AppendLine("Launch Costs: " + Costs.Instance.GetLaunchCosts()); ReportBuilder.AppendLine("Total Maintenance Costs: " + Costs.Instance.GetTotalMaintenanceCosts()); ReportBuilder.AppendLine("Mission Bonuses: " + CrewManager.Instance.LastBonus); ReportBuilder.AppendLine("Construction Department: " + FacilityManager.Instance.GetAllocatedFunding()); ReportBuilder.AppendLine("Research Department: " + ResearchManager.Instance.GetAllocatedFunding()); double netBudget = Utilities.Instance.GetNetBudget("Budget"); ReportBuilder.AppendLine("Net Budget: " + Math.Max(0, netBudget)); if (netBudget > 0 && netBudget < Funding.Instance.Funds) { ReportBuilder.AppendLine("We can't justify extending your funding"); } // ReSharper disable once InvertIf if (netBudget < 0) { ReportBuilder.AppendLine("The budget didn't fully cover your space programs costs."); ReportBuilder.Append("A penalty of " + Math.Round(netBudget, 0) + " will be applied"); } return(ReportBuilder.ToString()); }
public override string ReportBody() { ReportBuilder.Clear(); Dictionary <CrewMember, string> unhappyCrew = CrewManager.Instance.UnhappyCrewOutcomes; if (unhappyCrew.Count == 0) { return("No Crew Issues"); } for (int i = 0; i < unhappyCrew.Count; i++) { KeyValuePair <CrewMember, string> unhappyCrewMember = unhappyCrew.ElementAt(i); ReportBuilder.AppendLine(unhappyCrewMember.Key.Name + ": " + unhappyCrewMember.Value); } if (SettingsClass.Instance.RetirementEnabled) { CrewManager.Instance.ProcessQuitters(); for (int i = 0; i < CrewManager.Instance.Retirees.Count; i++) { string s = CrewManager.Instance.Retirees.ElementAt(i); ReportBuilder.AppendLine(s + " has retired"); } } return(ReportBuilder.ToString()); }
public override string ReportBody() { ReportBuilder.Clear(); for (int i = 0; i < FacilityManager.Instance.Facilities.Count; i++) { BureaucracyFacility bf = FacilityManager.Instance.Facilities.ElementAt(i); string s = bf.GetProgressReport(bf.Upgrade); if (bf.IsClosed) { ReportBuilder.AppendLine(bf.Name + " is closed"); } if (s == String.Empty) { continue; } ReportBuilder.AppendLine(s); } string report = ReportBuilder.ToString(); if (String.IsNullOrEmpty(report)) { report = "No Facility updates to report"; } return(report); }
private void GenerateReportIntro() { var fileName = Context.Controller.CurrentFileName; ReportBuilder.AppendLine("Aggregation analysis"); ReportBuilder.AppendLine("File, " + fileName); ReportBuilder.AppendLine("Action Line," + ActionLine); }
public override string ReportBody() { ReportBuilder.Clear(); for (int i = 0; i < ResearchManager.Instance.CompletedEvents.Count; i++) { ScienceEvent se = ResearchManager.Instance.CompletedEvents.ElementAt(i); float processedScience = se.OriginalScience; ReportBuilder.AppendLine(se.UiName + ": " + Math.Round(processedScience, 1) + "/" + se.OriginalScience); } for (int i = 0; i < ResearchManager.Instance.ProcessingScience.Count; i++) { ScienceEvent se = ResearchManager.Instance.ProcessingScience.ElementAt(i).Value; float processedScience = se.OriginalScience - se.RemainingScience; ReportBuilder.AppendLine(se.UiName + ": " + Math.Round(processedScience, 1) + "/" + Math.Round(se.OriginalScience, 1)); } ResearchManager.Instance.CompletedEvents.Clear(); return(ReportBuilder.ToString()); }
/// <summary> /// Generate the full report /// </summary> private void GenerateReport() { ReportBuilder.AppendLine(""); ProgressProvider.UpdateProgress("list nodes"); if (CFRFilePaths == null) { CFRFilePaths = new List <string>(); CFRFilePaths.Add(null); } int loop = 0; int loops = CFRFilePaths.Count; foreach (var path in CFRFilePaths) { loop++; if (path != null) { ProgressProvider.UpdateProgress("Load file " + loop + " out of " + loops); Context.ServerWrapper.LoadTree(path); Node = Context.ServerWrapper.RefreshNode(Node); } var similarNodes = FindSimilarNodesOnOtherBoards(Node); int total = similarNodes.Count; int progressNodeCount = 0; var root = Context.ServerWrapper.ShowRootNode(); var rootMatchups = Context.ServerWrapper.CalcEquityInNode(Context.ServerUtils.IP, root).TotalMatchups(); var results = new List <ReportLine>(); foreach (var singleNode in similarNodes) { progressNodeCount++; if (ProgressProvider.CancelRequested) { return; } if (loops > 1) { ProgressProvider.UpdateProgress("file " + loop + " out of " + loops + ". Analyse " + string.Join("", singleNode.Board.ToList()) + " " + progressNodeCount + " out of " + total); } else { ProgressProvider.UpdateProgress("Analyze " + string.Join("", singleNode.Board.ToList()) + " " + progressNodeCount + " out of " + total); } results.Add(ReportLine.CreateReportLineForNode(singleNode, this.Context)); } var summaryResult = ReportLine.ToSummaryCSVLine(results); if (loop == 1) { ReportBuilder.AppendLine(string.Join(",", GenerateHeaderNames(summaryResult.ActionNames))); } if (results.Count > 1) { ReportBuilder.AppendLine(string.Join(",", summaryResult.ToCSVLine(rootMatchups))); } foreach (var resultLine in results) { ReportBuilder.AppendLine(string.Join(",", resultLine.ToCSVLine(rootMatchups))); } } }