Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)

This commit is contained in:
metalgearsloth
2023-09-01 12:30:29 +10:00
committed by GitHub
parent 37222930d9
commit 4cfc578011
91 changed files with 227 additions and 315 deletions

View File

@@ -19,7 +19,6 @@ using Content.Shared.Chat;
using Content.Shared.Examine;
using Content.Shared.Input;
using Content.Shared.Radio;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
@@ -56,7 +55,6 @@ public sealed class ChatUIController : UIController
[UISystemDependency] private readonly GhostSystem? _ghost = default;
[UISystemDependency] private readonly TypingIndicatorSystem? _typingIndicator = default;
[UISystemDependency] private readonly ChatSystem? _chatSys = default;
[UISystemDependency] private readonly TransformSystem _transform = default!;
private ISawmill _sawmill = default!;
@@ -410,7 +408,7 @@ public sealed class ChatUIController : UIController
private void CreateSpeechBubble(EntityUid entity, SpeechBubbleData speechData)
{
var bubble =
SpeechBubble.CreateSpeechBubble(speechData.Type, speechData.Message, entity, _eye, _manager, _entities, _transform);
SpeechBubble.CreateSpeechBubble(speechData.Type, speechData.Message, entity, _eye, _manager, _entities);
bubble.OnDied += SpeechBubbleDied;

View File

@@ -4,7 +4,6 @@ using Content.Shared.CCVar;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controllers;
using Robust.Shared.Configuration;
using Robust.Shared.Timing;
@@ -17,7 +16,6 @@ public sealed class ViewportUIController : UIController
[Dependency] private readonly IPlayerManager _playerMan = default!;
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[UISystemDependency] private readonly TransformSystem _transform = default!;
public static readonly Vector2i ViewportSize = (EyeManager.PixelsPerMeter * 21, EyeManager.PixelsPerMeter * 15);
public const int ViewportHeight = 15;
@@ -89,10 +87,9 @@ public sealed class ViewportUIController : UIController
_entMan.TryGetComponent(ent, out EyeComponent? eye);
if (eye?.Eye == _eyeManager.CurrentEye && _transform.GetWorldPosition(ent.Value) == default)
{
if (eye?.Eye == _eyeManager.CurrentEye
&& _entMan.GetComponent<TransformComponent>(ent.Value).WorldPosition == default)
return; // nothing to worry about, the player is just in null space... actually that is probably a problem?
}
// Currently, this shouldn't happen. This likely happened because the main eye was set to null. When this
// does happen it can create hard to troubleshoot bugs, so lets print some helpful warnings: