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

Reorganize all observatory core projects into monorepo (#25)

* chore: move all observatory repos to core

* only save journal folder on change, don't constantly re-check during monitoring

* chore: monorepo project changes

* chore: monorepo migration
This commit is contained in:
Xjph
2021-10-21 19:31:32 -02:30
committed by GitHub
parent 456c80198a
commit 4c1031b8f9
371 changed files with 7565 additions and 5 deletions

View File

@ -0,0 +1,11 @@
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
{
public class Cargo : JournalBase
{
public string Vessel { get; init; }
public int Count { get; init; }
public ImmutableList<Cargo> Inventory { get; init; }
}
}

View File

@ -0,0 +1,5 @@
namespace Observatory.Framework.Files.Journal
{
public class ClearSavedGame : Commander
{ }
}

View File

@ -0,0 +1,9 @@
namespace Observatory.Framework.Files.Journal
{
public class Commander : JournalBase
{
public string Name { get; init; }
public string FID { get; init; }
}
}

View File

@ -0,0 +1,20 @@
using System.Text.Json.Serialization;
namespace Observatory.Framework.Files.Journal
{
public class FileHeader : JournalBase
{
[JsonPropertyName("part")]
public int Part { get; init; }
[JsonPropertyName("language")]
public string Language { get; init; }
[JsonPropertyName("gameversion")]
public string GameVersion { get; init; }
[JsonPropertyName("build")]
public string Build { get; init; }
public bool Odyssey { get; init; }
}
}

View File

@ -0,0 +1,31 @@
using System.Text.Json.Serialization;
namespace Observatory.Framework.Files.Journal
{
public class LoadGame : JournalBase
{
public string Commander { get; init; }
public string FID { get; init; }
public bool Horizons { get; init; }
public bool Odyssey { get; init; }
public string Ship { get; init; }
public string Ship_Localised { get; init; }
public ulong ShipID { get; init; }
public bool StartLanded { get; init; }
public bool StartDead { get; init; }
public string GameMode { get; init; }
public string Group { get; init; }
public long Credits { get; init; }
public long Loan { get; init; }
public string ShipName { get; init; }
public string ShipIdent { get; init; }
public double FuelLevel { get; init; }
public double FuelCapacity { get; init; }
[JsonPropertyName("language")]
public string Language { get; init; }
[JsonPropertyName("gameversion")]
public string GameVersion { get; init; }
[JsonPropertyName("build")]
public string Build { get; init; }
}
}

View File

@ -0,0 +1,23 @@
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
{
public class Loadout : JournalBase
{
public string Ship { get; init; }
public ulong ShipID { get; init; }
public string ShipName { get; init; }
public string ShipIdent { get; init; }
public int CargoCapacity { get; init; }
public ulong HullValue { get; init; }
public ulong ModulesValue { get; init; }
public double HullHealth { get; init; }
public double UnladenMass { get; init; }
public FuelCapacity FuelCapacity { get; init; }
public double MaxJumpRange { get; init; }
public ulong Rebuy { get; init; }
public bool Hot { get; init; }
public ImmutableList<Modules> Modules { get; init; }
}
}

View File

@ -0,0 +1,13 @@
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
{
public class Materials : JournalBase
{
public ImmutableList<Material> Raw { get; init; }
public ImmutableList<Material> Manufactured { get; init; }
public ImmutableList<Material> Encoded { get; init; }
}
}

View File

@ -0,0 +1,12 @@
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
{
public class Missions : JournalBase
{
public ImmutableList<Mission> Active { get; init; }
public ImmutableList<Mission> Failed { get; init; }
public ImmutableList<Mission> Complete { get; init; }
}
}

View File

@ -0,0 +1,7 @@
namespace Observatory.Framework.Files.Journal
{
public class NewCommander : Commander
{
public string Package { get; init; }
}
}

View File

@ -0,0 +1,11 @@
using Observatory.Framework.Files.ParameterTypes;
using System.Collections.Immutable;
namespace Observatory.Framework.Files.Journal
{
public class Passengers : JournalBase
{
public ImmutableList<Passenger> Manifest { get; init; }
}
}

View File

@ -0,0 +1,15 @@
namespace Observatory.Framework.Files.Journal
{
public class Powerplay : JournalBase
{
public string Power { get; init; }
public int Rank { get; init; }
public int Merits { get; init; }
public int Votes { get; init; }
public long TimePledged { get; init; }
}
}

View File

@ -0,0 +1,5 @@
namespace Observatory.Framework.Files.Journal
{
public class Progress : Rank
{ }
}

View File

@ -0,0 +1,16 @@
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files.Journal
{
public class Rank : JournalBase
{
public RankCombat Combat { get; init; }
public RankTrade Trade { get; init; }
public RankExploration Explore { get; init; }
public RankCQC CQC { get; init; }
public RankSoldier Soldier { get; init; }
public RankExobiologist Exobiologist { get; init; }
public RankEmpire Empire { get; init; }
public RankFederation Federation { get; init; }
}
}

View File

@ -0,0 +1,47 @@
namespace Observatory.Framework.Files.Journal
{
public class Reputation : JournalBase
{
public float Empire { get; init; }
public float Federation { get; init; }
public float Independent { get; init; }
public float Alliance { get; init; }
public string EmpireText()
{
return GetReputationText(Empire);
}
public string FederationText()
{
return GetReputationText(Federation);
}
public string IndependentText()
{
return GetReputationText(Independent);
}
public string AllianceText()
{
return GetReputationText(Alliance);
}
private string GetReputationText(float rep)
{
string text = rep switch
{
float r when r > 90 => "allied",
float r when r > 35 => "friendly",
float r when r > 4 => "cordial",
float r when r > -35 => "neutral",
float r when r > -90 => "unfriendly",
_ => "hostile",
};
return text;
}
}
}

View File

@ -0,0 +1,31 @@
using System;
using System.Text.Json.Serialization;
using Observatory.Framework.Files.ParameterTypes;
namespace Observatory.Framework.Files.Journal
{
public class Statistics : JournalBase
{
[JsonPropertyName("Bank_Account")]
public BankAccount BankAccount { get; init; }
public Combat Combat { get; init; }
public Crime Crime { get; init; }
public Smuggling Smuggling { get; init; }
public Trading Trading { get; init; }
public Mining Mining { get; init; }
public Exploration Exploration { get; init; }
public Passengers Passengers { get; init; }
[JsonPropertyName("Search_And_Rescue")]
public ParameterTypes.SearchAndRescue SearchAndRescue { get; init; }
public Crafting Crafting { get; init; }
public Crew Crew { get; init; }
public Multicrew Multicrew { get; init; }
[JsonPropertyName("TG_ENCOUNTERS")]
public Thargoid Thargoid { get; init; }
[JsonPropertyName("Material_Trader_Stats")]
public MaterialTrader MaterialTrader { get; init; }
public CQC CQC { get; init; }
[JsonPropertyName("FLEETCARRIER")]
public FleetCarrier FleetCarrier { get; init; }
}
}