Ejemplo n.º 1
0
        private static void Events_DockedEvent(object sender, DockedInfo e)
        {
            var tmp = new CommanderTravelLocation()
            {
                SystemName    = e.StarSystem,
                SystemAddress = e.SystemAddress,
                BodyName      = e.StationName,
                BodyType      = "Station",
                MarketId      = e.MarketId
            };

            currentSessions.UpdatedLocation(e.Timestamp, tmp, EventReasons.Docked);
            currentSessions.StoppedTravelling(e.Timestamp, EventReasons.Docked);

            if (_stopMiningOnFsdJump)
            {
                currentSessions.StoppedCombat(e.Timestamp, EventReasons.Docked);
            }
            if (_stopMiningOnFsdJump)
            {
                currentSessions.StoppedExploring(e.Timestamp, EventReasons.Docked);
            }
            if (_stopMiningOnFsdJump)
            {
                currentSessions.StoppedMining(e.Timestamp, EventReasons.Docked);
            }
            if (_stopMiningOnFsdJump)
            {
                currentSessions.StoppedScavenging(e.Timestamp, EventReasons.Docked);
            }
        }
Ejemplo n.º 2
0
        internal static void EliteAPI_DockedEvent(object sender, DockedInfo e)
        {
            EmbedBuilder embed = new EmbedBuilder();

            embed.WithAuthor("Touched down");
            embed.WithTitle($"Docked at {e.StationName}");
            embed.AddField("Station information", $"System: {e.StarSystem}" + Environment.NewLine +
                           $"Distance: {string.Format("{0:n0}", Math.Round(e.DistFromStarLs))} ls" + Environment.NewLine +
                           $"Pleged to: {e.StationAllegiance}" + Environment.NewLine +
                           $"Politics: {e.StationGovernmentLocalised}" + Environment.NewLine +
                           $"Faction: {e.StationFaction.Name}" + Environment.NewLine +
                           $"Economy: {e.StationEconomyLocalised}", true);

            Main.Send(embed);
        }