ConGroups are gone. Long live admin flags in content.

This commit is contained in:
Pieter-Jan Briers
2020-10-30 16:06:48 +01:00
parent f04818437d
commit ad58a056d7
62 changed files with 2673 additions and 289 deletions

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components;
using Content.Server.Administration;
using Content.Server.GameObjects.Components.GUI;
using Content.Server.GameObjects.Components.Headset;
using Content.Server.GameObjects.Components.Items.Storage;
@@ -12,7 +12,6 @@ using Content.Shared.Chat;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.Interfaces;
using Robust.Server.Console;
using Robust.Server.Interfaces.GameObjects;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects.Systems;
@@ -47,7 +46,7 @@ namespace Content.Server.Chat
[Dependency] private readonly IServerNetManager _netManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IMoMMILink _mommiLink = default!;
[Dependency] private readonly IConGroupController _conGroupController = default!;
[Dependency] private readonly IAdminManager _adminManager = default!;
public void Initialize()
{
@@ -231,12 +230,7 @@ namespace Content.Server.Chat
return;
}
if (!_conGroupController.CanCommand(player, "asay"))
{
SendOOC(player, message);
return;
}
var clients = _playerManager.GetPlayersBy(x => _conGroupController.CanCommand(x, "asay")).Select(p => p.ConnectedClient);;
var clients = _adminManager.ActiveAdmins.Select(p => p.ConnectedClient);
var msg = _netManager.CreateNetMessage<MsgChatMessage>();