Compare commits
No commits in common. "617ade0163df4bc5d026d39252166a3c7a9d72af" and "7f6311b8884b438a7f442b015a4c607791a53537" have entirely different histories.
617ade0163
...
7f6311b888
@ -197,10 +197,6 @@ namespace EliteBGS.BGS {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!objective.IsEnabled) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.AppendFormat("**Date:** {0}\n", FormatDate());
|
log.AppendFormat("**Date:** {0}\n", FormatDate());
|
||||||
log.AppendFormat("**Location:** {0}\n", objective.ToShortString());
|
log.AppendFormat("**Location:** {0}\n", objective.ToShortString());
|
||||||
log.AppendFormat("**Faction:** {0}\n", objective.Faction);
|
log.AppendFormat("**Faction:** {0}\n", objective.Faction);
|
||||||
|
@ -32,7 +32,5 @@ namespace EliteBGS.BGS {
|
|||||||
public virtual int CompareTo(LogEntry other) {
|
public virtual int CompareTo(LogEntry other) {
|
||||||
throw new NotImplementedException("not implemented");
|
throw new NotImplementedException("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name => this.ToString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,10 +196,6 @@ namespace EliteBGS.BGS {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!objective.IsEnabled) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
log.AppendFormat(":globe_with_meridians: `Location:` {0}\n", objective.ToShortString());
|
log.AppendFormat(":globe_with_meridians: `Location:` {0}\n", objective.ToShortString());
|
||||||
log.Append(":clipboard: `Conducted:`\n");
|
log.Append(":clipboard: `Conducted:`\n");
|
||||||
log.Append("```\n");
|
log.Append("```\n");
|
||||||
|
@ -11,26 +11,11 @@ namespace EliteBGS.BGS {
|
|||||||
|
|
||||||
private List<LogEntry> entries = new List<LogEntry>();
|
private List<LogEntry> entries = new List<LogEntry>();
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public bool IsEnabled { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public List<LogEntry> Children {
|
|
||||||
get => entries;
|
|
||||||
}
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public string Name => this.ToString();
|
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
public bool IsExpanded { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<LogEntry> LogEntries {
|
public List<LogEntry> LogEntries {
|
||||||
get => entries;
|
get => entries;
|
||||||
set => entries = value;
|
set => entries = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Clear() {
|
public void Clear() {
|
||||||
if (entries == null) {
|
if (entries == null) {
|
||||||
return;
|
return;
|
||||||
@ -38,8 +23,6 @@ namespace EliteBGS.BGS {
|
|||||||
entries.RemoveAll(x => !x.ManuallyAdded);
|
entries.RemoveAll(x => !x.ManuallyAdded);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ManuallyAdded { get; set; }
|
|
||||||
|
|
||||||
public int Matches(LogEntry e) {
|
public int Matches(LogEntry e) {
|
||||||
int match_count = 0;
|
int match_count = 0;
|
||||||
|
|
||||||
|
@ -48,26 +48,7 @@
|
|||||||
<Label Content="To:" Height="26.2857142857143" VerticalAlignment="Top"/>
|
<Label Content="To:" Height="26.2857142857143" VerticalAlignment="Top"/>
|
||||||
<DatePicker x:Name="enddate" Height="26.2857142857143" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
<DatePicker x:Name="enddate" Height="26.2857142857143" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||||
</ToolBar>
|
</ToolBar>
|
||||||
<TreeView x:Name="entries" Margin="0,0,0,0" Grid.ColumnSpan="3" Grid.Row="2" KeyUp="entries_KeyUp">
|
<TreeView x:Name="entries" Margin="0,0,0,0" Grid.ColumnSpan="3" Grid.Row="2" KeyUp="entries_KeyUp"/>
|
||||||
<TreeView.ItemTemplate>
|
|
||||||
<HierarchicalDataTemplate DataType="{x:Type BGS:Objective}" ItemsSource="{Binding Children}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<CheckBox Focusable="False" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="{Binding Name}" Margin="5,0" />
|
|
||||||
</StackPanel>
|
|
||||||
<HierarchicalDataTemplate.ItemTemplate>
|
|
||||||
<HierarchicalDataTemplate>
|
|
||||||
<TextBlock Text="{Binding Name}"/>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
</HierarchicalDataTemplate.ItemTemplate>
|
|
||||||
</HierarchicalDataTemplate>
|
|
||||||
</TreeView.ItemTemplate>
|
|
||||||
<TreeView.ItemContainerStyle>
|
|
||||||
<Style TargetType="TreeViewItem">
|
|
||||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
||||||
</Style>
|
|
||||||
</TreeView.ItemContainerStyle>
|
|
||||||
</TreeView>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Discord Report">
|
<TabItem Header="Discord Report">
|
||||||
|
@ -107,10 +107,22 @@ namespace EliteBGS {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Objective obj in report.Objectives) {
|
foreach (var obj in report.Objectives) {
|
||||||
entries.Items.Add(obj);
|
var item_objective = new TreeViewItem {
|
||||||
obj.IsExpanded = obj.ManuallyAdded;
|
Header = obj.ToString(),
|
||||||
obj.IsEnabled = obj.ManuallyAdded;
|
Tag = obj
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var log in obj.LogEntries) {
|
||||||
|
var log_objective = new TreeViewItem {
|
||||||
|
Header = log.ToString(),
|
||||||
|
Tag = log
|
||||||
|
};
|
||||||
|
item_objective.Items.Add(log_objective);
|
||||||
|
}
|
||||||
|
|
||||||
|
item_objective.IsExpanded = true;
|
||||||
|
entries.Items.Add(item_objective);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +144,7 @@ namespace EliteBGS {
|
|||||||
Objective objective = new Objective {
|
Objective objective = new Objective {
|
||||||
System = system.Text,
|
System = system.Text,
|
||||||
Faction = faction.Text,
|
Faction = faction.Text,
|
||||||
Station = station.Text,
|
Station = station.Text
|
||||||
ManuallyAdded = true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!objective.IsValid) {
|
if (!objective.IsValid) {
|
||||||
@ -168,18 +179,16 @@ namespace EliteBGS {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
object obj = entries.SelectedItem;
|
TreeViewItem item = entries.SelectedItem as TreeViewItem;
|
||||||
|
var obj = item.Tag;
|
||||||
bool removed = false;
|
bool removed = false;
|
||||||
|
|
||||||
if (obj.GetType() == typeof(Objective)) {
|
if (obj.GetType() == typeof(Objective)) {
|
||||||
removed = report.Objectives.Remove(obj as Objective);
|
removed = report.Objectives.Remove(obj as Objective);
|
||||||
} else if (obj.GetType() == typeof(LogEntry) ||
|
} else if (obj.GetType() == typeof(LogEntry) ||
|
||||||
obj.GetType().IsSubclassOf(typeof(LogEntry))) {
|
obj.GetType().IsSubclassOf(typeof(LogEntry))) {
|
||||||
foreach (Objective parent in report.Objectives) {
|
var parent = (item.Parent as TreeViewItem).Tag as Objective;
|
||||||
if (parent.LogEntries.Remove(obj as LogEntry)) {
|
removed = parent.LogEntries.Remove(obj as LogEntry);
|
||||||
removed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (removed) {
|
if (removed) {
|
||||||
|
17
README.md
17
README.md
@ -15,9 +15,7 @@ Binary downloads can be found here: [https://bgs.n0la.org/](https://bgs.n0la.org
|
|||||||
|
|
||||||
Use the main tab to add objectives to the program. To do this, insert the system name,
|
Use the main tab to add objectives to the program. To do this, insert the system name,
|
||||||
faction, and, optionally, a station. Then press "Add Objective". Objectives can be deleted
|
faction, and, optionally, a station. Then press "Add Objective". Objectives can be deleted
|
||||||
by selecting them and pressing the "DEL" key. Manually added objectives like this are
|
by selecting them and pressing the "DEL" key.
|
||||||
enabled by default. You can always enable, and disable an objective by checking the box
|
|
||||||
next to its name. Disabled objectives are not included in the BGS discord log generation.
|
|
||||||
|
|
||||||
Once you have your objectives have been configured, you can press "Parse Journal", which
|
Once you have your objectives have been configured, you can press "Parse Journal", which
|
||||||
will check your Elite Dangerous player journal for completed missions. Currently the tool
|
will check your Elite Dangerous player journal for completed missions. Currently the tool
|
||||||
@ -43,11 +41,10 @@ the combat zone entries by selecting them, and pressing "DEL".
|
|||||||
![Main Window with entries](main-entries.png)
|
![Main Window with entries](main-entries.png)
|
||||||
|
|
||||||
The window will then list all the journal entries it has found, and group them by objectives. You
|
The window will then list all the journal entries it has found, and group them by objectives. You
|
||||||
can remove individual entries (if you think the tool detected something you thought was wrong), by
|
can remove individual entries (if you think the tool detected soemthing you thought was wrong), by
|
||||||
selecting the entry, and pressing the "DEL" key.
|
selecting the entry, and pressing the "DEL" key.
|
||||||
|
|
||||||
Once you are satisfied with the result, move to "Discord Report" tab, select a template, and click
|
Once you are satisfied with the result, move to "Discord Report" tab, and click "Generate Report".
|
||||||
"Generate Report".
|
|
||||||
|
|
||||||
![Generated Report](main-report.png)
|
![Generated Report](main-report.png)
|
||||||
|
|
||||||
@ -89,13 +86,9 @@ also an ommission from FDev:
|
|||||||
|
|
||||||
Until this is fixed, please edit the resulting BGS log text, and manually add such entries.
|
Until this is fixed, please edit the resulting BGS log text, and manually add such entries.
|
||||||
|
|
||||||
The tool also currently cannot differentiate between missions you have abandoned in the transaction
|
|
||||||
tab before it was completed, and those that you have failed - either delibaretly or by time-out. So
|
|
||||||
it will find and add them all, and you simply can remove those that you have abandoned manually.
|
|
||||||
|
|
||||||
## Use EDDB information
|
## Use EDDB information
|
||||||
|
|
||||||
EliteBGS can download information from EDDB to auto complete system and station names. You can
|
EliteBGS can download information from EDDB to auto complete system- and station names. You can
|
||||||
enable its use in the "Settings". Once enabled, you must also press "Download", to download and
|
enable its use in the "Settings". Once enabled, you must also press "Download", to download and
|
||||||
process the current version of the EDDB database.
|
process the current version of the EDDB database.
|
||||||
|
|
||||||
@ -124,6 +117,6 @@ And of course, `Newtonsoft.Json` as the JSON parser.
|
|||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
This tool was made by CMDR Hekateh (Discord: `nola#2457`).
|
This tool was made by CMDR Hekateh (Discord: `nola#2457`) of Vulcan Industrial Ventures.
|
||||||
|
|
||||||
Long live the Empire.
|
Long live the Empire.
|
@ -66,13 +66,9 @@ namespace EliteBGS.Util {
|
|||||||
|
|
||||||
public void SaveObjectives(Report report) {
|
public void SaveObjectives(Report report) {
|
||||||
var serializer = JsonSerializer.CreateDefault();
|
var serializer = JsonSerializer.CreateDefault();
|
||||||
using (FileStream filestream = File.OpenWrite(objectives_file)) {
|
using (var file = new StreamWriter(File.OpenWrite(objectives_file), Encoding.UTF8)) {
|
||||||
filestream.SetLength(0);
|
var stream = new JsonTextWriter(file);
|
||||||
filestream.Flush();
|
serializer.Serialize(stream, report.Objectives);
|
||||||
using (StreamWriter file = new StreamWriter(filestream, Encoding.UTF8)) {
|
|
||||||
JsonTextWriter stream = new JsonTextWriter(file);
|
|
||||||
serializer.Serialize(stream, report.Objectives);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
main-entries.png
BIN
main-entries.png
Binary file not shown.
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 84 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 52 KiB |
BIN
main-report.png
BIN
main-report.png
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 67 KiB |
Loading…
x
Reference in New Issue
Block a user