Re-organize all projects (#4166)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Eui;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using Lidgren.Network;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Shared.Administration.AdminMenu
|
||||
namespace Content.Shared.Administration.Menu
|
||||
{
|
||||
public class AdminMenuPlayerListMessage : NetMessage
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
using Lidgren.Network;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Shared.Administration.AdminMenu
|
||||
namespace Content.Shared.Administration.Menu
|
||||
{
|
||||
public class AdminMenuPlayerListRequest : NetMessage
|
||||
{
|
||||
71
Content.Shared/Administration/MsgUpdateAdminStatus.cs
Normal file
71
Content.Shared/Administration/MsgUpdateAdminStatus.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Lidgren.Network;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Shared.Administration
|
||||
{
|
||||
public sealed class MsgUpdateAdminStatus : NetMessage
|
||||
{
|
||||
#region REQUIRED
|
||||
|
||||
public const MsgGroups GROUP = MsgGroups.Command;
|
||||
public const string NAME = nameof(MsgUpdateAdminStatus);
|
||||
|
||||
public MsgUpdateAdminStatus(INetChannel channel) : base(NAME, GROUP) { }
|
||||
|
||||
#endregion
|
||||
|
||||
public AdminData? Admin;
|
||||
public string[] AvailableCommands = Array.Empty<string>();
|
||||
|
||||
public override void ReadFromBuffer(NetIncomingMessage buffer)
|
||||
{
|
||||
var count = buffer.ReadVariableInt32();
|
||||
|
||||
AvailableCommands = new string[count];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
AvailableCommands[i] = buffer.ReadString();
|
||||
}
|
||||
|
||||
if (buffer.ReadBoolean())
|
||||
{
|
||||
var active = buffer.ReadBoolean();
|
||||
buffer.ReadPadBits();
|
||||
var flags = (AdminFlags) buffer.ReadUInt32();
|
||||
var title = buffer.ReadString();
|
||||
|
||||
Admin = new AdminData
|
||||
{
|
||||
Active = active,
|
||||
Title = title,
|
||||
Flags = flags,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override void WriteToBuffer(NetOutgoingMessage buffer)
|
||||
{
|
||||
buffer.WriteVariableInt32(AvailableCommands.Length);
|
||||
|
||||
foreach (var cmd in AvailableCommands)
|
||||
{
|
||||
buffer.Write(cmd);
|
||||
}
|
||||
|
||||
buffer.Write(Admin != null);
|
||||
|
||||
if (Admin == null) return;
|
||||
|
||||
buffer.Write(Admin.Active);
|
||||
buffer.WritePadBits();
|
||||
buffer.Write((uint) Admin.Flags);
|
||||
buffer.Write(Admin.Title);
|
||||
}
|
||||
|
||||
public override NetDeliveryMethod DeliveryMethod => NetDeliveryMethod.ReliableOrdered;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user