Make latejoining not hardcoded to presets (#2028)
* Make latejoining not hardcoded to presets * Applied feedback * Build error fix * Applied more feedback Co-authored-by: David Tan <>
This commit is contained in:
@@ -244,6 +244,26 @@ namespace Content.Server.GameTicking
|
||||
}
|
||||
}
|
||||
|
||||
class ToggleDisallowLateJoinCommand: IClientCommand
|
||||
{
|
||||
public string Command => "toggledisallowlatejoin";
|
||||
public string Description => "Allows or disallows latejoining during mid-game.";
|
||||
public string Help => $"Usage: {Command} <disallow>";
|
||||
|
||||
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
|
||||
{
|
||||
if (args.Length != 1)
|
||||
{
|
||||
shell.SendText(player, "Need exactly one argument.");
|
||||
return;
|
||||
}
|
||||
|
||||
var ticker = IoCManager.Resolve<IGameTicker>();
|
||||
|
||||
ticker.ToggleDisallowLateJoin(bool.Parse(args[0]));
|
||||
}
|
||||
}
|
||||
|
||||
class SetGamePresetCommand : IClientCommand
|
||||
{
|
||||
public string Command => "setgamepreset";
|
||||
|
||||
Reference in New Issue
Block a user