コード例 #1
0
ファイル: EDSMResponder.cs プロジェクト: pekwalker/EDDI
        public void Handle(Event theEvent)
        {
            if (EDDI.Instance.inCQC)
            {
                // We don't do anything whilst in CQC
                return;
            }

            if (EDDI.Instance.inCrew)
            {
                // We don't do anything whilst in multicrew
                return;
            }

            if (EDDI.Instance.inBeta)
            {
                // We don't send data whilst in beta
                return;
            }

            if (starMapService != null)
            {
                /// Retrieve applicable transient game state info (metadata)
                /// for the event and the event with transient info to EDSM
                string eventData = prepareEventData(theEvent);
                if (eventData == null)
                {
                    return;
                }
                starMapService.sendEvent(eventData);
            }
        }