Beispiel #1
0
        public override void OnEventStart()
        {
            stationMatrix = MatrixManager.MainStationMatrix;

            if (IsMatrixInvalid())
            {
                return;
            }

            if (AnnounceEvent)
            {
                var text = "Proximity Alert:\nInbound Meteors have been detected.\nBrace for impact!";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.NoSound);

                _ = SoundManager.PlayNetworked(CommonSounds.Instance.MeteorsAnnouncement);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #2
0
    public virtual void WorldSetup()
    {
        //Selects Random world
        SelectedWorld = Worlds[Random.Range(0, Worlds.Count)];

        if (SelectedWorld == null)
        {
            return;
        }

        var selectedWorld = SelectedWorld.GetComponent <WorldGateway>();

        Message = "Teleporting to: " + selectedWorld.WorldName;

        if (!selectedWorld.IsOnlineAtStart)
        {
            selectedWorld.IsOnlineAtStart = true;
            selectedWorld.SetUp();
        }

        if (HasPower)
        {
            SetOnline();
            ServerChangeState(true);

            var text = "Alert! New Gateway connection formed.\n\n Connection established to: " + SelectedWorld.GetComponent <WorldGateway>().WorldName;
            CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
        }
    }
 public override void OnEventEndTimed()
 {
     if (AnnounceEvent)
     {
         CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, announceText, CentComm.UpdateSound.alert);
     }
 }
        void ConnectToWorld()
        {
            var randomWorld = SubSceneManager.RequestRandomAwayWorldLink(this);

            if (randomWorld == null)
            {
                Logger.Log("StationGateway failed to connect to an away world");
                SetOffline();
                return;
            }

            selectedWorld = randomWorld;

            Message = "Teleporting to: " + selectedWorld.WorldName;

            if (selectedWorld.spawnMobsOnConnection)
            {
                selectedWorld.SetUp(this);
            }

            if (HasPower)
            {
                SetOnline();
                ServerChangeState(true);

                var text = "Alert! New Gateway connection formed.\n\n Connection established to: " + selectedWorld.WorldName;
                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }
        }
		public void CmdSendCentCommAnnouncement(string adminId, string adminToken, string text, NetworkConnectionToClient sender = null)
		{
			if (IsAdmin(adminId, adminToken, sender) == false) return;

			CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Notice);

			LogAdminAction($"{PlayerList.Instance.GetByUserID(adminId).Username}: made a central command ANNOUNCEMENT. \n {text}");
		}
        public override void OnEventEndTimed()
        {
            if (AnnounceEvent)
            {
                var text = "Incoming Public Health Report:\nSome people on the station are afflicted by some disease.";

                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }
        }
Beispiel #7
0
        public override void OnEventEnd()
        {
            if (AnnounceEvent)
            {
                var text = "Seriously, what the f**k was that?!";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }
        }
Beispiel #8
0
        public override void OnEventEndTimed()
        {
            if (AnnounceEvent)
            {
                var text = "Incoming Report:\nA weapons convoy got caught in a blue space anomaly near your location. ";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }
        }
Beispiel #9
0
        public override void OnEventEnd()
        {
            if (AnnounceEvent)
            {
                var text = "Situation Update:\nNo more Meteors have been detected.";

                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }
        }
    public void CmdSendCentCommAnnouncement(string adminId, string adminToken, string text)
    {
        var admin = PlayerList.Instance.GetAdmin(adminId, adminToken);

        if (admin == null)
        {
            return;
        }

        CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.notice);
    }
        public void CmdSendCentCommAnnouncement(string text, NetworkConnectionToClient sender = null)
        {
            if (IsAdmin(sender, out var player) == false)
            {
                return;
            }

            CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.CentComAnnounce);

            LogAdminAction($"{player.Username}: made a central command ANNOUNCEMENT. \n {text}");
        }
Beispiel #12
0
 public void MakeAnAnnouncement(string text)
 {
     Logger.Log(nameof(MakeAnAnnouncement), Category.Shuttles);
     if (text.Length > 200)
     {
         CentComm.MakeAnnouncement(ChatTemplates.CaptainAnnounce, text.Substring(0, 200), CentComm.UpdateSound.Announce);
     }
     else
     {
         CentComm.MakeAnnouncement(ChatTemplates.CaptainAnnounce, text, CentComm.UpdateSound.Announce);
     }
     OpenMenu();
 }
        public void AnnounceWar(string declarationMessage)
        {
            if (warDeclared == false)
            {
                warDeclared = true;

                GameManager.Instance.CentComm.ChangeAlertLevel(CentComm.AlertLevel.Red, true);
                CentComm.MakeAnnouncement(ChatTemplates.PriorityAnnouncement,
                                          $"Attention all crew! An open message from the syndicate has been picked up on local radiowaves! Message Reads:\n" +
                                          $"{declarationMessage}", CentComm.UpdateSound.Alert);
                UpdateManager.Add(RewardTelecrystals, 60);
            }
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent && string.IsNullOrEmpty(message) == false)
            {
                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, message, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #15
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, GenerateMessage(), CentComm.UpdateSound.Alert);
            }

            if (FakeEvent || SetSpawnPoints() == false)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #16
