File tree Expand file tree Collapse file tree
EliteAPI.Tests/TestFiles/Status Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "timestamp" : " 2025-12-22T21:29:37Z" ,
3+ "event" : " Status" ,
4+ "Flags" : 2350956814 ,
5+ "Flags2" : 0 ,
6+ "Pips" : [
7+ 4 ,
8+ 7 ,
9+ 1
10+ ],
11+ "FireGroup" : 0 ,
12+ "GuiFocus" : 0 ,
13+ "Fuel" : {
14+ "FuelMain" : 0.000000 ,
15+ "FuelReservoir" : 0.499512
16+ },
17+ "Cargo" : 0.000000 ,
18+ "LegalState" : " Allied" ,
19+ "Latitude" : -45.529053 ,
20+ "Longitude" : -26.269121 ,
21+ "Heading" : 64 ,
22+ "Altitude" : 0 ,
23+ "BodyName" : " Nokomishi A 1" ,
24+ "PlanetRadius" : 1483876.125000 ,
25+ "Balance" : 2168298530
26+ }
Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ public static List<EventPath> ToPaths(string json)
2727
2828 // expand flags
2929 var flagsPath = paths . FirstOrDefault ( p => p . Path == "Flags" ) ;
30- var flagsValue = flagsPath . Equals ( default ( EventPath ) ) ? 0 : Convert . ToInt32 ( flagsPath . Value ) ;
30+ var flagsValue = flagsPath . Equals ( default ( EventPath ) ) ? 0u : Convert . ToUInt32 ( flagsPath . Value ) ;
3131 foreach ( var flag in StatusUtils . GetFlags ( flagsValue ) )
3232 paths . Add ( new EventPath ( flag . Key , flag . Value , EventValueType . Boolean ) ) ;
3333
3434 // expand flags2
3535 var flags2Path = paths . FirstOrDefault ( p => p . Path == "Flags2" ) ;
36- var flags2Value = flags2Path . Equals ( default ( EventPath ) ) ? 0 : Convert . ToInt32 ( flags2Path . Value ) ;
36+ var flags2Value = flags2Path . Equals ( default ( EventPath ) ) ? 0u : Convert . ToUInt32 ( flags2Path . Value ) ;
3737 foreach ( var flag in StatusUtils . GetFlags2 ( flags2Value ) )
3838 paths . Add ( new EventPath ( flag . Key , flag . Value , EventValueType . Boolean ) ) ;
3939
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace EliteAPI.Journals
44{
55 public static class StatusUtils
66 {
7- public static Dictionary < string , bool > GetFlags ( int flags ) => new ( )
7+ public static Dictionary < string , bool > GetFlags ( uint flags ) => new ( )
88 {
99 { "Available" , flags != 0 } ,
1010 { "Docked" , ( flags & 1 ) != 0 } ,
@@ -38,7 +38,7 @@ public static class StatusUtils
3838 { "NightVision" , ( flags & ( 1 << 28 ) ) != 0 }
3939 } ;
4040
41- public static Dictionary < string , bool > GetFlags2 ( int flags2 ) => new ( )
41+ public static Dictionary < string , bool > GetFlags2 ( uint flags2 ) => new ( )
4242 {
4343 { "OnFoot" , ( flags2 & 1 ) != 0 } ,
4444 { "InTaxi" , ( flags2 & ( 1 << 1 ) ) != 0 } ,
You can’t perform that action at this time.
0 commit comments