mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 08:23:42 -04:00
Export version fixes (#83)
* Add file association for .eop, prompt for install dir * Handle .eop or .aip file passed as arg. * VS2022 version bump * Filter neutron stars and black holes from fast spinning criteria. * Adjustments for new "high value" check * Refactor herald cache * Fix element order and namespaces for voice moods. * Add explicit .Stop() between audio player calls. * Use nullsafe member access instead of skipping * Don't queue up a title that's already queued. * Improve body ordinal handling for explorer speech titles. * Escape strings being inserted into xml * Handle flip-flopping JSON type * Converter for flip-flopping property type * Use the converter * Escape characters *before* we wrap it in xml. * Give Eahlstan his clear button. :D * Exclude all stars from fast rotation check. * Close outstanding popup notifications on exit. * TO DONE * [Herald] Suppress duplicate notification titles for spoken notifications If you have notifications from multiple plugins producing notifications with the same title in quick succession (ie. "Body A 1 e" from both Explorer and BioInsights), the title on successive notifications will not be spoken again to save the breath of our friendly Azure speakers. * Doc update * Remove unintended member hiding * Fix export errors when exporting BioInsights data, cleanup Discovered a couple issues with exporting BioInsights data resulting from using two different types of objects in the data grid; improved error handling as well. Also cleaned up some old-style read all code. * Add read-all on launch setting * Updated framework xml * Improve high-value body description text Co-authored-by: Fred Kuipers <mr.fredk@gmail.com>
This commit is contained in:
@ -55,29 +55,81 @@ namespace Observatory.Framework
|
||||
/// </summary>
|
||||
public double YPos = -1.0;
|
||||
/// <summary>
|
||||
/// Specifies the desired renderings of the notification.
|
||||
/// Specifies the desired renderings of the notification. Defaults to <see cref="NotificationRendering.All"/>.
|
||||
/// </summary>
|
||||
public NotificationRendering Rendering = NotificationRendering.All;
|
||||
/// <summary>
|
||||
/// Specifies if some part of the notification should be suppressed. Not supported by all notifiers. Defaults to <see cref="NotificationSuppression.None"/>.
|
||||
/// </summary>
|
||||
public NotificationSuppression Suppression = NotificationSuppression.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines constants for suppression of title or detail announcement in a notification.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum NotificationSuppression
|
||||
{
|
||||
/// <summary>
|
||||
/// No suppression.
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// Suppress title.
|
||||
/// </summary>
|
||||
Title = 1,
|
||||
/// <summary>
|
||||
/// Suppress detail.
|
||||
/// </summary>
|
||||
Detail = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines constants for controlling notification routing to plugins or native notification handlers.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum NotificationRendering
|
||||
{
|
||||
// These need to be multiples of 2 as they're used via masking.
|
||||
/// <summary>
|
||||
/// Send notification to native visual popup notificaiton handler.
|
||||
/// </summary>
|
||||
NativeVisual = 1,
|
||||
/// <summary>
|
||||
/// Send notification to native speech notification handler.
|
||||
/// </summary>
|
||||
NativeVocal = 2,
|
||||
/// <summary>
|
||||
/// Send notification to all installed notifier plugins.
|
||||
/// </summary>
|
||||
PluginNotifier = 4,
|
||||
/// <summary>
|
||||
/// Send notification to all available handlers.
|
||||
/// </summary>
|
||||
All = (NativeVisual | NativeVocal | PluginNotifier)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flags indicating current state of journal monitoring.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum LogMonitorState : uint
|
||||
{
|
||||
// These need to be multiples of 2 as they're used via masking.
|
||||
Idle = 0, // Monitoring is stopped
|
||||
Realtime = 1, // Real-time monitoring is active
|
||||
Batch = 2, // Performing a batch read of history
|
||||
PreRead = 4 // Currently pre-reading current system context (a batch read)
|
||||
/// <summary>
|
||||
/// Monitoring is stopped.
|
||||
/// </summary>
|
||||
Idle = 0,
|
||||
/// <summary>
|
||||
/// Real-time monitoring is active.
|
||||
/// </summary>
|
||||
Realtime = 1,
|
||||
/// <summary>
|
||||
/// Batch read of historical journals is in progress.
|
||||
/// </summary>
|
||||
Batch = 2,
|
||||
/// <summary>
|
||||
/// Batch read of recent journals is in progress to establish current player state.
|
||||
/// </summary>
|
||||
PreRead = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Observatory.Framework.Files.Converters
|
||||
{
|
||||
class MutableStringDoubleConverter : JsonConverter<object>
|
||||
{
|
||||
public override object Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.String)
|
||||
return reader.GetString();
|
||||
else
|
||||
return reader.GetDouble();
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, object value, JsonSerializerOptions options)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -3,6 +3,5 @@
|
||||
public class CrewLaunchFighter : CrewMemberJoins
|
||||
{
|
||||
public ulong ID { get; init; }
|
||||
public bool Telepresence { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
namespace Observatory.Framework.Files.Journal
|
||||
{
|
||||
public class CrewMemberQuits : CrewMemberJoins
|
||||
{
|
||||
public bool Telepresence { get; init; }
|
||||
}
|
||||
{ }
|
||||
}
|
||||
|
@ -3,6 +3,5 @@
|
||||
public class CrewMemberRoleChange : CrewMemberJoins
|
||||
{
|
||||
public string Role { get; init; }
|
||||
public bool Telepresence { get; init; }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
namespace Observatory.Framework.Files.Journal
|
||||
{
|
||||
public class QuitACrew : JoinACrew
|
||||
{
|
||||
public bool Telepresence { get; init; }
|
||||
}
|
||||
{ }
|
||||
}
|
||||
|
@ -6,11 +6,32 @@ namespace Observatory.Framework.Files.ParameterTypes
|
||||
{
|
||||
public string Label { get; init; }
|
||||
|
||||
public double Value { get; init; }
|
||||
[JsonConverter(typeof(Converters.MutableStringDoubleConverter))]
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ValueString))
|
||||
return ValueString;
|
||||
else
|
||||
return ValueNumeric;
|
||||
}
|
||||
|
||||
init
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
ValueString = value.ToString();
|
||||
else
|
||||
ValueNumeric = (double)value;
|
||||
}
|
||||
}
|
||||
|
||||
public double OriginalValue { get; init; }
|
||||
|
||||
[JsonConverter(typeof(Converters.IntBoolConverter))]
|
||||
public bool LessIsGood { get; init; }
|
||||
|
||||
private double ValueNumeric;
|
||||
private string ValueString;
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,82 @@
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationArgs.Rendering">
|
||||
<summary>
|
||||
Specifies the desired renderings of the notification.
|
||||
Specifies the desired renderings of the notification. Defaults to <see cref="F:Observatory.Framework.NotificationRendering.All"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationArgs.Suppression">
|
||||
<summary>
|
||||
Specifies if some part of the notification should be suppressed. Not supported by all notifiers. Defaults to <see cref="F:Observatory.Framework.NotificationSuppression.None"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.NotificationSuppression">
|
||||
<summary>
|
||||
Defines constants for suppression of title or detail announcement in a notification.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationSuppression.None">
|
||||
<summary>
|
||||
No suppression.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationSuppression.Title">
|
||||
<summary>
|
||||
Suppress title.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationSuppression.Detail">
|
||||
<summary>
|
||||
Suppress detail.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.NotificationRendering">
|
||||
<summary>
|
||||
Defines constants for controlling notification routing to plugins or native notification handlers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationRendering.NativeVisual">
|
||||
<summary>
|
||||
Send notification to native visual popup notificaiton handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationRendering.NativeVocal">
|
||||
<summary>
|
||||
Send notification to native speech notification handler.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationRendering.PluginNotifier">
|
||||
<summary>
|
||||
Send notification to all installed notifier plugins.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.NotificationRendering.All">
|
||||
<summary>
|
||||
Send notification to all available handlers.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.LogMonitorState">
|
||||
<summary>
|
||||
Flags indicating current state of journal monitoring.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.LogMonitorState.Idle">
|
||||
<summary>
|
||||
Monitoring is stopped.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.LogMonitorState.Realtime">
|
||||
<summary>
|
||||
Real-time monitoring is active.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.LogMonitorState.Batch">
|
||||
<summary>
|
||||
Batch read of historical journals is in progress.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Observatory.Framework.LogMonitorState.PreRead">
|
||||
<summary>
|
||||
Batch read of recent journals is in progress to establish current player state.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Observatory.Framework.LogMonitorStateChangedEventArgs">
|
||||
|
Reference in New Issue
Block a user