mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
55 lines
1.3 KiB
C#
55 lines
1.3 KiB
C#
using System;
|
|
|
|
namespace Robust.Client.Console
|
|
{
|
|
public sealed class ClientConGroupController : IClientConGroupController
|
|
{
|
|
private IClientConGroupImplementation? _implementation;
|
|
public event Action? ConGroupUpdated;
|
|
|
|
public IClientConGroupImplementation? Implementation
|
|
{
|
|
set
|
|
{
|
|
if (_implementation != null)
|
|
{
|
|
_implementation.ConGroupUpdated -= GroupUpdated;
|
|
}
|
|
|
|
_implementation = value!;
|
|
_implementation.ConGroupUpdated += GroupUpdated;
|
|
}
|
|
}
|
|
|
|
public bool CanCommand(string cmdName)
|
|
{
|
|
return _implementation?.CanCommand(cmdName) ?? true;
|
|
}
|
|
|
|
public bool CanViewVar()
|
|
{
|
|
return _implementation?.CanViewVar() ?? false;
|
|
}
|
|
|
|
public bool CanAdminPlace()
|
|
{
|
|
return _implementation?.CanAdminPlace() ?? false;
|
|
}
|
|
|
|
public bool CanScript()
|
|
{
|
|
return _implementation?.CanScript() ?? false;
|
|
}
|
|
|
|
public bool CanAdminMenu()
|
|
{
|
|
return _implementation?.CanAdminMenu() ?? false;
|
|
}
|
|
|
|
private void GroupUpdated()
|
|
{
|
|
ConGroupUpdated?.Invoke();
|
|
}
|
|
}
|
|
}
|