Пример #1
0
    /// <summary>
    /// Makes and announce a written report that will spawn at all comms consoles. Must be called on server.
    /// </summary>
    /// <param name="text">String that will be the report body</param>
    /// <param name="type">Value from the UpdateSound enum to play as sound when announcing</param>
    public void MakeCommandReport(string text, UpdateSound type)
    {
        SpawnReports(text);

        Chat.AddSystemMsgToChat(string.Format(CentCommAnnounceTemplate, CommandNewReportString), MatrixManager.MainStationMatrix);

        SoundManager.PlayNetworked(UpdateTypes[type], 1f);
        SoundManager.PlayNetworked("Commandreport");
    }
Пример #2
0
        /// <summary>
        /// Makes and announce a written report that will spawn at all comms consoles. Must be called on server.
        /// </summary>
        /// <param name="text">String that will be the report body</param>
        /// <param name="type">Value from the UpdateSound enum to play as sound when announcing</param>
        public void MakeCommandReport(string text, UpdateSound type)
        {
            SpawnReports(text);

            Chat.AddSystemMsgToChat(string.Format(ChatTemplates.CentcomAnnounce, ChatTemplates.CommandNewReport), MatrixManager.MainStationMatrix);

            _ = SoundManager.PlayNetworked(updateTypes[type], 1f);
            _ = SoundManager.PlayNetworked(SingletonSOSounds.Instance.AnnouncementCommandReport);
        }
Пример #3
0
    /// <summary>
    /// Makes an announcement for all players. Must be called on server.
    /// </summary>
    /// <param name="template">String that will be the header of the annoucement. We have a couple ready to use </param>
    /// <param name="text">String that will be the message body</param>
    /// <param name="type">Value from the UpdateSound enum to play as sound when announcing</param>
    public static void MakeAnnouncement(string template, string text, UpdateSound type)
    {
        if (text.Trim() == string.Empty)
        {
            return;
        }

        SoundManager.PlayNetworked(UpdateTypes[type]);
        Chat.AddSystemMsgToChat(string.Format(template, text), MatrixManager.MainStationMatrix);
    }
Пример #4
0
        /// <summary>
        /// Makes an announcement for all players. Must be called on server.
        /// </summary>
        /// <param name="template">String that will be the header of the annoucement. We have a couple ready to use </param>
        /// <param name="text">String that will be the message body</param>
        /// <param name="soundType">Value from the UpdateSound enum to play as sound when announcing</param>
        public static void MakeAnnouncement(string template, string text, UpdateSound soundType)
        {
            if (string.IsNullOrWhiteSpace(text))
            {
                return;
            }

            if (soundType != UpdateSound.NoSound)
            {
                _ = SoundManager.PlayNetworked(updateTypes[soundType]);
            }

            Chat.AddSystemMsgToChat(string.Format(template, text), MatrixManager.MainStationMatrix);
        }