2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

observatory herald (#30)

* WIP: initial commit for observatory herald

* Plugin error handling refactor

* make error window non-modal

* tidy up plugin error handling

* first pass for basic herald functionality

* corrections for linux env

* Use FNV hash directly instead of managing through dictionary/index file

* resolve audio queuing issue, switch to personal NetCoreAudio fork

* merge cleanup

* add enable setting, populate defaults

* framework xml doc update

* Adjust settings, add style selection, replace locale with demonym in dropdown list.

* Test is position is on screen before saving/loading.

* use a default that's actually in the list
This commit is contained in:
Xjph
2021-11-15 10:57:46 -03:30
committed by GitHub
parent 9ad3f77bb8
commit 554948534e
22 changed files with 1144 additions and 61 deletions

View File

@ -301,7 +301,8 @@ namespace Observatory.Framework.Files.ParameterTypes
ActiveFighter,
JumpImminent,
RestrictedAccess,
NoReason
NoReason,
DockOffline
}
public enum ScanOrganicType

View File

@ -3,13 +3,35 @@ using System.Collections.Immutable;
namespace Observatory.Framework.Files
{
/// <summary>
/// Elite Dangerous shipyard.json file.
/// </summary>
public class ShipyardFile : Journal.JournalBase
{
/// <summary>
/// Unique ID of market.
/// </summary>
public long MarketID { get; init; }
/// <summary>
/// Name of station where shipyard is located.
/// </summary>
public string StationName { get; init; }
/// <summary>
/// Starsystem where shipyard is located.
/// </summary>
public string StarSystem { get; init; }
/// <summary>
/// Whether player has access to Horizons content.
/// </summary>
public bool Horizons { get; init; }
/// <summary>
/// <para>Whether player has access to the Cobra MkIV.</para>
/// <para>Will never be set to true for CMDR Nuse.</para>
/// </summary>
public bool AllowCobraMkIV { get; init; }
/// <summary>
/// List of all ships and prices for them at the current shipyard.
/// </summary>
public ImmutableList<ShipyardPrice> PriceList { get; init; }
}
}

View File

@ -4,30 +4,98 @@ using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files
{
/// <summary>
/// Elite Dangerous status.json file.
/// </summary>
public class Status : Journal.JournalBase
{
/// <summary>
/// Set of flags representing current player state.
/// </summary>
public StatusFlags Flags { get; init; }
/// <summary>
/// Additional set of flags representing current player state.
/// Added in later versions of Elite Dangerous.
/// </summary>
public StatusFlags2 Flags2 { get; init; }
/// <summary>
/// Current allocation of power distribution (pips) between SYS, ENG, and WEP, in "half pip" increments.
/// </summary>
[JsonConverter(typeof(PipConverter))]
public (int Sys, int Eng, int Wep) Pips { get; init; }
/// <summary>
/// Currently selected fire group.
/// </summary>
public int Firegroup { get; init; }
/// <summary>
/// UI component currently focused by the player.
/// </summary>
public FocusStatus GuiFocus { get; init; }
/// <summary>
/// Fuel remaining in the current ship.
/// </summary>
public FuelType Fuel { get; init; }
/// <summary>
/// Amount of cargo currently carried.
/// </summary>
public float Cargo { get; init; }
/// <summary>
/// Legal status in the current jurisdiction.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public LegalStatus LegalState { get; init; }
/// <summary>
/// <para>Current altitude.</para>
/// <para>Check if RadialAltitude is set in StatusFlags to determine if altitude is based on planetary radius (set) or raycast to ground (unset).</para>
/// </summary>
public int Altitude { get; init; }
/// <summary>
/// Latitude of current surface location.
/// </summary>
public double Latitude { get; init; }
/// <summary>
/// Longitude of current surface location.
/// </summary>
public double Longitude { get; init; }
/// <summary>
/// Current heading for surface direction.
/// </summary>
public int Heading { get; init; }
/// <summary>
/// Body name of current location.
/// </summary>
public string BodyName { get; init; }
/// <summary>
/// Radius of current planet.
/// </summary>
public double PlanetRadius { get; init; }
/// <summary>
/// Oxygen remaining on foot, range from 0.0 - 1.0.
/// </summary>
public float Oxygen { get; init; }
/// <summary>
/// Health remaining on foot, range from 0.0 - 1.0.
/// </summary>
public float Health { get; init; }
/// <summary>
/// Current environmental temperature in K while on foot.
/// </summary>
public float Temperature { get; init; }
/// <summary>
/// Name of currently selected personal weapon.
/// </summary>
public string SelectedWeapon { get; init; }
/// <summary>
/// Current strength of gravity while on foot, in g.
/// </summary>
public float Gravity { get; init; }
/// <summary>
/// Current credit balance of player.
/// </summary>
public long Balance { get; init; }
/// <summary>
/// Currently set destination.
/// </summary>
public Destination Destination { get; init; }
}
}