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

@@ -262,7 +262,15 @@ namespace Content.Server.GameTicking
var ticker = IoCManager.Resolve<IGameTicker>();
ticker.ToggleDisallowLateJoin(bool.Parse(args[0]));
if (bool.TryParse(args[0], out var result))
{
ticker.ToggleDisallowLateJoin(bool.Parse(args[0]));
shell.SendText(player, result ? "Late joining has been disabled." : "Late joining has been enabled.");
}
else
{
shell.SendText(player, "Invalid argument.");
}
}
}