0
        public void CmdSendCentCommAnnouncement(string adminId, string adminToken, string text)
        {
            if (IsAdmin(adminId, adminToken) == false)
            {
                return;
            }

            CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.notice);

            var msg = $"{PlayerList.Instance.GetByUserID(adminId).Username}: made a central command ANNOUNCEMENT.";

            UIManager.Instance.adminChatWindows.adminToAdminChat.ServerAddChatRecord(msg, null);
            DiscordWebhookMessage.Instance.AddWebHookMessageToQueue(DiscordWebhookURLs.DiscordWebhookAdminLogURL, msg,
                                                                    "");
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "An electrical storm has been detected in your area, please repair potential electronic overloads.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #18
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Exospheric bubble inbound Processor overload is likely. Please contact you*%xp25)`6cq-BZZT";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #19
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Massive bluespace anomaly detected en route to your station. Brace for impact.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "The scrubber network is experiencing a backpressure surge. Some ejection of contents may occur.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #21
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Ionizing electromagnetic emissions detected near the station. Avoid areas of high radiation.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #22
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #23
0
        public override void OnEventStart()
        {
            //Dont add another reaction if one is already going on
            if (currentReaction != null)
            {
                return;
            }

            if (AnnounceEvent)
            {
                var text = "It appears the chemistry of the universe has been broken, damn those science nerds.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
            }

            if (FakeEvent)
            {
                return;
            }

            currentReaction = new GasReactions(

                reaction: new OxyToPlasma(),

                gasReactionData: new Dictionary <GasSO, GasReactionData>()
            {
                {
                    Gas.Oxygen,
                    new GasReactionData()
                    {
                        minimumMolesToReact = 0.01f
                    }
                }
            },

                minimumTemperature: 0f,
                maximumTemperature: 10000000000f,
                minimumPressure: 0f,
                maximumPressure: 10000000000f,
                minimumMoles: 0.01f,
                maximumMoles: 10000000000f,
                energyChange: 0f
                );

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            stationMatrix = MatrixManager.MainStationMatrix;

            if (AnnounceEvent)
            {
                var text = "Proximity Alert:\nInbound Meteors have been detected.\nBrace for impact!";

                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Massive bluespace anomaly detected en route to your station. Brace for impact.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.NoSound);

                _ = SoundManager.PlayNetworked(CommonSounds.Instance.SpanomaliesAnnouncement);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #26
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Abnormal activity detected in the station's powernet." +
                           "As a precautionary measure, the station's power will be shut off for an indeterminate duration.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.NoSound);
                _ = SoundManager.PlayNetworked(SingletonSOSounds.Instance.PowerOffAnnouncement);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Ionizing electromagnetic emissions detected near the station. Avoid areas of high radiation.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.NoSound);

                _ = SoundManager.PlayNetworked(CommonSounds.Instance.RadiationAnnouncement);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
Beispiel #28
0
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "Abnormal activity detected in the station's powernet." +
                           "As a precautionary measure, the station's power will be shut off for an indeterminate duration.";

                CentComm.MakeAnnouncement(ChatTemplates.CentcomAnnounce, text, CentComm.UpdateSound.Alert);
                // TODO: Play specific announcement message sound instead of generic alert.
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            stationMatrix = MatrixManager.MainStationMatrix;

            if (AnnounceEvent)
            {
                var text = "What the f**k is going on?!";

                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }

            if (FakeEvent)
            {
                return;
            }

            base.OnEventStart();
        }
        public override void OnEventStart()
        {
            if (AnnounceEvent)
            {
                var text = "It appears the chemistry of the universe has been broken, damn those science nerds.";

                CentComm.MakeAnnouncement(CentComm.CentCommAnnounceTemplate, text, CentComm.UpdateSound.alert);
            }

            if (FakeEvent)
            {
                return;
            }

            new GasReactions(

                reaction: new OxyToPlasma(),

                gasReactionData: new Dictionary <Gas, GasReactionData>()
            {
                {
                    Gas.Oxygen,
                    new GasReactionData()
                    {
                        minimumMolesToReact = 0.01f
                    }
                }
            },

                minimumTemperature: 0f,
                maximumTemperature: 10000000000f,
                minimumPressure: 0f,
                maximumPressure: 10000000000f,
                minimumMoles: 0.01f,
                maximumMoles: 10000000000f,
                energyChange: 0f
                );

            base.OnEventStart();
        }