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

Add Startup Events to Database

Now emit startup events on conneciton
Some events still to add
This commit is contained in:
2024-05-25 19:41:38 +10:00
parent 579b2b115d
commit 68eff73dbd
80 changed files with 586 additions and 229 deletions

View File

@ -6,5 +6,5 @@ namespace Observatory.Framework.Files.Journal.StationServices;
public class CommunityGoal : JournalBase
{
public override string Event => "CommunityGoal";
public ImmutableList<CurrentGoal> CurrentGoals { get; init; }
public IReadOnlyCollection<CurrentGoal> CurrentGoals { get; init; }
}

View File

@ -21,6 +21,6 @@ public class EngineerCraft : JournalBase
public float Quality { get; init; }
public string ApplyExperimentalEffect { get; init; }
[JsonConverter(typeof(MaterialConverter))]
public ImmutableList<Material> Ingredients { get; init; }
public ImmutableList<Modifier> Modifiers { get; init; }
public IReadOnlyCollection<Material> Ingredients { get; init; }
public IReadOnlyCollection<Modifier> Modifiers { get; init; }
}

View File

@ -7,13 +7,38 @@ namespace Observatory.Framework.Files.Journal.StationServices;
public class EngineerProgress : JournalBase
{
public override string Event => "EngineerProgress";
public string Engineer { get; init; }
public ulong EngineerID { get; init; }
public int Rank { get; init; }
public int RankProgress { get; init; }
public string? Engineer { get; set; }
public ulong? EngineerID { get; set; }
public int? Rank { get; set; }
public int? RankProgress { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
public Progress Progress { get; init; }
public Progress? Progress { get; set; }
public ImmutableList<EngineerType> Engineers { get; init; }
}
public IReadOnlyCollection<EngineerType> Engineers { get; set; }
}
//{ "timestamp":"2024-05-25T04:44:34Z", "event":"EngineerProgress",
//"Engineers":[
//{ "Engineer":"Hera Tani", "EngineerID":300090, "Progress":"Known" },
//{ "Engineer":"Professor Palin", "EngineerID":300220, "Progress":"Invited" },
//{ "Engineer":"Felicity Farseer", "EngineerID":300100, "Progress":"Unlocked", "RankProgress":0, "Rank":5 },
//{ "Engineer":"Eleanor Bresa", "EngineerID":400011, "Progress":"Known" },
//{ "Engineer":"Hero Ferrari", "EngineerID":400003, "Progress":"Known" },
//{ "Engineer":"Jude Navarro", "EngineerID":400001, "Progress":"Known" },
//{ "Engineer":"Etienne Dorn", "EngineerID":300290, "Progress":"Unlocked", "RankProgress":0, "Rank":5 },
//{ "Engineer":"Lori Jameson", "EngineerID":300230, "Progress":"Known" },
//{ "Engineer":"Liz Ryder", "EngineerID":300080, "Progress":"Unlocked", "RankProgress":86, "Rank":3 },
//{ "Engineer":"Rosa Dayette", "EngineerID":400012, "Progress":"Known" },
//{ "Engineer":"Juri Ishmaak", "EngineerID":300250, "Progress":"Unlocked", "RankProgress":0, "Rank":1 },
//{ "Engineer":"Zacariah Nemo", "EngineerID":300050, "Progress":"Known" },
//{ "Engineer":"Mel Brandon", "EngineerID":300280, "Progress":"Known" },
//{ "Engineer":"Selene Jean", "EngineerID":300210, "Progress":"Unlocked", "RankProgress":11, "Rank":3 },
//{ "Engineer":"Marco Qwent", "EngineerID":300200, "Progress":"Unlocked", "RankProgress":27, "Rank":4 },
//{ "Engineer":"Chloe Sedesi", "EngineerID":300300, "Progress":"Invited" },
//{ "Engineer":"Baltanos", "EngineerID":400010, "Progress":"Known" },
//{ "Engineer":"Petra Olmanova", "EngineerID":300130, "Progress":"Unlocked", "RankProgress":0, "Rank":5 },
//{ "Engineer":"The Dweller", "EngineerID":300180, "Progress":"Unlocked", "RankProgress":0, "Rank":1 },
//{ "Engineer":"Elvira Martuuk", "EngineerID":300160, "Progress":"Unlocked", "RankProgress":52, "Rank":3 },
//{ "Engineer":"Tod 'The Blaster' McQuinn", "EngineerID":300260, "Progress":"Unlocked", "RankProgress":15, "Rank":4 },
//{ "Engineer":"Domino Green", "EngineerID":400002, "Progress":"Invited" } ] }
//

