ready for testing

This commit is contained in:
Xjph 2024-01-21 13:35:03 -03:30
commit b8f5f6a73e
45 changed files with 3058 additions and 1183 deletions

View file

@ -33,6 +33,20 @@ namespace Observatory.Framework
}
}
/// <summary>
/// Suggests default column width when building basic UI
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public class ColumnSuggestedWidth : Attribute
{
public ColumnSuggestedWidth(int width)
{
Width = width;
}
public int Width { get; }
}
/// <summary>
/// Indicates that the property should not be displayed to the user in the UI.
/// </summary>

View file

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Text.Json;
using System.Threading.Tasks;
using System.Reflection.Metadata.Ecma335;
namespace Observatory.Framework.Files.Converters
{
class ThargoidWarRemainingTimeConverter : JsonConverter<int>
{
public override int Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.String)
{
string value = reader.GetString();
int dayCount = Int32.TryParse(value.Split(' ')[0], out int days)
? days
: 0;
return dayCount;
}
else
return reader.GetInt32();
}
public override void Write(Utf8JsonWriter writer, int value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString() + " Days");
}
}
}

View file

@ -6,6 +6,8 @@ namespace Observatory.Framework.Files.Journal
public class Bounty : JournalBase
{
public ImmutableList<Rewards> Rewards { get; init; }
public string PilotName { get; set; }
public string PilotName_Localised { get; set; }
public string Target { get; init; }
public string Target_Localised { get; init; }
public string Faction { get; init; }

View file

@ -4,5 +4,6 @@
{
public string Interdictor { get; init; }
public bool IsPlayer { get; init; }
public bool IsThargoid { get; init; }
}
}

View file

@ -9,5 +9,6 @@
public int CombatRank { get; init; }
public string Faction { get; init; }
public string Power { get; init; }
public bool IsThargoid { get; init; }
}
}

View file

@ -14,6 +14,10 @@
/// </summary>
public string SignalName_Localised { get; init; }
/// <summary>
/// Type of signal location.
/// </summary>
public string SignalType { get; init; }
/// <summary>
/// Faction state or circumstance that caused this signal to appear.
/// </summary>
public string SpawningState { get; init; }

View file

@ -8,6 +8,10 @@ namespace Observatory.Framework.Files.Journal
public class CarrierJump : FSDJump
{
public bool Docked { get; init; }
public bool OnFoot { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }

View file

@ -18,6 +18,9 @@ namespace Observatory.Framework.Files.Journal
public int BodyID { get; init; }
public bool OnStation { get; init; }
public bool OnPlanet { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public ulong MarketID { get; init; }

View file

@ -11,6 +11,8 @@ namespace Observatory.Framework.Files.Journal
public string Genus_Localised { get; init; }
public string Species { get; init; }
public string Species_Localised { get; init; }
public string Variant { get; init; }
public string Variant_Localised { get; init; }
public ulong SystemAddress { get; init; }
public int Body { get; init; }
}

View file

@ -1,4 +1,9 @@
namespace Observatory.Framework.Files.Journal
using Observatory.Framework.Files.Converters;
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
namespace Observatory.Framework.Files.Journal
{
public class ApproachSettlement : JournalBase
{
@ -10,5 +15,13 @@
public float Longitude { get; init; }
public int BodyID { get; init; }
public string BodyName { get; init; }
public ImmutableList<StationEconomy> StationEconomies { get; init; }
public string StationEconomy { get; init; }
public string StationEconomy_Localised { get; init; }
public Faction StationFaction { get; init; }
public string StationGovernment { get; init; }
public string StationGovernment_Localised { get; init; }
[JsonConverter(typeof(StationServiceConverter))]
public StationService StationServices { get; init; }
}
}

View file

@ -1,11 +1,27 @@
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
using System.Text.Json.Serialization;
namespace Observatory.Framework.Files.Journal
{
public class Passengers : JournalBase
{
public ImmutableList<Passenger> Manifest { get; init; }
[JsonPropertyName("Passengers_Missions_Accepted")]
public int PassengersMissionsAccepted { get; init; }
[JsonPropertyName("Passengers_Missions_Bulk")]
public int PassengersMissionsBulk { get; init; }
[JsonPropertyName("Passengers_Missions_Delivered")]
public int PassengersMissionsDelivered { get; init; }
[JsonPropertyName("Passengers_Missions_Disgruntled")]
public int PassengersMissionsDisgruntled { get; init; }
[JsonPropertyName("Passengers_Missions_Ejected")]
public int PassengersMissionsEjected { get; init; }
[JsonPropertyName("Passengers_Missions_VIP")]
public int PassengersMissionsVip { get; init; }
}
}

View file

@ -27,5 +27,6 @@ namespace Observatory.Framework.Files.Journal
public CQC CQC { get; init; }
[JsonPropertyName("FLEETCARRIER")]
public FleetCarrier FleetCarrier { get; init; }
public Exobiology Exobiology { get; init; }
}
}

View file

@ -0,0 +1,11 @@
namespace Observatory.Framework.Files.Journal
{
public class ClearImpound : JournalBase
{
public string ShipType { get; init; }
public string ShipType_Localised { get; init; }
public ulong ShipID { get; init; }
public ulong ShipMarketID { get; init; }
public ulong MarketID { get; init; }
}
}

View file

@ -7,6 +7,9 @@ namespace Observatory.Framework.Files.Journal
public class Market : JournalBase
{
public ulong MarketID { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StationType { get; init; }
public string StarSystem { get; init; }

View file

@ -5,7 +5,7 @@ namespace Observatory.Framework.Files.Journal
{
public class MassModuleStore : JournalBase
{
public long MarketID { get; init; }
public ulong MarketID { get; init; }
public string Ship { get; init; }
public ulong ShipID { get; init; }
public ImmutableList<Item> Items { get; init; }

View file

@ -3,6 +3,9 @@
public class Outfitting : JournalBase
{
public ulong MarketID { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StarSystem { get; init; }
}

View file

@ -3,6 +3,9 @@
public class Shipyard : JournalBase
{
public ulong MarketID { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StarSystem { get; init; }
}

View file

@ -6,6 +6,9 @@ namespace Observatory.Framework.Files.Journal
public class StoredModules : JournalBase
{
public string StarSystem { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public ulong MarketID { get; init; }
public ImmutableList<StoredItem> Items { get; init; }

View file

@ -6,6 +6,9 @@ namespace Observatory.Framework.Files.Journal
public class StoredShips : JournalBase
{
public ulong MarketID { get; init; }
/// <summary>
/// Name of the station at which this event occurred.
/// </summary>
public string StationName { get; init; }
public string StarSystem { get; init; }
public ImmutableList<StoredShip> ShipsHere { get; init; }

View file

@ -2,7 +2,7 @@
{
public class MarketBuy : JournalBase
{
public long MarketID { get; init; }
public ulong MarketID { get; init; }
public string Type { get; init; }
public string Type_Localised { get; init; }
public int Count { get; init; }

Some files were not shown because too many files have changed in this diff Show more