private static void Events_FSDJumpEvent(object sender, FSDJumpInfo e) { var reason = EventReasons.FSDJump; var tmp = new CommanderTravelLocation() { SystemName = e.StarSystem, SystemAddress = e.SystemAddress, BodyName = e.Body, BodyType = "Star", MarketId = null }; currentSessions.UpdatedLocation(e.Timestamp, tmp, reason); if (!currentSessions.IsActivelyTravelling) { //currentSessions.StartedTravelling(e.Timestamp); } if (_stopMiningOnFsdJump) { currentSessions.StoppedMining(e.Timestamp, reason); } if (_stopMiningOnFsdJump) { currentSessions.StoppedCombat(e.Timestamp, reason); } // We will combine travel and trade in a summary if (_stopMiningOnFsdJump) { currentSessions.StoppedTrading(e.Timestamp, reason); } }
internal static void EliteAPI_FSDJumpEvent(object sender, FSDJumpInfo e) { EmbedBuilder embed = new EmbedBuilder(); embed.WithTitle($"Jumping to {e.StarSystem}"); embed.AddField("System information", $"Pledge: {e.SystemAllegiance}" + Environment.NewLine + $"Politics: {e.SystemGovernmentLocalised}" + Environment.NewLine + $"Safety: {e.SystemSecurityLocalised}" + Environment.NewLine + $"Economy: {e.SystemEconomyLocalised} and {e.SystemSecondEconomyLocalised}" + Environment.NewLine //$"Faction: {Program.EliteAPI.lastSystem.SystemFaction}" + Environment.NewLine, true); , true); embed.AddField("Jump information", $"Distance: {Math.Round(e.JumpDist, 1)} ly" + Environment.NewLine + $"Fuel used: {Math.Round(e.FuelUsed, 1)} tonnes" + Environment.NewLine + $"Fuel left: {Math.Round(e.FuelLevel, 1)} tonnes" + Environment.NewLine //Scoopable(Program.EliteAPI.lastSystem.Class) + Environment.NewLine, true); , true); Main.Send(embed); }