Disable job buttons when they aren't available or late join is disallowed (#2251)

* Disable job buttons when they aren't available

In real time too, the technology is overwhelming

* Jobs are all unavailable when late join is disallowed.

* Better ToggleDisallowLateJoin command parsing

* Add togglelatejoin to groups.

Co-authored-by: Víctor Aguilera Puerto <zddm@outlook.es>
This commit is contained in:
DrSmugleaf
2020-10-16 11:22:58 +02:00
committed by GitHub
parent be096f7ebf
commit 435fb2630e
8 changed files with 118 additions and 2 deletions

View File

@@ -196,5 +196,11 @@ namespace Content.Server.GameTicking
{
_spawnedPositions[jobId] = _spawnedPositions.GetValueOrDefault(jobId, 0) + 1;
}
private void UpdateJobsAvailable()
{
var lobbyPlayers = _playersInLobby.Keys.Select(p => p.ConnectedClient).ToList();
_netManager.ServerSendToMany(GetJobsAvailable(), lobbyPlayers);
}
}
}