Archived
1
0
This repository has been archived on 2021-10-19. You can view files and clone it, but cannot push or open issues or pull requests.
nonabgs/BGS/Cartographics.cs

39 lines
1.2 KiB
C#
Raw Normal View History

2021-07-09 11:03:30 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Threading.Tasks;
using NonaBGS.Journal;
namespace NonaBGS.BGS {
public class Cartographics : LogEntry {
public Cartographics(MultiSellExplorationDataEntry e, string current_system, string current_station) {
this.Entries.Add(e);
this.System = current_system;
this.Station = current_station;
}
public int TotalSum {
get {
return (from entry in Entries
where entry.Is(Events.MultiSellExplorationData)
select (entry as MultiSellExplorationDataEntry).TotalEarnings)
.Sum()
;
}
}
public override string ToString() {
StringBuilder builder = new StringBuilder();
2021-08-01 15:01:33 +02:00
builder.AppendFormat("Sold {0} worth of Cartographics Data", Credits.FormatCredits(TotalSum));
2021-07-09 11:03:30 +02:00
return builder.ToString();
}
/// <summary>
/// Cartographics only help the controlling faction.
/// </summary>
public override bool OnlyControllingFaction => true;
}
}