Archived
1
0

Compare commits

..

5 Commits

3 changed files with 21 additions and 9 deletions

View File

@@ -83,6 +83,7 @@ namespace NonaBGS.BGS {
private string BuildMissionList(Objective objective) { private string BuildMissionList(Objective objective) {
Dictionary<string, Dictionary<string, int>> collated = new Dictionary<string, Dictionary<string, int>>(); Dictionary<string, Dictionary<string, int>> collated = new Dictionary<string, Dictionary<string, int>>();
StringBuilder output = new StringBuilder(); StringBuilder output = new StringBuilder();
int total_influence = 0;
var missions = from entries in objective.LogEntries var missions = from entries in objective.LogEntries
where entries.GetType() == typeof(MissionCompleted) where entries.GetType() == typeof(MissionCompleted)
@@ -102,6 +103,8 @@ namespace NonaBGS.BGS {
} }
++collated[m.MissionName][m.Influence]; ++collated[m.MissionName][m.Influence];
total_influence += m.Influence.Length;
} }
foreach (var mission in collated) { foreach (var mission in collated) {
@@ -118,6 +121,8 @@ namespace NonaBGS.BGS {
output.Append(")\n\n"); output.Append(")\n\n");
} }
output.AppendFormat("Total Influence: {0}\n", total_influence);
return output.ToString(); return output.ToString();
} }

View File

@@ -26,20 +26,23 @@ namespace NonaBGS.BGS {
} }
} }
if (e.System != null && system != null && if (e.System != null && system != null) {
e.System == system) { if (string.Compare(e.System, system, true) == 0) {
++match_count; ++match_count;
} }
if (e.Station != null && station != null &&
e.Station == station) {
++match_count;
} }
if (e.Faction != null && faction != null && if (e.Station != null && station != null) {
e.Faction == faction) { if (string.Compare(e.Station, station, true) == 0) {
++match_count; ++match_count;
} }
}
if (e.Faction != null && faction != null) {
if (string.Compare(e.Faction, faction, true) == 0) {
++match_count;
}
}
return match_count; return match_count;
} }

View File

@@ -22,9 +22,13 @@ namespace NonaBGS.Journal {
{ "Mission_AltruismCredits_name", "Donate Credits" }, { "Mission_AltruismCredits_name", "Donate Credits" },
{ "Mission_AltruismCredits_Bust_name", "Donate Credits (Bust)" }, { "Mission_AltruismCredits_Bust_name", "Donate Credits (Bust)" },
{ "Mission_Collect_name", "Provide" }, { "Mission_Collect_name", "Provide" },
{ "Mission_Collect_Bust_name", "Provide (Bust)" },
{ "Mission_Collect_CivilLiberty_name", "Provide (Civil Liberty)" }, { "Mission_Collect_CivilLiberty_name", "Provide (Civil Liberty)" },
{ "Mission_Collect_Famine_name", "Provide (Famine)" },
{ "Mission_Courier_Democracy_name", "Courier (Democracy)" }, { "Mission_Courier_Democracy_name", "Courier (Democracy)" },
{ "Mission_Courier_Elections_name", "Courier (Elections)" }, { "Mission_Courier_Elections_name", "Courier (Elections)" },
{ "Mission_Courier_Famine_name", "Courier (Famine)" },
{ "Mission_Courier_Lockdown_name", "Courier (Lockdown)" },
{ "Mission_Courier_name", "Courier" }, { "Mission_Courier_name", "Courier" },
{ "Mission_Courier_RankEmp_name", "Courier (Empire)" }, { "Mission_Courier_RankEmp_name", "Courier (Empire)" },
{ "Mission_Delivery_Boom_name", "Delivery (Boom)" }, { "Mission_Delivery_Boom_name", "Delivery (Boom)" },