Shuttle called/recalled announcements and sounds.
This commit is contained in:
@@ -71,12 +71,12 @@ namespace Content.Server.Chat
|
|||||||
_netManager.ServerSendToAll(msg);
|
_netManager.ServerSendToAll(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DispatchStationAnnouncement(string message)
|
public void DispatchStationAnnouncement(string message, string sender = "CentComm")
|
||||||
{
|
{
|
||||||
var msg = _netManager.CreateNetMessage<MsgChatMessage>();
|
var msg = _netManager.CreateNetMessage<MsgChatMessage>();
|
||||||
msg.Channel = ChatChannel.Radio;
|
msg.Channel = ChatChannel.Radio;
|
||||||
msg.Message = message;
|
msg.Message = message;
|
||||||
msg.MessageWrap = "Centcom Announcement:\n{0}";
|
msg.MessageWrap = $"{sender} Announcement:\n{{0}}";
|
||||||
_netManager.ServerSendToAll(msg);
|
_netManager.ServerSendToAll(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Robust.Server.Interfaces.GameObjects;
|
|||||||
using Robust.Server.Interfaces.Player;
|
using Robust.Server.Interfaces.Player;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.Timing;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Threading;
|
|||||||
using Content.Server.Interfaces.Chat;
|
using Content.Server.Interfaces.Chat;
|
||||||
using Content.Server.Interfaces.GameTicking;
|
using Content.Server.Interfaces.GameTicking;
|
||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
|
using Robust.Server.GameObjects.EntitySystems;
|
||||||
using Robust.Shared.GameObjects.Systems;
|
using Robust.Shared.GameObjects.Systems;
|
||||||
using Robust.Shared.Interfaces.Timing;
|
using Robust.Shared.Interfaces.Timing;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -48,6 +49,10 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
IsRoundEndCountdownStarted = true;
|
IsRoundEndCountdownStarted = true;
|
||||||
|
|
||||||
|
_chatManager.DispatchStationAnnouncement(Loc.GetString("An emergency shuttle has been sent. ETA: {0} minutes.", RoundEndCountdownTime.Minutes), Loc.GetString("Station"));
|
||||||
|
|
||||||
|
Get<AudioSystem>().PlayGlobal("/Audio/Announcements/shuttlecalled.ogg");
|
||||||
|
|
||||||
ExpectedCountdownEnd = _gameTiming.CurTime + RoundEndCountdownTime;
|
ExpectedCountdownEnd = _gameTiming.CurTime + RoundEndCountdownTime;
|
||||||
Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token);
|
Timer.Spawn(RoundEndCountdownTime, EndRound, _roundEndCancellationTokenSource.Token);
|
||||||
OnRoundEndCountdownStarted?.Invoke();
|
OnRoundEndCountdownStarted?.Invoke();
|
||||||
@@ -60,6 +65,10 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
|
|
||||||
IsRoundEndCountdownStarted = false;
|
IsRoundEndCountdownStarted = false;
|
||||||
|
|
||||||
|
_chatManager.DispatchStationAnnouncement(Loc.GetString("The emergency shuttle has been recalled."), Loc.GetString("Station"));
|
||||||
|
|
||||||
|
Get<AudioSystem>().PlayGlobal("/Audio/Announcements/shuttlerecalled.ogg");
|
||||||
|
|
||||||
_roundEndCancellationTokenSource.Cancel();
|
_roundEndCancellationTokenSource.Cancel();
|
||||||
_roundEndCancellationTokenSource = new CancellationTokenSource();
|
_roundEndCancellationTokenSource = new CancellationTokenSource();
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ namespace Content.Server.Interfaces.Chat
|
|||||||
/// Station announcement to every player
|
/// Station announcement to every player
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
void DispatchStationAnnouncement(string message);
|
/// <param name="sender"></param>
|
||||||
|
void DispatchStationAnnouncement(string message, string sender = "CentComm");
|
||||||
|
|
||||||
void DispatchServerMessage(IPlayerSession player, string message);
|
void DispatchServerMessage(IPlayerSession player, string message);
|
||||||
|
|
||||||
|
|||||||
BIN
Resources/Audio/Announcements/shuttlecalled.ogg
Normal file
BIN
Resources/Audio/Announcements/shuttlecalled.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Announcements/shuttledock.ogg
Normal file
BIN
Resources/Audio/Announcements/shuttledock.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Announcements/shuttlerecalled.ogg
Normal file
BIN
Resources/Audio/Announcements/shuttlerecalled.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user