do not remove manually added entries
This commit is contained in:
parent
e724955ec8
commit
dd4cc8ba5f
@ -11,6 +11,11 @@ namespace NonaBGS.BGS {
|
||||
public string Station { get; set; }
|
||||
public string System { get; set; }
|
||||
public string Faction { get; set; }
|
||||
/// <summary>
|
||||
/// Whether this entry was manually added. Manually added entries are not deleted
|
||||
/// when a new scan is made. Instead they are preserved.
|
||||
/// </summary>
|
||||
public bool ManuallyAdded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this entry only benefits the controlling faction or not, default: no
|
||||
|
@ -16,6 +16,12 @@ namespace NonaBGS.BGS {
|
||||
get => entries;
|
||||
set => entries = value;
|
||||
}
|
||||
public void Clear() {
|
||||
if (entries == null) {
|
||||
return;
|
||||
}
|
||||
entries.RemoveAll(x => !x.ManuallyAdded);
|
||||
}
|
||||
|
||||
public int Matches(LogEntry e) {
|
||||
int match_count = 0;
|
||||
|
@ -54,7 +54,7 @@ namespace NonaBGS.BGS {
|
||||
string current_station = null;
|
||||
string controlling_faction = null;
|
||||
|
||||
this.objectives.ForEach(x => x.LogEntries.Clear());
|
||||
objectives.ForEach(x => x.Clear());
|
||||
|
||||
foreach (var e in relevant) {
|
||||
LogEntry entry = null;
|
||||
|
@ -264,6 +264,7 @@ namespace NonaBGS {
|
||||
|
||||
CombatZone zone = new CombatZone();
|
||||
|
||||
zone.ManuallyAdded = true;
|
||||
zone.Faction = objective.Faction;
|
||||
zone.System = objective.System;
|
||||
zone.Station = objective.Station;
|
||||
|
Reference in New Issue
Block a user