Esempio n. 1
0
        /// <summary>
        /// Removes a subspace
        /// </summary>
        public static void RemoveSubspace(int subspaceId)
        {
            switch (GeneralSettings.SettingsStore.RelaySystemMode)
            {
            case RelaySystemMode.Dictionary:
                VesselRelaySystemDictionary.RemoveSubspace(subspaceId);
                break;

            case RelaySystemMode.Database:
                VesselRelaySystemDataBase.RemoveSubspace(subspaceId);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// This method should be called in a thread.
        /// It runs over the old messages and sends them once the subspace time matches the message send time.
        /// </summary>
        public static void RelayOldVesselMessages()
        {
            switch (GeneralSettings.SettingsStore.RelaySystemMode)
            {
            case RelaySystemMode.Dictionary:
                VesselRelaySystemDictionary.RelayOldVesselMessages();
                break;

            case RelaySystemMode.Database:
                VesselRelaySystemDataBase.RelayOldVesselMessages();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// This method relays a message to the other clients in the same subspace.
        /// In case there are other players in OLDER subspaces it stores it in their queue for further processing
        /// </summary>
        public static void HandleVesselMessage(ClientStructure client, VesselBaseMsgData msg)
        {
            switch (GeneralSettings.SettingsStore.RelaySystemMode)
            {
            case RelaySystemMode.Dictionary:
                VesselRelaySystemDictionary.HandleVesselMessage(client, msg);
                break;

            case RelaySystemMode.Database:
                VesselRelaySystemDataBase.HandleVesselMessage(client, msg);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }