add warning about legacy ED
This commit is contained in:
parent
712c416725
commit
674757d734
@ -44,8 +44,16 @@ public class DiscordLogGenerator {
|
||||
location = "Unknown Location";
|
||||
}
|
||||
|
||||
int legacycount = objective.Transactions
|
||||
.Where(x => x.IsLegacy)
|
||||
.Count()
|
||||
;
|
||||
|
||||
log.AppendFormat("**Date:** {0}\n", DateTime.Now.ToString("dd/MM/yyyy"));
|
||||
log.AppendFormat("**Target:** {0}\n", location);
|
||||
if (legacycount > 0) {
|
||||
log.AppendFormat("**Warning:** Some actions were performed on ED Legacy");
|
||||
}
|
||||
log.AppendLine("");
|
||||
log.AppendLine("```");
|
||||
|
||||
|
@ -299,7 +299,7 @@ public partial class MainWindow : Window {
|
||||
}
|
||||
|
||||
private TransactionType GetTransaction<TransactionType>(object sender) where TransactionType : Transaction {
|
||||
System.Windows.Controls.Control? button = sender as System.Windows.Controls.Control;
|
||||
System.Windows.Controls.Control button = sender as System.Windows.Controls.Control;
|
||||
if (button == null || button.DataContext == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using EDPlayerJournal;
|
||||
using System.Linq;
|
||||
|
||||
namespace EliteBGS.BGS;
|
||||
|
||||
@ -44,7 +45,15 @@ public class NonaDiscordLog : DiscordLogGenerator {
|
||||
location = "Unknown Location";
|
||||
}
|
||||
|
||||
int legacycount = objective.Transactions
|
||||
.Where(x => x.IsLegacy)
|
||||
.Count()
|
||||
;
|
||||
|
||||
log.AppendFormat(":globe_with_meridians: `Target:` {0}\n", location);
|
||||
if (legacycount > 0) {
|
||||
log.Append(":rotating_light: `Warning`: Some actions were done in E:D Legacy\n");
|
||||
}
|
||||
log.Append(":clipboard: `Conducted:`\n");
|
||||
log.Append("```");
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class UITransaction {
|
||||
|
||||
public Visibility IsShipCombatZone {
|
||||
get {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return Visibility.Hidden;
|
||||
}
|
||||
@ -40,9 +40,9 @@ public class UITransaction {
|
||||
}
|
||||
}
|
||||
|
||||
public bool? HasSpecOps {
|
||||
public bool HasSpecOps {
|
||||
get {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class UITransaction {
|
||||
return combat.SpecOps ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
@ -59,9 +59,9 @@ public class UITransaction {
|
||||
}
|
||||
}
|
||||
|
||||
public bool? HasCapitalShip {
|
||||
public bool HasCapitalShip {
|
||||
get {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
@ -69,7 +69,7 @@ public class UITransaction {
|
||||
return combat.CapitalShip ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
@ -78,9 +78,9 @@ public class UITransaction {
|
||||
}
|
||||
}
|
||||
|
||||
public bool? HasCaptain {
|
||||
public bool HasCaptain {
|
||||
get {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
@ -88,7 +88,7 @@ public class UITransaction {
|
||||
return combat.Captain ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
@ -97,9 +97,9 @@ public class UITransaction {
|
||||
}
|
||||
}
|
||||
|
||||
public bool? HasCorrespondent {
|
||||
public bool HasCorrespondent {
|
||||
get {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return false;
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class UITransaction {
|
||||
return combat.Correspondent ?? false;
|
||||
}
|
||||
set {
|
||||
CombatZone? combat = Transaction as CombatZone;
|
||||
CombatZone combat = Transaction as CombatZone;
|
||||
if (combat == null) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user