From 75131d8a4fc8f0fc94f5ec7520626ae432b00df2 Mon Sep 17 00:00:00 2001 From: T'kael Date: Wed, 7 Aug 2024 20:27:10 -0700 Subject: [PATCH] The drop-down on missions now includes a "Notes" section where a commander can record notes about ongoing missions. Resolves #2410. --- ChangeLog.md | 3 +++ DataDefinitions/Mission.cs | 17 ++++++++++++++++- MissionMonitor/ConfigurationWindow.xaml | 12 ++++++++++-- MissionMonitor/ConfigurationWindow.xaml.cs | 5 +++++ .../Properties/MissionMonitor.Designer.cs | 11 +++++++++++ MissionMonitor/Properties/MissionMonitor.resx | 3 +++ 6 files changed, 48 insertions(+), 3 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index f32022d666..2c06f21cd8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -4,6 +4,7 @@ Full details of the variables available for each noted event, and VoiceAttack in ## 4.1.0-b1 * Core + * Added support for the Type-8 Transporter. * Added `sourcesystem`, `sourcebody`, `collected`, and `delivered`, properties to the `mission` object. * Commodities now have a `corrosive` boolean property. * Removed `haulageData` map from the `cargo` object, add `missionCargo` dictionary object in its place. @@ -11,6 +12,8 @@ Full details of the variables available for each noted event, and VoiceAttack in * The `need` property of `cargo` is now calculated after resolvers have handled events (to minimize cross linking between the Cargo and Mission Monitors). * Crime Monitor * An interstellar bounty applies when fines or bounties for factions aligned with a superpower exceed 10,000 credits. + * Mission Monitor + * The drop-down on missions now includes a "Notes" section where you can record notes about ongoing missions. (#2410) * Speech Responder * Fixed a bug that could prevent variables set with `set` from being available in some contexts. * Custom Functions diff --git a/DataDefinitions/Mission.cs b/DataDefinitions/Mission.cs index 7d19dd08d8..d1e627f796 100644 --- a/DataDefinitions/Mission.cs +++ b/DataDefinitions/Mission.cs @@ -120,6 +120,20 @@ public MissionStatus statusDef [Utilities.PublicAPI] public bool shared { get; set; } + [Utilities.PublicAPI ("Notes you have recorded about the mission.")] + public string notes + { + get => _notes; + set + { + if ( _notes == value ) { return; } + _notes = value; + OnPropertyChanged( nameof( notes ) ); + } + } + [JsonIgnore] + private string _notes; + #endregion #region Mission Tags / MetaData @@ -471,13 +485,14 @@ public Mission () { } [JsonConstructor] // Main Constructor - public Mission(long MissionId, string Name, DateTime? expiry, MissionStatus Status, bool Shared = false) + public Mission(long MissionId, string Name, DateTime? expiry, MissionStatus Status, string notes = null, bool Shared = false) { this.missionid = MissionId; this.name = Name; this.expiry = expiry?.ToUniversalTime(); this.statusDef = Status; this.shared = Shared; + this.notes = notes; this.expiring = false; destinationsystems = new List(); } diff --git a/MissionMonitor/ConfigurationWindow.xaml b/MissionMonitor/ConfigurationWindow.xaml index 6c5a872bf9..6f719e6f35 100644 --- a/MissionMonitor/ConfigurationWindow.xaml +++ b/MissionMonitor/ConfigurationWindow.xaml @@ -12,7 +12,7 @@ d:DesignHeight="300" d:DesignWidth="800"> - + @@ -22,6 +22,7 @@ + @@ -31,6 +32,10 @@ + + @@ -56,6 +61,9 @@ + @@ -66,7 +74,7 @@