Exemplo n.º 1
0
 internal DockedEvent InvokeEvent(DockedEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         Docked?.Invoke(_api, arg);
     }
     return(arg);
 }
        private void Process(Docked e)
        {
            if (e.SystemAddress.HasValue)
            {
                systemAddresses.TryAdd(e.StarSystem, e.SystemAddress.Value);
            }

            starSystemRecorder.RecordState(e.StarSystem, e.Timestamp);
            stationRecorder.RecordState(e.StationName, e.Timestamp);
        }
Exemplo n.º 3
0
 private void ApplyDocked(Docked docked)
 {
     _tracker.Modify(docked.Timestamp, x =>
     {
         if (x.Body != null)
         {
             x.Body.Docked = true;
         }
         x.SurfaceLocation = null;
         x.Station         = Station.Create(docked.StationName, docked.StationType);
         x.SignalSource    = null;
     });
 }
        private IEnumerable <ApiEvent> ConvertEvent(Docked @event)
        {
            var timestamp = @event.Timestamp;

            yield return(new ApiEvent("addCommanderTravelDock")
            {
                EventData = new Dictionary <string, object> {
                    { "starsystemName", @event.StarSystem },
                    { "stationName", @event.StationName },
                    { "marketID", @event.MarketId },
                    { "shipGameID", playerStateRecorder.GetPlayerShipId(timestamp) },
                    { "shipType", playerStateRecorder.GetPlayerShipType(timestamp) }
                },
                Timestamp = timestamp
            });
        }
Exemplo n.º 5
0
 private void OnDocked(DockingSide side)
 {
     Docked?.Invoke(this, new DockedEventArgs(side));
 }
Exemplo n.º 6
0
 private void Process(Docked e)
 {
     StarSystemRecorder.RecordState(e.StarSystem, e.Timestamp);
     StationRecorder.RecordState(e.StationName, e.Timestamp);
 }