add support for Powerplay message
This commit is contained in:
		
							parent
							
								
									1da6f41ec8
								
							
						
					
					
						commit
						cdbca10f2d
					
				| @ -39,6 +39,7 @@ public class Entry { | ||||
|         { Events.Missions, typeof(MissionsEntry) }, | ||||
|         { Events.MultiSellExplorationData, typeof(MultiSellExplorationDataEntry) }, | ||||
|         { Events.Music, typeof(MusicEntry) }, | ||||
|         { Events.Powerplay, typeof(PowerplayEntry) }, | ||||
|         { Events.ReceiveText, typeof(ReceiveTextEntry) }, | ||||
|         { Events.RedeemVoucher, typeof(RedeemVoucherEntry) }, | ||||
|         { Events.SearchAndRescue, typeof(SearchAndRescueEntry) }, | ||||
|  | ||||
| @ -29,6 +29,7 @@ public class Events { | ||||
|     public static readonly string Missions = "Missions"; | ||||
|     public static readonly string MultiSellExplorationData = "MultiSellExplorationData"; | ||||
|     public static readonly string Music = "Music"; | ||||
|     public static readonly string Powerplay = "Powerplay"; | ||||
|     public static readonly string ReceiveText = "ReceiveText"; | ||||
|     public static readonly string RedeemVoucher = "RedeemVoucher"; | ||||
|     public static readonly string SearchAndRescue = "SearchAndRescue"; | ||||
|  | ||||
							
								
								
									
										32
									
								
								EDPlayerJournal/Entries/PowerplayEntry.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								EDPlayerJournal/Entries/PowerplayEntry.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| using System.Reflection; | ||||
| 
 | ||||
| namespace EDPlayerJournal.Entries { | ||||
|     public class PowerplayEntry : Entry { | ||||
|         /// <summary> | ||||
|         /// Name of the power | ||||
|         /// </summary> | ||||
|         public string Power { get; set; } = string.Empty; | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Player rank | ||||
|         /// </summary> | ||||
|         public int Rank { get; set; } = 0; | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Current merits of the player | ||||
|         /// </summary> | ||||
|         public long Merits { get; set; } = 0; | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Time pledged (in seconds?) | ||||
|         /// </summary> | ||||
|         public long TimePledged { get; set; } = 0; | ||||
| 
 | ||||
|         protected override void Initialise() { | ||||
|             Power = JSON.Value<string>("Power") ?? string.Empty; | ||||
|             Rank = JSON.Value<int?>("Rank") ?? 0; | ||||
|             Merits = JSON.Value<long?>("Merits") ?? 0; | ||||
|             TimePledged = JSON.Value<long?>("TimePledged") ?? 0; | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user