Show a message when players chose to remain in the lobby due to preferences. (#12130)
This commit is contained in:
@@ -65,9 +65,17 @@ namespace Content.Server.GameTicking
|
||||
|
||||
// Calculate extended access for stations.
|
||||
var stationJobCounts = _stationSystem.Stations.ToDictionary(e => e, _ => 0);
|
||||
foreach (var (_, (_, station)) in assignedJobs)
|
||||
foreach (var (netUser, (job, station)) in assignedJobs)
|
||||
{
|
||||
stationJobCounts[station] += 1;
|
||||
if (job == null)
|
||||
{
|
||||
var playerSession = _playerManager.GetSessionByUserId(netUser);
|
||||
_chatManager.DispatchServerMessage(playerSession, Loc.GetString("job-not-available-wait-in-lobby"));
|
||||
}
|
||||
else
|
||||
{
|
||||
stationJobCounts[station] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
_stationJobs.CalcExtendedAccess(stationJobCounts);
|
||||
@@ -75,6 +83,9 @@ namespace Content.Server.GameTicking
|
||||
// Spawn everybody in!
|
||||
foreach (var (player, (job, station)) in assignedJobs)
|
||||
{
|
||||
if (job == null)
|
||||
continue;
|
||||
|
||||
SpawnPlayer(_playerManager.GetSessionByUserId(player), profiles[player], station, job, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user