View File

@ -9,5 +9,5 @@ public class MassModuleStore : JournalBase
public ulong MarketID { get; init; }
public string Ship { get; init; }
public ulong ShipID { get; init; }
public ImmutableList<Item> Items { get; init; }
public IReadOnlyCollection<Item> Items { get; init; }
}

View File

@ -23,9 +23,9 @@ public class MissionCompleted : JournalBase
[JsonConverter(typeof(StringIntConverter))]
public int Donation { get; init; }
public long Donated { get; init; }
public ImmutableList<string> PermitsAwarded { get; init; }
public ImmutableList<CommodityReward> CommodityReward { get; init; }
public ImmutableList<MaterialReward> MaterialsReward { get; init; }
public ICollection<string> PermitsAwarded { get; init; }
public IReadOnlyCollection<CommodityReward> CommodityReward { get; init; }
public IReadOnlyCollection<MaterialReward> MaterialsReward { get; init; }
public string DestinationSystem { get; init; }
public string DestinationStation { get; init; }
public string DestinationSettlement { get; init; }
@ -33,5 +33,5 @@ public class MissionCompleted : JournalBase
public string NewDestinationStation { get; init; }
public int KillCount { get; init; }
public string TargetFaction { get; init; }
public ImmutableList<FactionEffect> FactionEffects { get; init; }
public IReadOnlyCollection<FactionEffect> FactionEffects { get; init; }
}

View File

@ -13,6 +13,6 @@ public class RedeemVoucher : JournalBase
public long Amount { get; init; }
public string Faction { get; init; }
public float BrokerPercentage { get; init; }
public ImmutableList<VoucherFaction> Factions { get; init; }
public IReadOnlyCollection<VoucherFaction> Factions { get; init; }
}

View File

@ -7,5 +7,5 @@ public class Repair : JournalBase
public override string Event => "Repair";
public string Item { get; init; }
public int Cost { get; init; }
public ImmutableList<string> Items { get; init; }
public ICollection<string> Items { get; init; }
}

View File

@ -12,5 +12,5 @@ public class StoredModules : JournalBase
/// </summary>
public string StationName { get; init; }
public ulong MarketID { get; init; }
public ImmutableList<StoredItem> Items { get; init; }
public IReadOnlyCollection<StoredItem> Items { get; init; }
}

View File

@ -12,6 +12,6 @@ public class StoredShips : JournalBase
/// </summary>
public string StationName { get; init; }
public string StarSystem { get; init; }
public ImmutableList<StoredShip> ShipsHere { get; init; }
public ImmutableList<StoredShip> ShipsRemote { get; init; }
public IReadOnlyCollection<StoredShip> ShipsHere { get; init; }
public IReadOnlyCollection<StoredShip> ShipsRemote { get; init; }
}

View File

@ -8,7 +8,7 @@ public class TechnologyBroker : JournalBase
public override string Event => "TechnologyBroker";
public string BrokerType { get; init; }
public ulong MarketID { get; init; }
public ImmutableList<ItemName> ItemsUnlocked { get; init; }
public ImmutableList<CommodityReward> Commodities { get; init; }
public ImmutableList<MaterialReward> Materials { get; init; }
public IReadOnlyCollection<ItemName> ItemsUnlocked { get; init; }
public IReadOnlyCollection<CommodityReward> Commodities { get; init; }
public IReadOnlyCollection<MaterialReward> Materials { get; init; }
}