introduce the concept of system contributions

This commit is contained in:
2022-12-03 15:01:46 +01:00
parent 1e73c6b7eb
commit 22d0bedf53
5 changed files with 43 additions and 3 deletions

View File

@@ -40,6 +40,23 @@ public class MissionCompleted : Transaction {
}
}
/// <summary>
/// Rescue missions contribute to the system.
/// </summary>
public override bool SystemContribution {
get {
if (AcceptedEntry == null || AcceptedEntry.Mission == null) {
return false;
}
if (AcceptedEntry.Mission.IsRescueMission) {
return true;
}
return false;
}
}
public override string ToString() {
if (Faction == null || CompletedEntry == null || CompletedEntry.Mission == null) {
return "";

View File

@@ -21,6 +21,16 @@ public class Transaction : IComparable<Transaction> {
}
}
/// <summary>
/// Whether the transaction helps the entire system.
/// While all transactions are related to one faction, sometimes their
/// overall effect on the system as a whole is more important, than to
/// their faction. For example, rescuing refugees helps the Thargoid war
/// effort in the system as a whole, not just for the faction.
/// So this is true for transactions that help the system as a whole.
/// </summary>
public virtual bool SystemContribution { get; } = false;
/// <summary>
/// Returns true if this transaction was completed in legacy ED
/// </summary>