@@ -2,6 +2,7 @@ using Content.Server.Administration;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.NPC.UI;
|
||||
using Content.Shared.Administration;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
|
||||
namespace Content.Server.NPC.Commands;
|
||||
@@ -14,7 +15,7 @@ public sealed class NPCCommand : IConsoleCommand
|
||||
public string Help => $"{Command}";
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (shell.Player is not { } playerSession)
|
||||
if (shell.Player is not IPlayerSession playerSession)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,14 +4,17 @@ using System.Threading;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Robust.Shared.CPUJob.JobQueues;
|
||||
using Robust.Shared.CPUJob.JobQueues.Queues;
|
||||
using Content.Server.NPC.Components;
|
||||
using Content.Server.NPC.HTN.PrimitiveTasks;
|
||||
using Content.Server.NPC.Systems;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.NPC;
|
||||
using Content.Shared.NPC;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -45,7 +48,7 @@ public sealed class HTNSystem : EntitySystem
|
||||
|
||||
private void OnHTNMessage(RequestHTNMessage msg, EntitySessionEventArgs args)
|
||||
{
|
||||
if (!_admin.HasAdminFlag(args.SenderSession, AdminFlags.Debug))
|
||||
if (!_admin.HasAdminFlag((IPlayerSession) args.SenderSession, AdminFlags.Debug))
|
||||
{
|
||||
_subscribers.Remove(args.SenderSession);
|
||||
return;
|
||||
|
||||
@@ -13,7 +13,7 @@ using Robust.Shared.Enums;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Threading;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -528,7 +528,7 @@ namespace Content.Server.NPC.Pathfinding
|
||||
|
||||
private void OnBreadcrumbs(RequestPathfindingDebugMessage msg, EntitySessionEventArgs args)
|
||||
{
|
||||
var pSession = args.SenderSession;
|
||||
var pSession = (IPlayerSession) args.SenderSession;
|
||||
|
||||
if (!_adminManager.HasAdminFlag(pSession, AdminFlags.Debug))
|
||||
{
|
||||
|
||||
@@ -17,12 +17,14 @@ using Content.Shared.NPC;
|
||||
using Content.Shared.NPC.Events;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -145,7 +147,7 @@ public sealed partial class NPCSteeringSystem : SharedNPCSteeringSystem
|
||||
|
||||
private void OnDebugRequest(RequestNPCSteeringDebugEvent msg, EntitySessionEventArgs args)
|
||||
{
|
||||
if (!_admin.IsAdmin(args.SenderSession))
|
||||
if (!_admin.IsAdmin((IPlayerSession)args.SenderSession))
|
||||
return;
|
||||
|
||||
if (msg.Enabled)
|
||||
|
||||
Reference in New Issue
Block a user