@@ -109,7 +109,7 @@ namespace Content.Server.Administration.Systems
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdatePlayerList(ICommonSession player)
|
||||
public void UpdatePlayerList(IPlayerSession player)
|
||||
{
|
||||
_playerList[player.UserId] = GetPlayerInfo(player.Data, player);
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Content.Server.Administration.Systems
|
||||
UpdatePanicBunker();
|
||||
}
|
||||
|
||||
private void SendFullPlayerList(ICommonSession playerSession)
|
||||
private void SendFullPlayerList(IPlayerSession playerSession)
|
||||
{
|
||||
var ev = new FullPlayerListEvent();
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace Content.Server.Administration.Systems
|
||||
RaiseNetworkEvent(ev, playerSession.ConnectedClient);
|
||||
}
|
||||
|
||||
private PlayerInfo GetPlayerInfo(SessionData data, ICommonSession? session)
|
||||
private PlayerInfo GetPlayerInfo(IPlayerData data, IPlayerSession? session)
|
||||
{
|
||||
var name = data.UserName;
|
||||
var entityName = string.Empty;
|
||||
@@ -326,7 +326,7 @@ namespace Content.Server.Administration.Systems
|
||||
/// chat messages and showing a popup to other players.
|
||||
/// Their items are dropped on the ground.
|
||||
/// </summary>
|
||||
public void Erase(ICommonSession player)
|
||||
public void Erase(IPlayerSession player)
|
||||
{
|
||||
var entity = player.AttachedEntity;
|
||||
_chat.DeleteMessagesBy(player);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Administration.Systems;
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class AdminTestArenaSystem : EntitySystem
|
||||
public Dictionary<NetUserId, EntityUid> ArenaMap { get; private set; } = new();
|
||||
public Dictionary<NetUserId, EntityUid?> ArenaGrid { get; private set; } = new();
|
||||
|
||||
public (EntityUid Map, EntityUid? Grid) AssertArenaLoaded(ICommonSession admin)
|
||||
public (EntityUid Map, EntityUid? Grid) AssertArenaLoaded(IPlayerSession admin)
|
||||
{
|
||||
if (ArenaMap.TryGetValue(admin.UserId, out var arenaMap) && !Deleted(arenaMap) && !Terminating(arenaMap))
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@ using Content.Server.Disposal.Tube;
|
||||
using Content.Server.Disposal.Tube.Components;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Ghost.Roles;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Mind.Commands;
|
||||
using Content.Server.Prayer;
|
||||
using Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||
@@ -19,15 +18,17 @@ using Content.Shared.Database;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Mind.Components;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Server.Console;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Players;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Toolshed;
|
||||
@@ -55,7 +56,7 @@ namespace Content.Server.Administration.Systems
|
||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||
[Dependency] private readonly PrayerSystem _prayerSystem = default!;
|
||||
[Dependency] private readonly EuiManager _eui = default!;
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
[Dependency] private readonly SharedMindSystem _mindSystem = default!;
|
||||
[Dependency] private readonly ToolshedManager _toolshed = default!;
|
||||
[Dependency] private readonly RejuvenateSystem _rejuvenate = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
@@ -276,7 +277,12 @@ namespace Content.Server.Administration.Systems
|
||||
// TODO VERB ICON control mob icon
|
||||
Act = () =>
|
||||
{
|
||||
_mindSystem.ControlMob(args.User, args.Target);
|
||||
MakeSentientCommand.MakeSentient(args.Target, EntityManager);
|
||||
|
||||
if (!_minds.TryGetMind(player, out var mindId, out var mind))
|
||||
return;
|
||||
|
||||
_mindSystem.TransferTo(mindId, args.Target, ghostCheckOverride: true, mind: mind);
|
||||
},
|
||||
Impact = LogImpact.High,
|
||||
ConfirmationPopup = true
|
||||
@@ -352,7 +358,7 @@ namespace Content.Server.Administration.Systems
|
||||
var message = ExamineSystemShared.InRangeUnOccluded(args.User, args.Target)
|
||||
? Loc.GetString("in-range-unoccluded-verb-on-activate-not-occluded")
|
||||
: Loc.GetString("in-range-unoccluded-verb-on-activate-occluded");
|
||||
|
||||
|
||||
_popup.PopupEntity(message, args.Target, args.User);
|
||||
}
|
||||
};
|
||||
@@ -426,7 +432,7 @@ namespace Content.Server.Administration.Systems
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenEditSolutionsEui(ICommonSession session, EntityUid uid)
|
||||
public void OpenEditSolutionsEui(IPlayerSession session, EntityUid uid)
|
||||
{
|
||||
if (session.AttachedEntity == null)
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,6 @@ using Robust.Shared;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -120,7 +119,7 @@ namespace Content.Server.Administration.Systems
|
||||
_typingUpdateTimestamps[args.SenderSession.UserId] = (_timing.RealTime, msg.Typing);
|
||||
|
||||
// Non-admins can only ever type on their own ahelp, guard against fake messages
|
||||
var isAdmin = _adminManager.GetAdminData(args.SenderSession)?.HasFlag(AdminFlags.Adminhelp) ?? false;
|
||||
var isAdmin = _adminManager.GetAdminData((IPlayerSession) args.SenderSession)?.HasFlag(AdminFlags.Adminhelp) ?? false;
|
||||
var channel = isAdmin ? msg.Channel : args.SenderSession.UserId;
|
||||
var update = new BwoinkPlayerTypingUpdated(channel, args.SenderSession.Name, msg.Typing);
|
||||
|
||||
@@ -377,7 +376,7 @@ namespace Content.Server.Administration.Systems
|
||||
protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySessionEventArgs eventArgs)
|
||||
{
|
||||
base.OnBwoinkTextMessage(message, eventArgs);
|
||||
var senderSession = eventArgs.SenderSession;
|
||||
var senderSession = (IPlayerSession) eventArgs.SenderSession;
|
||||
|
||||
// TODO: Sanitize text?
|
||||
// Confirm that this person is actually allowed to send a message here.
|
||||
|
||||
Reference in New Issue
Block a user