Skip to content

Commit 7f00353

Browse files
committed
Tidy ups
1 parent a6559c0 commit 7f00353

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

Events/ScanOrganicDistanceEvent.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using EddiDataDefinitions;
2-
using MathNet.Numerics.Random;
32
using System;
43
using Utilities;
54

InaraResponder/InaraResponder.cs

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -620,14 +620,11 @@ private void handleDockedEvent(DockedEvent @event)
620620
{ "marketID", @event.marketId }
621621
};
622622

623-
if (EDDI.Instance.Vehicle == Constants.VEHICLE_SHIP)
623+
var currentShip = EDDI.Instance.CurrentShip;
624+
if ( !string.IsNullOrEmpty( currentShip?.EDName ) )
624625
{
625-
var currentShip = EDDI.Instance.CurrentShip;
626-
if (!string.IsNullOrEmpty(currentShip?.EDName))
627-
{
628-
eventData.Add("shipType", currentShip.EDName);
629-
eventData.Add("shipGameID", currentShip.LocalId);
630-
}
626+
eventData.Add( "shipType", currentShip.EDName );
627+
eventData.Add( "shipGameID", currentShip.LocalId );
631628
}
632629
inaraService.EnqueueAPIEvent(new InaraAPIEvent(@event.timestamp, "addCommanderTravelDock", eventData));
633630
}
@@ -1218,15 +1215,13 @@ private void handleJumpedEvent(JumpedEvent @event)
12181215
{ "jumpDistance", @event.distance }
12191216
};
12201217

1221-
if (EDDI.Instance.Vehicle == Constants.VEHICLE_SHIP)
1218+
var currentShip = EDDI.Instance.CurrentShip;
1219+
if ( !string.IsNullOrEmpty( currentShip?.EDName ) )
12221220
{
1223-
var currentShip = EDDI.Instance.CurrentShip;
1224-
if (!string.IsNullOrEmpty(currentShip?.EDName))
1225-
{
1226-
eventData.Add("shipType", currentShip.EDName);
1227-
eventData.Add("shipGameID", currentShip.LocalId);
1228-
}
1221+
eventData.Add( "shipType", currentShip.EDName );
1222+
eventData.Add( "shipGameID", currentShip.LocalId );
12291223
}
1224+
12301225
inaraService.EnqueueAPIEvent(new InaraAPIEvent(@event.timestamp, "addCommanderTravelFSDJump", eventData));
12311226
}
12321227

0 commit comments

Comments
 (0)