Exemple #1
0
 private void OnEnteringNewSystem(object sender, FsdJump system)
 {
     _system       = StarSystem.Load(system.Name) ?? new StarSystem(system.Name, system.Coordinates);
     Console.Title = $"Elite: Dangerous | Galactic Positioning System | {_system.Name}";
     _nextSystem   = null;
     _writer.Write(_system, _nextSystem);
     PlaySound(VoiceType.Dropping);
 }
 private void ApplyFsdJump(FsdJump fsdJump)
 {
     _tracker.Replace(fsdJump.Timestamp, x =>
     {
         x.StarSystem = new StarSystem(fsdJump.StarSystem, fsdJump.StarPos);
         // All other items set to default
     });
 }
Exemple #3
0
 internal FsdJumpEvent InvokeEvent(FsdJumpEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         FsdJump?.Invoke(_api, arg);
     }
     return(arg);
 }
 private void Process(FsdJump e)
 {
     if (e.SystemAddress.HasValue)
     {
         systemAddresses.TryAdd(e.StarSystem, e.SystemAddress.Value);
     }
     systemCoordinates.TryAdd(e.StarSystem, e.StarPos);
     starSystemRecorder.RecordState(e.StarSystem, e.Timestamp);
 }
        private IEnumerable <ApiEvent> ConvertEvent(FsdJump @event)
        {
            var timestamp = @event.Timestamp;

            yield return(new ApiEvent("addCommanderTravelFSDJump")
            {
                EventData = new Dictionary <string, object> {
                    { "starsystemName", @event.StarSystem },
                    { "jumpDistance", @event.JumpDist },
                    { "shipGameID", playerStateRecorder.GetPlayerShipId(timestamp) },
                    { "shipType", playerStateRecorder.GetPlayerShipType(timestamp) }
                },
                Timestamp = timestamp
            });
        }
Exemple #6
0
 private void Process(FsdJump e) => ProcessLocation(e.StarSystem, e.StarPos, e.Timestamp);