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