@@ -1,8 +1,10 @@
|
||||
using System.Linq;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Server.Station.Components;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using System.Text;
|
||||
|
||||
namespace Content.Server.GameTicking
|
||||
@@ -77,7 +79,7 @@ namespace Content.Server.GameTicking
|
||||
("roundId", RoundId), ("playerCount", playerCount), ("readyCount", readyCount), ("mapName", stationNames.ToString()),("gmTitle", gmTitle),("desc", desc));
|
||||
}
|
||||
|
||||
private TickerLobbyStatusEvent GetStatusMsg(ICommonSession session)
|
||||
private TickerLobbyStatusEvent GetStatusMsg(IPlayerSession session)
|
||||
{
|
||||
_playerGameStatuses.TryGetValue(session.UserId, out var status);
|
||||
return new TickerLobbyStatusEvent(RunLevel != GameRunLevel.PreRoundLobby, LobbySong, LobbyBackground,status == PlayerGameStatus.ReadyToPlay, _roundStartTime, RoundPreloadTime, _roundStartTimeSpan, Paused);
|
||||
@@ -85,7 +87,7 @@ namespace Content.Server.GameTicking
|
||||
|
||||
private void SendStatusToAll()
|
||||
{
|
||||
foreach (var player in _playerManager.Sessions)
|
||||
foreach (var player in _playerManager.ServerSessions)
|
||||
{
|
||||
RaiseNetworkEvent(GetStatusMsg(player), player.ConnectedClient);
|
||||
}
|
||||
@@ -146,7 +148,7 @@ namespace Content.Server.GameTicking
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleReady(ICommonSession player, bool ready)
|
||||
public void ToggleReady(IPlayerSession player, bool ready)
|
||||
{
|
||||
if (!_playerGameStatuses.ContainsKey(player.UserId))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user