Admin Tool: Observe entities in an extra viewport (#36969)
* camera * add console command * change verb name to camera * placeholder text * add button to player panel * orks are indeed the best * visibility flag fix * not a datafield * more follower fixes * more cleanup * add zooming * resizing real * remove commented out code * remove AddForceSend * comment * Use OS window and add some comments * fix comments and variable name * Needs RT update * Minor grammarchange * Fix warning * Cleanup * almost working... * fix bug * oswindow update * Remove need for RequestClosed. --------- Co-authored-by: beck-thompson <beck314159@hotmail.com> Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This commit is contained in:
27
Content.Shared/Administration/AdminCameraEuiState.cs
Normal file
27
Content.Shared/Administration/AdminCameraEuiState.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Shared.Eui;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Shared.Administration;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed partial class AdminCameraEuiState(NetEntity? camera, string name, GameTick tick) : EuiStateBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The camera entity we will use for the window.
|
||||
/// </summary>
|
||||
public readonly NetEntity? Camera = camera;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the observed entity.
|
||||
/// </summary>
|
||||
public readonly string Name = name;
|
||||
|
||||
/// <summary>
|
||||
/// The current tick time, needed for cursed reasons.
|
||||
/// </summary>
|
||||
public readonly GameTick Tick = tick;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed partial class AdminCameraFollowMessage : EuiMessageBase;
|
||||
@@ -6,9 +6,10 @@ namespace Content.Shared.Eye
|
||||
[FlagsFor(typeof(VisibilityMaskLayer))]
|
||||
public enum VisibilityFlags : int
|
||||
{
|
||||
None = 0,
|
||||
None = 0,
|
||||
Normal = 1 << 0,
|
||||
Ghost = 1 << 1,
|
||||
Subfloor = 1 << 2,
|
||||
Ghost = 1 << 1, // Observers and revenants.
|
||||
Subfloor = 1 << 2, // Pipes, disposal chutes, cables etc. while hidden under tiles. Can be revealed with a t-ray.
|
||||
Admin = 1 << 3, // Reserved for admins in stealth mode and admin tools.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +189,9 @@ public sealed class FollowerSystem : EntitySystem
|
||||
/// <param name="entity">The entity to be followed</param>
|
||||
public void StartFollowingEntity(EntityUid follower, EntityUid entity)
|
||||
{
|
||||
if (follower == entity || TerminatingOrDeleted(entity))
|
||||
return;
|
||||
|
||||
// No recursion for you
|
||||
var targetXform = Transform(entity);
|
||||
while (targetXform.ParentUid.IsValid())
|
||||
|
||||
Reference in New Issue
Block a user