count conflict zones you SelfDestruct out of
This commit is contained in:
parent
8a92cac02a
commit
2c6eb9190a
@ -581,14 +581,25 @@ internal class ReceiveTextParser : ITransactionParserPart {
|
||||
}
|
||||
}
|
||||
|
||||
internal class SelfDestructParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
context.SelfDestruct = true;
|
||||
}
|
||||
}
|
||||
|
||||
internal class DiedParser : ITransactionParserPart {
|
||||
public void Parse(Entry entry, TransactionParserContext context, TransactionParserOptions options, TransactionList transactions) {
|
||||
// Death only matters in ship. On foot you can just redeploy with the dropship.
|
||||
if (context.IsOnFoot) {
|
||||
return;
|
||||
}
|
||||
// You can't complete a combat zone if you die in it. Others might keep it open
|
||||
// for you, but still you will not have completed it unless you jump back in.
|
||||
if (context.SelfDestruct != null && context.SelfDestruct == true) {
|
||||
// Some people just suicide to fast track back to stations after a CZ,
|
||||
// especially since combat bonds don't disappear on death. So count the CZ
|
||||
// on self destruct
|
||||
context.DiscernCombatZone(transactions, entry);
|
||||
context.SelfDestruct = null;
|
||||
}
|
||||
context.ResetCombatZone();
|
||||
// Dying also moves you back to another instance
|
||||
context.LeftInstance();
|
||||
@ -630,6 +641,7 @@ public class TransactionParser {
|
||||
{ Events.ReceiveText, new ReceiveTextParser() },
|
||||
{ Events.RedeemVoucher, new RedeemVoucherParser() },
|
||||
{ Events.SearchAndRescue, new SearchAndRescueParser() },
|
||||
{ Events.SelfDestruct, new SelfDestructParser() },
|
||||
{ Events.SellExplorationData, new SellExplorationDataParser() },
|
||||
{ Events.SellMicroResources, new SellMicroResourcesParser() },
|
||||
{ Events.SellOrganicData, new SellOrganicDataParser() },
|
||||
|
@ -62,6 +62,8 @@ internal class TransactionParserContext {
|
||||
public bool HaveSeenAlliedCorrespondent { get; set; } = false;
|
||||
public bool HaveSeenEnemyCorrespondent { get; set; } = false;
|
||||
|
||||
public bool? SelfDestruct { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Current Odyssey settlement.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user