public void DockingGrantedEvent(DockingGrantedEvent e)
 {
     if (e.LandingPad > 0 && e.LandingPad <= 45 && (e.StationType.ToLower() == "coriolis" || e.StationType.ToLower() == "orbis" || e.StationType.ToLower() == "ocellus" || e.StationType.ToLower() == "asteroidbase"))
     {
         LandingPad.Build(e.LandingPad);
     }
 }
Example #2
0
 internal DockingGrantedEvent InvokeEvent(DockingGrantedEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         DockingGranted?.Invoke(_api, arg);
     }
     return(arg);
 }
 private void AssertEvent(DockingGrantedEvent @event)
 {
     Assert.NotNull(@event);
     Assert.Equal(DateTime.Parse("2019-08-31T12:28:03Z"), @event.Timestamp);
     Assert.Equal(EventName, @event.Event);
     Assert.Equal("Martin Silo", @event.StationName);
     Assert.Equal("CraterOutpost", @event.StationType);
     Assert.Equal(3512711680, @event.MarketId);
     Assert.Equal(2, @event.LandingPad);
 }
Example #4
0
        public void TestJournalDockingGranted()
        {
            string       line   = @"{ ""timestamp"":""2018-06-04T07:53:34Z"", ""event"":""DockingGranted"", ""LandingPad"":17, ""MarketID"":128850247, ""StationName"":""Simbad's Refuge"", ""StationType"":""AsteroidBase"" }";
            List <Event> events = JournalMonitor.ParseJournalEntry(line);

            Assert.IsTrue(events.Count == 1);

            DockingGrantedEvent theEvent = (DockingGrantedEvent)events[0];

            Assert.AreEqual("AsteroidBase", theEvent.stationDefinition.basename);
            Assert.AreEqual(17, theEvent.landingpad);
            Assert.AreEqual("Simbad's Refuge", theEvent.station);
        }
Example #5
0
 internal void InvokeDockingGrantedEvent(DockingGrantedEvent arg)
 {
     DockingGrantedEvent?.Invoke(this, arg);
 }
 private void DockingGrantedCallback(DockingGrantedEvent obj)
 {
     SetValue(() => DockingState, DockingStates.Granted);
     SetValue(() => DockLandingPad, obj.LandingPad);
 }
Example #7
0
 internal void InvokeDockingGrantedEvent(DockingGrantedEvent arg) => DockingGrantedEvent?.Invoke(null, arg);